I want to remove items from loot spawn

Inkko

Valued Member!
I want to remove NVG from loot table. Please guide me how to do that :)

Thank you sir.

(My Server use DayZ Mod 1.8.9 server files)
Haven't looked at dayz 1.8.9 code but I would assume its not too far off from some of the previous versions. You would probably want to setup custom loot tables and just remove NVGs from all the loot configs so they do not spawn anymore. There should be a tutorial on the site somewhere for custom loot tables.
 

Inkko

Valued Member!
Haven't looked at dayz 1.8.9 code but I would assume its not too far off from some of the previous versions. You would probably want to setup custom loot tables and just remove NVGs from all the loot configs so they do not spawn anymore. There should be a tutorial on the site somewhere for custom loot tables.
on second thought since its jut the NVGs you can client side just the loot files and code it in to replace NVGs with something else.
 

clifdayz

Well-Known Member
This was for 189, so hopefully it works for 190 but I haven't tried it.
quick tutorial:
1) make a fixes directory in the mission
2) You'll need a custom compiles.sqf and change "call compile preprocessFileLineNumbers "fixes\Lootinit.sqf";"
3) Make a local copy of lootinit.sqf and change "_cfgGroups = (missionConfigFile >> "CfgLoot" >> "Groups");"
4) grab dayz_code\Configs\CfgLoot\LootDefines and also dayz_code\Configs\CfgLoot\Groups\*
5) in description.ext "#include "fixes\CFGLoot\LootDefines.hpp""
6) copy/modify the top part of CfgLoot.hpp and paste into description.ext after #5 like this
Code:
class CfgLoot
{
    class Groups
    {
        //Not renamed yet
        #define DZ_BP_VestPouch DZ_Czech_Vest_Pouch
        #define DZ_BP_Patrol DZ_Patrol_Pack_EP1
        #define DZ_BP_Assault DZ_Assault_Pack_EP1
        #define DZ_BP_Survival DZ_TK_Assault_Pack_EP1
        #define DZ_BP_Alice DZ_ALICE_Pack_EP1
        #define DZ_BP_British DZ_British_ACU
        #define DZ_BP_Czech DZ_CivilBackpack_EP1
        #define DZ_BP_Coyote DZ_Backpack_EP1

        #define ItemBloodbagAPos bloodBagAPOS
        #define ItemBloodbagANeg bloodBagANEG
        #define ItemBloodbagBPos bloodBagBPOS
        #define ItemBloodbagBNeg bloodBagBNEG
        #define ItemBloodbagABPos bloodBagABPOS
        #define ItemBloodbagABNeg bloodBagABNEG
        #define ItemBloodbagOPos bloodBagOPOS
        #define ItemBloodbagONeg bloodBagONEG
       
        #define ItemBloodTester bloodTester
        #define ItemTransfusionKit transfusionKit
        #define ItemBloodbagEmpty emptyBloodBag
       
        // General groups
        #include "fixes\CFGLoot\groups\Ammo.hpp"
        #include "fixes\CFGLoot\groups\AmmoBox.hpp"
        #include "fixes\CFGLoot\groups\Attachments.hpp"
        #include "fixes\CFGLoot\groups\Medical.hpp"
        #include "fixes\CFGLoot\groups\Generic.hpp"
        #include "fixes\CFGLoot\groups\Trash.hpp"
        #include "fixes\CFGLoot\groups\Consumable.hpp"
        #include "fixes\CFGLoot\groups\ConsumableItems.hpp"
        #include "fixes\CFGLoot\groups\Fuel.hpp"
        #include "fixes\CFGLoot\groups\Parts.hpp"
       
        // Points of interest
        #include "fixes\CFGLoot\groups\CrashSite.hpp"
        #include "fixes\CFGLoot\groups\CarePackage.hpp"
        #include "fixes\CFGLoot\groups\InfectedCamp.hpp"
       
        // Buildings
        #include "fixes\CFGLoot\groups\Buildings\Boat.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Castle.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Church.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Construction.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Farm.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Hospital.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Hunting.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Industrial.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Military.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Office.hpp"
        //#include "fixes\CFGLoot\groups\Buildings\Powerlines.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Residential.hpp"
        #include "fixes\CFGLoot\groups\Buildings\ResidentialRuins.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Supermarket.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Toilet.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Hangar.hpp"
   
        // Zombies
        #include "fixes\CFGLoot\groups\Zombies\Civilian.hpp"
        #include "fixes\CFGLoot\groups\Zombies\Hunter.hpp"
        #include "fixes\CFGLoot\groups\Zombies\Police.hpp"
        #include "fixes\CFGLoot\groups\Zombies\Military.hpp"
       
        #undef DZ_BP_VestPouch
        #undef DZ_BP_Patrol
        #undef DZ_BP_Assault
        #undef DZ_BP_Survival
        #undef DZ_BP_Alice
        #undef DZ_BP_British
        #undef DZ_BP_Czech
        #undef DZ_BP_Coyote

        #undef ItemBloodbagAPos
        #undef ItemBloodbagANeg
        #undef ItemBloodbagBPos
        #undef ItemBloodbagBNeg
        #undef ItemBloodbagABPos
        #undef ItemBloodbagABNeg
        #undef ItemBloodbagOPos
        #undef ItemBloodbagONeg
       
        #undef ItemBloodTester
        #undef ItemTransfusionKit
        #undef ItemBloodbagEmpty
    };
};
7) find the loot table you want to change within fixes\CFGLoot\*
 
This was for 189, so hopefully it works for 190 but I haven't tried it.
quick tutorial:
1) make a fixes directory in the mission
2) You'll need a custom compiles.sqf and change "call compile preprocessFileLineNumbers "fixes\Lootinit.sqf";"
3) Make a local copy of lootinit.sqf and change "_cfgGroups = (missionConfigFile >> "CfgLoot" >> "Groups");"
4) grab dayz_code\Configs\CfgLoot\LootDefines and also dayz_code\Configs\CfgLoot\Groups\*
5) in description.ext "#include "fixes\CFGLoot\LootDefines.hpp""
6) copy/modify the top part of CfgLoot.hpp and paste into description.ext after #5 like this
Code:
class CfgLoot
{
    class Groups
    {
        //Not renamed yet
        #define DZ_BP_VestPouch DZ_Czech_Vest_Pouch
        #define DZ_BP_Patrol DZ_Patrol_Pack_EP1
        #define DZ_BP_Assault DZ_Assault_Pack_EP1
        #define DZ_BP_Survival DZ_TK_Assault_Pack_EP1
        #define DZ_BP_Alice DZ_ALICE_Pack_EP1
        #define DZ_BP_British DZ_British_ACU
        #define DZ_BP_Czech DZ_CivilBackpack_EP1
        #define DZ_BP_Coyote DZ_Backpack_EP1

        #define ItemBloodbagAPos bloodBagAPOS
        #define ItemBloodbagANeg bloodBagANEG
        #define ItemBloodbagBPos bloodBagBPOS
        #define ItemBloodbagBNeg bloodBagBNEG
        #define ItemBloodbagABPos bloodBagABPOS
        #define ItemBloodbagABNeg bloodBagABNEG
        #define ItemBloodbagOPos bloodBagOPOS
        #define ItemBloodbagONeg bloodBagONEG
      
        #define ItemBloodTester bloodTester
        #define ItemTransfusionKit transfusionKit
        #define ItemBloodbagEmpty emptyBloodBag
      
        // General groups
        #include "fixes\CFGLoot\groups\Ammo.hpp"
        #include "fixes\CFGLoot\groups\AmmoBox.hpp"
        #include "fixes\CFGLoot\groups\Attachments.hpp"
        #include "fixes\CFGLoot\groups\Medical.hpp"
        #include "fixes\CFGLoot\groups\Generic.hpp"
        #include "fixes\CFGLoot\groups\Trash.hpp"
        #include "fixes\CFGLoot\groups\Consumable.hpp"
        #include "fixes\CFGLoot\groups\ConsumableItems.hpp"
        #include "fixes\CFGLoot\groups\Fuel.hpp"
        #include "fixes\CFGLoot\groups\Parts.hpp"
      
        // Points of interest
        #include "fixes\CFGLoot\groups\CrashSite.hpp"
        #include "fixes\CFGLoot\groups\CarePackage.hpp"
        #include "fixes\CFGLoot\groups\InfectedCamp.hpp"
      
        // Buildings
        #include "fixes\CFGLoot\groups\Buildings\Boat.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Castle.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Church.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Construction.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Farm.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Hospital.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Hunting.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Industrial.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Military.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Office.hpp"
        //#include "fixes\CFGLoot\groups\Buildings\Powerlines.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Residential.hpp"
        #include "fixes\CFGLoot\groups\Buildings\ResidentialRuins.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Supermarket.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Toilet.hpp"
        #include "fixes\CFGLoot\groups\Buildings\Hangar.hpp"
  
        // Zombies
        #include "fixes\CFGLoot\groups\Zombies\Civilian.hpp"
        #include "fixes\CFGLoot\groups\Zombies\Hunter.hpp"
        #include "fixes\CFGLoot\groups\Zombies\Police.hpp"
        #include "fixes\CFGLoot\groups\Zombies\Military.hpp"
      
        #undef DZ_BP_VestPouch
        #undef DZ_BP_Patrol
        #undef DZ_BP_Assault
        #undef DZ_BP_Survival
        #undef DZ_BP_Alice
        #undef DZ_BP_British
        #undef DZ_BP_Czech
        #undef DZ_BP_Coyote

        #undef ItemBloodbagAPos
        #undef ItemBloodbagANeg
        #undef ItemBloodbagBPos
        #undef ItemBloodbagBNeg
        #undef ItemBloodbagABPos
        #undef ItemBloodbagABNeg
        #undef ItemBloodbagOPos
        #undef ItemBloodbagONeg
      
        #undef ItemBloodTester
        #undef ItemTransfusionKit
        #undef ItemBloodbagEmpty
    };
};
7) find the loot table you want to change within fixes\CFGLoot\*
Thank you brother but i can't find this line and file "call compile preprocessFileLineNumbers "fixes\Lootinit.sqf";" it in compiles.sqf right?
 

clifdayz

Well-Known Member
oops, that was from some mod fixes for 189. Its dayz_code\loot\init.sqf

with this line
_cfgGroups = (configFile >> "CfgLoot" >> "Groups");
changed to this line
_cfgGroups = (missionConfigFile >> "CfgLoot" >> "Groups");
 
Top