I want to remove items from loot spawn

Discussion in 'Script/Addon help' started by J.Dominic, Dec 11, 2017.

  1. J.Dominic

    J.Dominic New Member

    Joined:
    Aug 14, 2013
    Messages:
    25
    Likes Received:
    0
    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)
     
  2. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    715
    Likes Received:
    92
    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.
     
  3. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    715
    Likes Received:
    92
    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.
     
  4. clifdayz

    clifdayz Well-Known Member

    Joined:
    Jul 28, 2015
    Messages:
    155
    Likes Received:
    13
    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\*
     
  5. J.Dominic

    J.Dominic New Member

    Joined:
    Aug 14, 2013
    Messages:
    25
    Likes Received:
    0
    Thank you brother but i can't find this line and file "call compile preprocessFileLineNumbers "fixes\Lootinit.sqf";" it in compiles.sqf right?
     
  6. clifdayz

    clifdayz Well-Known Member

    Joined:
    Jul 28, 2015
    Messages:
    155
    Likes Received:
    13
    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");
     
  7. J.Dominic

    J.Dominic New Member

    Joined:
    Aug 14, 2013
    Messages:
    25
    Likes Received:
    0
    Ok everythings working thank you very much brother sir @clifdayz.
     
    Last edited: Jan 10, 2018

Share This Page