Zero Survival
http://www.zerosurvival.net/forum/

Loot Spawns
http://www.zerosurvival.net/forum/viewtopic.php?f=7&t=900
Page 1 of 1

Author:  Benuar [ Tue Jun 10, 2014 11:05 pm ]
Post subject:  Loot Spawns

Usualy when i run up to a building there is nothing inside and i have to run aways 100m and back there only to spawn a little loot. As soon as a second player gets close the place is full of loot all of a sudden.

Its horribly annoying and i wonder if it is intended to be this way.

If yes, how exactly does it work?

Author:  SirPlease [ Wed Jun 11, 2014 7:55 am ]
Post subject:  Re: Loot Spawns

Same problem, if anyone has any insight.. too lazy to google. :p

Author:  Seaweed [ Wed Jun 11, 2014 8:04 am ]
Post subject:  Re: Loot Spawns

Loots always spawned like that in dayz, if you approach the area too quickly it won't spawn because theres a minimum distance from the loot piles you must be at.

Not sure how this could have changed in 1.8.1 though as they haven't really changed that much about loot spawning. As for the second player spawning more loot, that's because your client didn't spawn loot at some piles and they were left empty. That second player has a chance to spawn loot in all the empty piles though (this was added with 1.8.1 previously they stayed empty until the loot timer reset).

To be honest I don't have time to look at this and I would appreciate it if you reported the dayz bugs to the dayz devs rather than here.

Author:  SirPlease [ Wed Jun 11, 2014 8:35 am ]
Post subject:  Re: Loot Spawns

Seaweed wrote:
Loots always spawned like that in dayz, if you approach the area too quickly it won't spawn because theres a minimum distance from the loot piles you must be at.

Not sure how this could have changed in 1.8.1 though as they haven't really changed that much about loot spawning. As for the second player spawning more loot, that's because your client didn't spawn loot at some piles and they were left empty. That second player has a chance to spawn loot in all the empty piles though (this was added with 1.8.1 previously they stayed empty until the loot timer reset).

To be honest I don't have time to look at this and I would appreciate it if you reported the dayz bugs to the dayz devs rather than here.


Previously approaching from 200m+ guaranteed a 50% loot chance in the loot slots inside a building.

Code:
if (_rnd < _lootChance) then {
//if (true) then {
_nearBy = nearestObjects [_iPos2, ["WeaponHolder","WeaponHolderBase"],1];
if (count _nearBy == 0) then {
private["_index","_iArray"];
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
_index = _weights call BIS_fnc_selectRandom;
//diag_log ("LOOTSPAWN: _itemType:" + str(_itemType));
//diag_log ("LOOTSPAWN: _index:" + str(_index));
if (_index >= 0) then {
    _iArray = +(_itemType select _index);
    diag_log ("LOOTSPAWN: _iArray" + str(_iArray));
    _iArray set [2,_iPos2];
    _iArray set [3,0];
    _iArray call spawn_loot;
    _iArray = [];
};
_item setVariable ["created",(DateToNumber date),true];
};
if (!_fastRun) then {
sleep 0.1;
};
};


Sadly for some reason in 1.8.1 it seems that sometimes approaching buildings just doesn't spawn anything at all, even with two playerpos's. So all of the item slots, are completely empty, leaving you very frustrated!

Probably will take this to the DayZ forums.

Author:  Seaweed [ Wed Jun 11, 2014 9:20 am ]
Post subject:  Re: Loot Spawns

SirPlease wrote:
Seaweed wrote:
Loots always spawned like that in dayz, if you approach the area too quickly it won't spawn because theres a minimum distance from the loot piles you must be at.

Not sure how this could have changed in 1.8.1 though as they haven't really changed that much about loot spawning. As for the second player spawning more loot, that's because your client didn't spawn loot at some piles and they were left empty. That second player has a chance to spawn loot in all the empty piles though (this was added with 1.8.1 previously they stayed empty until the loot timer reset).

To be honest I don't have time to look at this and I would appreciate it if you reported the dayz bugs to the dayz devs rather than here.


Previously approaching from 200m+ guaranteed a 50% loot chance in the loot slots inside a building.

Code:
if (_rnd < _lootChance) then {
//if (true) then {
_nearBy = nearestObjects [_iPos2, ["WeaponHolder","WeaponHolderBase"],1];
if (count _nearBy == 0) then {
private["_index","_iArray"];
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
_index = _weights call BIS_fnc_selectRandom;
//diag_log ("LOOTSPAWN: _itemType:" + str(_itemType));
//diag_log ("LOOTSPAWN: _index:" + str(_index));
if (_index >= 0) then {
    _iArray = +(_itemType select _index);
    diag_log ("LOOTSPAWN: _iArray" + str(_iArray));
    _iArray set [2,_iPos2];
    _iArray set [3,0];
    _iArray call spawn_loot;
    _iArray = [];
};
_item setVariable ["created",(DateToNumber date),true];
};
if (!_fastRun) then {
sleep 0.1;
};
};


Sadly for some reason in 1.8.1 it seems that sometimes approaching buildings just doesn't spawn anything at all, even with two playerpos's. So all of the item slots, are completely empty, leaving you very frustrated!

Probably will take this to the DayZ forums.


It was never a static 50% chance, take a look at how _rnd is defined, I can't look at the code atm as I'm working but I remember that the lootbias was also involved.

This 1.8.1 change is most likely the culprit

Quote:
* [FIXED] - LOOT - Building locks have been moved to after the building has spawned loot. (hopefully this should allow the bias to sometimes fail but allow other pass's if no loot has spawned.


Can't tell you any more than that till I can actually look at the files side by side though. The issue benaur describes sounds like the lockout failing on his client and passing on another client.

Iirc each loot pile has an associated lockout time, which has to pass before loot can spawn again.

edit: just got a look at the 1.8.1 building_spawnLoot via google:

- They removed the loot bias this patch (compare the file with 1.8)
- I wouldn't rule out that this bug is simply a result of the empty weaponholders not being cleaned up thanks to the arma beta patch bullshit we have at the moment.
- Take a look at the "looted" variable used on all loot piles, this is responsible for the lockouts

Not sure what version you got that building_spawnLoot code from SirPlease but its not from 1.8.1, and doesn't look like the 1.8 one to me either?

Author:  Benuar [ Wed Jun 11, 2014 9:53 am ]
Post subject:  Re: Loot Spawns

My issue wasnt that theres only little loot but indeed that slowly walking up to a building/beeing in the area of a building for a while still spawns nothing at all.

For example i run from 1 elektro firestation to the other and then to the supermarket inbetween them and find the supermarket completly empty.

I trust SirPlease has reported this to the dev forum so i guess we can leave it at that.

Author:  Seaweed [ Wed Jun 11, 2014 9:59 am ]
Post subject:  Re: Loot Spawns

Benuar wrote:
My issue wasnt that theres only little loot but indeed that slowly walking up to a building/beeing in the area of a building for a while still spawns nothing at all.

For example i run from 1 elektro firestation to the other and then to the supermarket inbetween them and find the supermarket completly empty.

I trust SirPlease has reported this to the dev forum so i guess we can leave it at that.


Do you see empty loot piles you can press gear on still?

Author:  Benuar [ Wed Jun 11, 2014 11:48 am ]
Post subject:  Re: Loot Spawns

I would go with no but i will confirm when im back at home later and let you know.

Author:  Seaweed [ Wed Jun 11, 2014 11:56 am ]
Post subject:  Re: Loot Spawns

Benuar wrote:
I would go with no but i will confirm when im back at home later and let you know.


Yeah no worries, next time you get a building that doesn't seem to be spawning any loot if you can do a quick sweep of all the loot points and check them for bugged weapon holders that would help definitely.

Unfortunately this whole beta patch thing is a total mess and will remain so until gamespy dies and people are forced to update to the steam betas. I'm running the server on 112555 which has a lot of bugs like the empty loot pile thing. If I upgrade the server everyone who is not on the steam betas (99.9% of people) cant join. If I downgrade the server to 103718 (the old stable beta) then everyone on 112555 or greater (again most people) can't join :(

The guy who developed dayzcommander is a dick and needs to pull his finger out as he's causing everyone a lot of problems.

Author:  Benuar [ Wed Jun 11, 2014 12:36 pm ]
Post subject:  Re: Loot Spawns

no way to force the zerosurvival people to upgrade i guess

Author:  Seaweed [ Wed Jun 11, 2014 1:04 pm ]
Post subject:  Re: Loot Spawns

Benuar wrote:
no way to force the zerosurvival people to upgrade i guess


The updated patches won't let anyone in who isn't running them already. However most people just go in dayz commander see the latest beta listed is 112555 and give up. That's why we need gamespy to die first, because then no servers will even be able to run on 112555 or lower, forcing everyone to figure out how to upgrade properly.

If dayzcommander had an option already for the newer betas I would run them serverside to force them just as I did with 112555, but it doesn't :( I'm just running the server on the beta patch with the most players which is 112555 by a long way currently.

Author:  SirPlease [ Wed Jun 11, 2014 1:46 pm ]
Post subject:  Re: Loot Spawns

Seaweed wrote:
Not sure what version you got that building_spawnLoot code from SirPlease but its not from 1.8.1, and doesn't look like the 1.8 one to me either?


Just so you know, the code snippet I pasted was from a 2012 build of DayZ Mod, so understandably a LOT has changed - but I've been "between mods" for some time, so this is the last I had laying around (haven't really prodded the 1.8.1 files).

I know that in 1.7.7 the loot spawn / timers changed slightly, and as you pasted they've clearly changed some in 1.8.1 too. I'll do more testing with my squad, we'll check some different radiuses and times plus cycle are ARMA2OA versions to maybe get a better understanding of what truly forces a spawn, and what does not force a spawn.

We've had barracks, school buildings, etc approached on foot from 1k meters away, have zombies clumped up yet zero loot and no gear spots even in item slots. This concerns me a bit because it's almost as if it doesn't even detect the player's position in terms of forcing loot spawn, however zombies of course spawn as normal. Could be a bug, clearly not by design so we'll do some more testing and I'll post here and also my findings to the DayZ forum.

Author:  Benuar [ Wed Jun 11, 2014 9:03 pm ]
Post subject:  Re: Loot Spawns

Ok here for my research, i spawned in cherno on the coast about 500-700m away from the supermarket, approached it by foot and checked for loot. 0 Loot inside and no empty loot piles eigher.

From there i went to the C130 Crash which also had 0 loot.

The military tents were full of stuff but that was spawned by another player, i found the gun he dropped with partially used ammo.

Author:  Seaweed [ Wed Jun 11, 2014 10:06 pm ]
Post subject:  Re: Loot Spawns

Benuar wrote:
Ok here for my research, i spawned in cherno on the coast about 500-700m away from the supermarket, approached it by foot and checked for loot. 0 Loot inside and no empty loot piles eigher.

From there i went to the C130 Crash which also had 0 loot.

The military tents were full of stuff but that was spawned by another player, i found the gun he dropped with partially used ammo.


Are you mostly seeing this kind of thing in high traffic areas near the coast for example?

I wonder if the 15 minute lockout timer for loot is the issue, maybe other clients have those loot points locked and you can't spawn it. I also think the 15 mins itself could actually take longer if the server FPS gets too low. I am going to try reducing the timer to 5 mins for next restart, as razor has done the same for 1.8.2 anyway.

Author:  Benuar [ Wed Jun 11, 2014 10:09 pm ]
Post subject:  Re: Loot Spawns

I belive i have seen this in any traffic but i will confim on low traffic, probably on frieday. Will check out if the change helps tomorrow in the afternoon.

Author:  Benuar [ Thu Jun 12, 2014 7:43 pm ]
Post subject:  Re: Loot Spawns

Tested it in low and high traffic now and i think its way better. No problems on low traffic, sometimes something on very high traffic but that might just be me beeing paranoid in cherno. Should be fine like this

Author:  Benuar [ Tue Jun 17, 2014 8:53 pm ]
Post subject:  Re: Loot Spawns

just now happend again but might have been a coincidenc.. empty firestation and supermarket at cherno. Funnily happend shortly after all the corpses despawned, would have guessed there was a conection with all items bugging out but i did find a gun where a body used to be..

Page 1 of 1 All times are UTC - 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/