DayZ Loot Spawn Mechanic

II III
User avatar
[XK]meancloth
=The General=
Posts: 667

DayZ Loot Spawn Mechanic

Post#1 » Thu Oct 10, 2013 10:54 am

How does a player affect loot (and zombie) spawn?

Pun says it's based on a distance the player has to a building, some say it's tied to a timer. Well, both would be correct.

Image

This image is a sketch, the distances aren't correct but you will get the picture.

As seen in the image, there are three circles around a barn building. Each circle represents a different loot/zombie spawn mechanism. For this example, we pretend that you are the only player in the area.

Blue circle
The blue circle represents an area with a maximum distance of 200 meters to the barn. As soon as you enter this circle zombies WILL spawn at the barn. This thread is about the loot spawn system but it's kinda tied to zombie spawns so i included it here.
How can i benefit from this information?
If you are more than 200 meters away from a building and there are zombies, well, you are not alone.
------------------------------------------------------------------------------------------------------------------------
player_spawnCheck.sqf:
_position = getPosATL player;
_nearby = _position nearObjects ["building",200];
------------------------------------------------------------------------------------------------------------------------
Yellow circle
The yellow circle represents an area with a maximum distance of 120 meters to the barn. I fucked up the relations in the image, don't hang me for it.
As soon as you enter this circle loot CAN spawn. "Hey, i ran to a building but there wasn't any loot." Well, that's how the timer comes into play. You see, every 10 minutes loot will generate if certain conditions are met. One of these conditions is that a player is in this yellow circle but NOT in the red one. There is an exception to this rule which i will explain later. You ran to building but there was no loot? Well, go more than 30 meters away from it and wait for a maximum of 10 minutes. After that, there WILL be loot. Run away more than 120 meters and leave the red circle and there will NO loot.

Red circle
The red circle represents a kind of dead zone for loot. If you are the only player around and you are closer than 30 meters to the building, NO loot will spawn. Due to this mechanic it's impossible to camp a building for loot.
------------------------------------------------------------------------------------------------------------------------
player_spawnCheck.sqf:
if ((_dis < 120) and (_dis > 30)) then {
...
}
------------------------------------------------------------------------------------------------------------------------
Summary: If your distance to a building is between 30 and 120 meters, loot WILL generate there. The loot generation takes place every 10 minutes.

How do multiple players affect loot spawn?

As i explained before, your distance to the building needs to be between 30 and 120 meters. There is a way to circumvent this:
If you are in the red circle, no loot will spawn. BUT if a second player comes into the yellow circle and stays there. Well, he will generate the loot for you in the barn.
How can i benefit from this information?
Place one player in the building (red circle) and one player in the yellow circle with cover. Loot every item in the building and wait for 10 minutes. There will be new items to loot.

How are items generated?

Every building in DayZ has a number of possible loot locations. The high value barn i used in my sketch has 12 possible locations where loot can be generated. Additionally, the chance to actually generate loot is 50%. Let's say there are NO items spawned yet. After 10 minutes you entered the red circle the first "spawn wave" will occur. Statistically there will be items on 6 loot locations. There are 6 loot locations without items now. After another 10 minutes, 3 more loot locations will have generated loot.
Special rule: Backpacks and ammo crates don't use up loot locations. There will still be items spawning there.

How can i benefit from this information?
If you clear every loot location in a building you are increasing the numbers of item spawns after every 10 minute cycle.
------------------------------------------------------------------------------------------------------------
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;
};
};
------------------------------------------------------------------------------------------------------------------------
Loot timer

To clarify some questions: The first player who comes near a building (yellow circle/120m) after a server restart will start the loot timer for that building. Every building has it's own loot timer. The loot timer is 10 minutes. Every 10 minutes new loot is generated as long as a player is in the red circle.
Even if you start the loot timer and leave the building, the next player who comes near the building will generate loot (if it's more than 10 minutes after the first player left the scene).


Players in vehicles

Players who are inside of vehicles, be it cars or choppers, WILL NOT spawn loot or zombies. It's a nice trick to play on other players as you can hide your ATV. They won't see any zombies and will think there are no players around. As soon as THEY spawn zombies, you get off the ATV and kill them.
Image

Return to “ARMA”

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Login