Jump to content
  • 0

How do you set up custom loot tables with 1.0.5.1?


BetterDeadThanZed

Question

I am running Epoch 1.0.5.1. Using information in this thread, I have tried to get a custom loot table working in 1.0.5.1. I previously had it working in 1.0.4.2: 

 

I downloaded the loot tables from here: https://github.com/vbawol/DayZ-Epoch/tree/master/SQF/dayz_code/Configs/CfgLoot and put them in a folder called loottables in my mission file. I edited my description.ext file to have these lines just below "enableItemsDropping=0;"

#include "loottables\CfgBuildingLoot.hpp"
#include "loottables\CfgLootSmall.hpp"
#include "loottables\cfgLoot.hpp"

I edited my custom variables.sqf file. I don't copy over the variables.sqf for custom edits, but rather, I call a second variables.sqf in my init.sqf, so it only contains the lines that need to be changed:

dayz_baseTypes = getArray (missionConfigFile >> "loottables\CfgBuildingLoot" >> "Default" >> "zombieClass")

I edited the CfgBuildingLoot.hpp to spawn only a med box inside of a grocery store to attempt to confirm that the server is loading the new loot tables. When I joined the server, just the normal loot spawned in the grocery store.

 

So, obviously I'm not loading the new modified loot tables. What am I doing wrong?

Link to comment
Share on other sites

Recommended Posts

  • 0

Download all these files: https://github.com/vbawol/DayZ-Epoch/tree/Release_1.0.5.1/SQF/dayz_code/Configs/CfgLoot

 

Put them somewhere in your mission.pbo.

 

Open up description.ext and paste this line:

//EXISTING LINE
enableItemsDropping = 0;
//NEW LINE
#include "PATHTO\NEWLOOTFOLDER\CfgBuildingLoot.hpp"

Then open up init.sqf and paste the following variable:

DZE_MissionLootTable = true;

Done!

Link to comment
Share on other sites

  • 0

Download all these files: https://github.com/vbawol/DayZ-Epoch/tree/Release_1.0.5.1/SQF/dayz_code/Configs/CfgLoot

 

Put them somewhere in your mission.pbo.

 

Open up description.ext and paste this line:

//EXISTING LINE
enableItemsDropping = 0;
//NEW LINE
#include "PATHTO\NEWLOOTFOLDER\CfgBuildingLoot.hpp"

Then open up init.sqf and paste the following variable:

DZE_MissionLootTable = true;

Done!

 

Putting DZE_MissionLootTable = true; stops all loot and zedz from spawning on my server.

Link to comment
Share on other sites

  • 0

Then the path to your loot files in description.ext is wrong.

 

Path in description.ext: #include "loottables\CfgBuildingLoot.hpp"

 

Files are located in the loottables folder of my mission file. 

 

Once DZE_MissionLootTable = true; is put into the init.sqf no zedz or loot will spawn.

 

i8pn.png

Link to comment
Share on other sites

  • 0

Open up CfgBuildingLoot.hpp, scroll down to the bottom and make sure it's including CfgBuildingPos.hpp.

 

Also where are you putting the variable in init.sqf? Near the other epoch variables?

 

I'm putting it in the middle of the other variables:

DynamicVehicleDamageLow = 0; // Default: 0DynamicDamageHigh = 100; // Default: 100

DZE_MissionLootTable = true;

//Enables global chat messaging of player deaths. (Also requires enableRadio true;?)
DZE_DeathMsgGlobal = true;

I will uncomment the #include "\dayz_epoch_b\CfgBuildingPos.hpp" to see if that makes a difference.

Link to comment
Share on other sites

  • 0

isnt that the wrong loot table, like pre 1.0.5? notice how that cfgloot the list of items is horizontal like this

one, two, three, four, five

 

it should be vertical

one,

two,

three,

four,

five

 

 

like icomrades loot table, fourth post down 

 

isnt that the wrong loot table, like pre 1.0.5? notice how that cfgloot the list of items is horizontal like this

one, two, three, four, five

 

it should be vertical

one,

two,

three,

four,

five

 

 

like icomrades loot table, fourth post down 

I have tried his aswell and im still having the same issue

Link to comment
Share on other sites

  • 0

https://github.com/v...Configs/CfgLoot

 

I'm running those files myself, (although I edited them to include overwatch items) and they're working fine for me on my Overpoch server.

 

Only problem I am having is none of my Land_Mil_Barracks_i buildings are spawning any loot at all.

 

My CfgBuildingPos.hpp has this for that building:

 

class Land_Mil_Barracks_i: MilitarySpecial {
lootPos[] = {{4.56494,-2.67383,-1.14822},{0.312988,1.54492,-1.09824},{-2.95361,1.49414,-1.11823},{-3.39111,-1.99023,-0.708221},{-6.68604,-1,0.0917664},{-8.94238,-2.52441,-1.09824},{-0.59668,-1.49609,-1.10825},{3.03467,-1.00586,0.0917664},{-0.214355,-2.19531,0.0917664},{-8.93018,1.53906,-1.09824}};
lootPosZombie[] = {{-7.97119,0.0888672,-0.223236},{-5.29053,-0.952148,-0.223236},{-1.9707,-1.5957,-0.223236},{1.48193,-2.20313,-0.223236},{5.24463,-2.05664,-0.223236}};
lootPosSmall[] = {{3.88037,-0.905273,-0.358246},{6.48242,-2.51367,-0.978241},{3.03662,-1.78418,-0.698242},{-0.179199,0.488281,-1.10825},{-3.20703,-0.101563,-1.11823},{-3.37061,-1.08887,0.0917664},{-6.79297,-2.63086,-1.09824},{-9.29541,-0.212891,-1.09824}};
};    //Qty: 2

 

The Land_Mil_Barracks spawn stuff just fine, anyone have any idea why this might be happening?

Link to comment
Share on other sites

  • 0

I did that any my server won't start, with this error:

 

ErrorMessage: Include file dayz_epoch_b\CfgBuildingPos.hpp not found.

Zed, put: #include "CfgLoot.hpp" at the very top of your CfgBuildingLoot.hpp and #include "CfgBuildingPos.hpp" at the bottom of the CfgBuildingLoot.hpp. Make sure #include "CfgLootSmall.hpp" is at the very top of your CfgLoot.hpp. It looks like your Description and Init are correct. For the record my init.sqf has DZE_MissionLootTable = True; just under DZE_BuildOnRoads = false; // Default: False and my description.ext has #include "customloot\CfgBuildingLoot.hpp" at the very top of it. I am having no problems at all running it like this,

Link to comment
Share on other sites

  • 0

Zed, put: #include "CfgLoot.hpp" at the very top of your CfgBuildingLoot.hpp and #include "CfgBuildingPos.hpp" at the bottom of the CfgBuildingLoot.hpp. Make sure #include "CfgLootSmall.hpp" is at the very top of your CfgLoot.hpp. It looks like your Description and Init are correct. For the record my init.sqf has DZE_MissionLootTable = True; just under DZE_BuildOnRoads = false; // Default: False and my description.ext has #include "customloot\CfgBuildingLoot.hpp" at the very top of it. I am having no problems at all running it like this,

I followed what you said and it results in this error- http://prntscr.com/401uw7.

Link to comment
Share on other sites

  • 0

I'm looking at it now, one thing you have to keep in mind with how these loot tables are working now is that the chance of spawn for a group has to equal one. For instance:

 

office2[] = {
    {"RH_7Rnd_50_AE",0.2},
    {"RH_6Rnd_44_Mag",0.2},
    {"RH_6Rnd_357_Mag",0.2},
    {"RH_13Rnd_9x19_bhp",0.2},
    {"RH_8Rnd_9x19_P38",0.2},
    {"RH_7Rnd_32cal_ppk",0.2},
    {"RH_8Rnd_9x19_Mk",0.2},
    {"RH_8Rnd_9x19_Mksd",0.2},
    {"RH_15Rnd_9x19_usp",0.2},
    {"RH_15Rnd_9x19_uspsd",0.2},

 

If you add all of the 0.2 together you get a value greater than 1, in face it would be 2 in this case, you would have to reset the values to equal one, so in this case instead of it being 0.2 per item you would have to change it to 0.1. This will apply to your CfgLoot and CfgLootSmall.hpp's.

Link to comment
Share on other sites

  • 0

https://github.com/v...Configs/CfgLoot

 

I'm running those files myself, (although I edited them to include overwatch items) and they're working fine for me on my Overpoch server.

 

Only problem I am having is none of my Land_Mil_Barracks_i buildings are spawning any loot at all.

 

My CfgBuildingPos.hpp has this for that building:

 

class Land_Mil_Barracks_i: MilitarySpecial {

lootPos[] = {{4.56494,-2.67383,-1.14822},{0.312988,1.54492,-1.09824},{-2.95361,1.49414,-1.11823},{-3.39111,-1.99023,-0.708221},{-6.68604,-1,0.0917664},{-8.94238,-2.52441,-1.09824},{-0.59668,-1.49609,-1.10825},{3.03467,-1.00586,0.0917664},{-0.214355,-2.19531,0.0917664},{-8.93018,1.53906,-1.09824}};

lootPosZombie[] = {{-7.97119,0.0888672,-0.223236},{-5.29053,-0.952148,-0.223236},{-1.9707,-1.5957,-0.223236},{1.48193,-2.20313,-0.223236},{5.24463,-2.05664,-0.223236}};

lootPosSmall[] = {{3.88037,-0.905273,-0.358246},{6.48242,-2.51367,-0.978241},{3.03662,-1.78418,-0.698242},{-0.179199,0.488281,-1.10825},{-3.20703,-0.101563,-1.11823},{-3.37061,-1.08887,0.0917664},{-6.79297,-2.63086,-1.09824},{-9.29541,-0.212891,-1.09824}};

};    //Qty: 2

 

The Land_Mil_Barracks spawn stuff just fine, anyone have any idea why this might be happening?

Figured out the problem, the math on the MilitarySpecial category in CfgBuildingLoot was wrong, instead of adding to 1 it added to 0.98, changed it and boom, those barracks are spawning no problem.

Link to comment
Share on other sites

  • 0

exact same error. Is CfgBuildingPos.hpp needed in 1.0.5.1? Because up untill now ive never needed it

does your server have the latest Arma 2 update? I'm running 1.63.125402. Yes it does need that file, Vbawol himself put those files out if I am not mistaken. Open your CfgBuildingLoot and put #include "CfgBuildingPos.hpp" at the very bottom right before the very last }; I have mine at the end and you have yours in the middle of the script. Other than that I cannot see what is wrong with your script, I mean you need to fix the math in your Loot and SmallLoot files but that should not be giving you your error. As long as your Init.sqf is edited properly and your description.ext is point at the right place I'm afraid this one is beyond me.

Link to comment
Share on other sites

  • 0

does your server have the latest Arma 2 update? I'm running 1.63.125402. Yes it does need that file, Vbawol himself put those files out if I am not mistaken. Open your CfgBuildingLoot and put #include "CfgBuildingPos.hpp" at the very bottom right before the very last }; I have mine at the end and you have yours in the middle of the script. Other than that I cannot see what is wrong with your script, I mean you need to fix the math in your Loot and SmallLoot files but that should not be giving you your error. As long as your Init.sqf is edited properly and your description.ext is point at the right place I'm afraid this one is beyond me.

Mine is running 1.63.125555. But anyways thanks for the help

Link to comment
Share on other sites

  • 0

Ok, so I moved the #include "loottables\CfgBuildingLoot.hpp" line to the top of the description.ext file. The other #include lines were already in their proper place. The server starts and zeds and loot spawns, but I don't think the custom loot tables are being read because I edited the CfgBuildingLoot.hpp file as a test. I changed the supermarket loot to this:

class Supermarket: Default {
lootChance = 0.6;
minRoaming = 12; //2
maxRoaming = 16; //6
zombieChance = 1.0; //0.3
zombieClass[] = {"zZombie_Base","zZombie_Base","z_teacher","z_suit1","z_suit2"};
lootType[] = {
{"ItemKeyKit","weapon",1.0}
};
};

The only thing is should spawn is keymaker kits and it should spawn a lot of zeds, but when I go to a supermarket, it's got the regular loot.

 

To recap:

 

In description.ext, at the very top, I have #include "loottables\CfgBuildingLoot.hpp"

#include "CfgLoot.hpp" is at the very top of myCfgBuildingLoot.hpp and #include "CfgBuildingPos.hpp" at the bottom of my CfgBuildingLoot.hpp.

#include "CfgLootSmall.hpp" is at the very top of my CfgLoot.hpp.

I have DZE_MissionLootTable = True; in my init.sqf, under the other Epoch variables.

 

Is there another way for me to verify the custom loot tables are working? Are items for the supermarket pulled from another place besides the CfgBuildingLoot.hpp?

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...