100% Custom Loot tables - TUTORIAL

kaysio

Valued Member!
1> Put 3 files into your main mission.pbo file

CfgBuildingLoot.hpp
CfgBuildingPos.hpp
CfgLoot.hpp




2> Open 'init.sqf' file in your mission.pbo and change the lines with 'variables.sqf' & 'compiles.sqf', to the following

call compile preprocessFileLineNumbers "custom\variables.sqf";
call compile preprocessFileLineNumbers "custom\compiles.sqf";





3> Place 'custom' & 'fixes' folder into your mission.pbo
[Ive left my self bloodbag script & modded dynamic weather script in there aswell]




4> Open up your 'description.ext' from your mission.pbo
and add the following to the very top of the file.


#include "cfgBuildingLoot.hpp"



new files I uploaded the wrong one, now fixed
files:http://sdrv.ms/1bOiPt6



Now you can alter 'CfgBuildingLoot.hpp' & 'CfgLoot.hpp' to change the loot spawns



This has been tested & working on a dayz.st server

# the dynamic weather gives normal weather during day & clear night skys
NEW BACKUP LINK : http://whiskey-tango-foxtrot.co.uk//customspawnloot.zip
 

dayzwar

Well-Known Member
1> Put 3 files into your main mission.pbo file

CfgBuildingLoot.hpp
CfgBuildingPos.hpp
CfgLoot.hpp




2> Open 'init.sqf' file in your mission.pbo and change the lines with 'variables.sqf' & 'compiles.sqf', to the following

call compile preprocessFileLineNumbers "custom\variables.sqf";
call compile preprocessFileLineNumbers "custom\compiles.sqf";





3> Place 'custom' & 'fixes' folder into your mission.pbo
[Ive left my self bloodbag script & modded dynamic weather script in there aswell]




4> Open up your 'description.ext' from your mission.pbo
and add the following to the very top of the file.


#include "cfgBuildingLoot.hpp"



files:http://sdrv.ms/14FWKMP



Now you can alter 'CfgBuildingLoot.hpp' & 'CfgLoot.hpp' to change the loot spawns



This has been tested & working on a dayz.st server

# the dynamic weather gives normal weather during day & clear night skys
thanks, but, thats is not for mod the loot table right? I think what some of us want, is the same drops, but with better chance, like before in 1.6. Maybe I understand incorreclty and cant be done.
 
thanks, but, thats is not for mod the loot table right? I think what some of us want, is the same drops, but with better chance, like before in 1.6. Maybe I understand incorreclty and cant be done.

That will do what you need, once you have followed those instructions you will be able to edit all 3 of those .hpp files and have the ability to:
  • Increase or decrease loot chance
  • Add more loot to certain spawns
  • Add or remove points for loot to spawn inside buildings
  • Add or remove types buildings that spawn loot
  • Add customized loot tables for new buildings
 
thanks, but, thats is not for mod the loot table right? I think what some of us want, is the same drops, but with better chance, like before in 1.6. Maybe I understand incorreclty and cant be done.

You can change the loot OR the chance of current loot dropping in CfgLoot.hpp.

Example:
Code:
medical[] = {
            {"ItemBandage",0.08},
            {"ItemPainkiller",0.05},
            {"ItemMorphine",0.05},
            {"ItemEpinephrine",0.03},
            {"ItemAntibiotic",0.01},
            {"ItemHeatPack",0.03}

If you change the 0.01 to 0.1 for "ItemAntibiotic" you increase it from the current chance of 1% to 10% for it to spawn. Likewise, you can just add or subtract, or even change what spawns. That's the purpose of the custom loot table.
 
You can change the loot OR the chance of current loot dropping in CfgLoot.hpp.

Example:
Code:
medical[] = {
            {"ItemBandage",0.08},
            {"ItemPainkiller",0.05},
            {"ItemMorphine",0.05},
            {"ItemEpinephrine",0.03},
            {"ItemAntibiotic",0.01},
            {"ItemHeatPack",0.03}

If you change the 0.01 to 0.1 for "ItemAntibiotic" you increase it from the current chance of 1% to 10% for it to spawn. Likewise, you can just add or subtract, or even change what spawns. That's the purpose of the custom loot table.

Does changing something's chance to "1.0" make it a 100% chance to spawn?
 

dayzwar

Well-Known Member
Any feed back ?
I done a check test on my server. Ive change to spawn 100% antibiotics and yes now Ive them spawning all over the place.
I will try ur new files, because the others was no effect. I did all high chance and nathing, I edited the hpp and did all x10 (0.01 - 0.10, 0.04-0.40) and nathing. Now, I will try with ur new files.

btw, what is edited into the variables??
 

dayzwar

Well-Known Member
OK I tested u get some stuff in the hospital OK. but I put chance 1 - 0.40 in most of the items, and I find lots of empty buildings, or trash, omg, damn u rocket.
 

dayzwar

Well-Known Member
I manually went through the loot files and deleted tin cans and empty pop cans. They were set to like 60%. It's no wonder nothing else spawned.

and u got stuff spawning? can u share the file? because I did the same, and change the chance to almost 1 (100%) and nathing, no even close to 1.6 kind of loots.
 
There are two files that determine loot spawn. 1 is for the specific items, the other is for the buildings loot pile chance. If you edit the item chance but not the building loot pile chance, you still will get low spawns.
 

dayzwar

Well-Known Member
There are two files that determine loot spawn. 1 is for the specific items, the other is for the buildings loot pile chance. If you edit the item chance but not the building loot pile chance, you still will get low spawns.
but I did that, thats the problem, I just wanna compare files, to see what I did wrong.
 
Top