100% Custom Loot tables - TUTORIAL

you would need to modify them extra values in the building_spawnZombie.sqf, using the same idea here

But the lootChance value can be modified in here, simple add that to the defining class section
Code:
case "Land_HouseV_1I4": { _LootClass = "Residential"; _lootChance = 0.8; };

You can easily push this code further to actually adding more loot spots in buildings or moving them.

Thanks so much Seven for this great work. I have been able to use this method to do a great many changes. I was trying to push the code further as you said to make a non vanilla dayz building spawn loot in custom spots. This is what i have added so far to no avail. Any idea where else changes would have to be made to make this work?

Code:
private["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_itemChances","_lootChance","_weights","_cntWeights","_index","_LootClass","_lootPos"];
Code:
switch (_type) do { //Assign building classes
    case "Land_dum_mesto_in": { _LootClass = "Residential"; _lootChance = 0.6;
    _lootPos = {
      { -5.53796,-2.51996,-3.99769 },
      { -4.66113,1.34052,-4.26331 },
      { -4.9137,3.4718,-4.26331 },
      { 0.397583,-2.74866,-4.26418 },
      { 2.18762,0.74707,-4.26418 },
      { 4.94128,-1.67108,-4.26418 },
      { 4.48279,2.82495,-4.26418 },
      { 1.11023,4.69928,-2.75561 },
      { 4.98938,3.79883,-1.28095 },
      { 5.55957,-1.61218,-1.28095 },
      { 0.695679,-2.18268,-1.28095 },
      { -2.42969,-1.18854,-1.27582 },
      { -4.77722,3.51996,-1.27582 }
    };
    };
 
Hey Guys!
also my loot works great but can sb. explain me,
how to edit this loot : ["","military"], ?
i really want to know this!
 
@HeyNanners,

What kind of building are you trying to add loot to? I used Seven's Custom Loot Tables to add loot positions to a building like so:


Code:
case "usec_rig_a": { _LootClass = "MilitarySpecial"; _positions = [[-9.33008, 4.07715, 2.48618], [-15.1563, -15.708, 2.33903], [-17.2188, -11.8174, 2.33903], [9.64648, -5.80176, 2.4789], [16.4277, 12.4863, 2.40179], [-15.0566, 16.5352, 2.33903], [-10.0488, 13.8496, -3.50033], [12.2891, 14.7031, -3.50033], [25.668, 4.60742, -3.49775], [13.6211, -6.76172, -3.50033]]; };

The array in your post above is in C++ format, while it must be in .sqf to work correctly.
 
I'm looking to alter my spawn_loot.sqf to edit the loot pile classes themselves.

Code:
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);

This is the line calling for the cfgLoot hpp file, any chance this can be changed to point to my mission file with a custom sqf file or is this not possible? If so - what would i need to make that look like?
 
I'm looking to alter my spawn_loot.sqf to edit the loot pile classes themselves.

Code:
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);

This is the line calling for the cfgLoot hpp file, any chance this can be changed to point to my mission file with a custom sqf file or is this not possible? If so - what would i need to make that look like?


I have been looking at this kind of issue as well. What I was thinking was that you could create arrays in a new .sqf file which contain the newly modified loot piles and then select from them with a function. Pretty much like Seven did with his custom loot tables which rearrange the the config.cpp server side. Just have not really delved into it yet.
 
Correct, as I've said several times in this topic, making the exact same changes I did to building_spawnloot.sqf will work for spawn_loot.sqf to change the CfgLoot.hpp
 
hi guys !

sometimes on my panthera 1.8 server the loot wont spawn porperly , anyone here knows a solution since i saw a few 1.8 Server with a lootfix ?!

btw nice loottable for chernarus !
 
with Chernrus map i would like to make 24 slot back packs harder to loot for at the moment they are 0.01 can it come down to 0.001 ? or is that insane maybe 0.050 ? or is 0.01 the lowest for loot tables
 
with Chernrus map i would like to make 24 slot back packs harder to loot for at the moment they are 0.01 can it come down to 0.001 ? or is that insane maybe 0.050 ? or is 0.01 the lowest for loot tables

You know what i've not actually tried this. But I think 0.01 is as low as you can go.

You could always lower the probability of the loot class, ie Military.
 
hi guys !

sometimes on my panthera 1.8 server the loot wont spawn porperly , anyone here knows a solution since i saw a few 1.8 Server with a lootfix ?!

btw nice loottable for chernarus !
This code is designed for chernarus, someone, or yourself would need to design a new loot table based of the panthera code, to copy this design to allow panthera to run correctly.

with Chernrus map i would like to make 24 slot back packs harder to loot for at the moment they are 0.01 can it come down to 0.001 ? or is that insane maybe 0.050 ? or is 0.01 the lowest for loot tables
I've never tested 0.001 but I would assume it will work, although changing the values of other objects in the same table to make them more common will reduce the value 0.01 represents.
 
Thank u for the fast reply ! I hope i can find this fix...

send from my Galaxy S2 using tapatalk
 
On chernarus ??
My problem exists only with panthera 1.8

On chernarus it worx

send from my Galaxy S2 using tapatalk
 
Anyone here done any work with the spawn_loot.sqf and can provide an example of how they changed their loot piles, while I do understand i have to follow a similar format as the above for the loot table itself, I am slightly confused as how to organize it. I've already got the piles I want created, just need to figure out how to throw em in the spawn_loot.sqf properly.
 
Back
Top