Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I'm having a problem with my loot table. I'm playing on Chernarus and I've added some guns from rMod 2.1. I added in the correct weapon ID's for the guns, but loot is still not spawning. Can someone help me please? My Skype name is iceball97 if you can help me. Thanks!
Got everything in and working good, just wondering if there is a way to edit how many mags spawn with the guns.. Sometimes its none, and others its up to 3. Is there a way to change this at all?
case "weapon": {
//Item is a weapon, add it and a random quantity of magazines
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_item addWeaponCargoGlobal [_iItem,1];
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
if ((count _mags) > 0) then {
// if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver
if (!(_iItem in MeleeWeapons)) then {
_magQty = round(random 10);
if (_magQty > 3) then {
_item addMagazineCargoGlobal [(_mags select 0), (round(random 1) + 1)];
};
};
};
};
if (!(_iItem in MeleeWeapons)) then {
_item addMagazineCargoGlobal [(_mags select 0), 3];
};
Alright so since 1.7.7 came out I think there is a different way of doing the custom loot table.... I've noticed that there are files in the dayz_code/configs/CfgLoot.... Looks very similar to the old Building_spawnLoot.sqf.... But the builing_spawnloot.sqf is now changed up, has anyone figured a way to get custom loot tables to work with 1.7.7? Would like to know, and I'm sure others would too.
That file is the new loot table. The question is, as Kevin said, how do we get our servers to use a customized version of this file instead of the stock one?
#include "cfgBuildingLoot.hpp"
- CfgBuildingLoot.hpp
- CfgBuildingPos.hpp
- CfgLoot.hpp
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
call compile preprocessFileLineNumbers "Fixes\compiles.sqf"; //Compile regular functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf" ;
call compile preprocessFileLineNumbers "Fixes\variables.sqf";
Step 3: from your mods dayz_code, copy over init\loot_init.sqf, make the appropriate configFile to missionConfigFile changes.
Step 4: Open the variables.sqf, find:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\loot_init.sqf";
and change the path to your modified loot_init.sqf, usually dayz_code\init\oot_init.sqf if your dayz_code folder is in your mission pbo root or "Fixes" folder.
Step 5: From the dayz_code compiles folder, I copied over files (in "Fixes" folder) such as building_spawnLoot, building_spawnZombies, player_spawnCheck. spawn_loot, zombie_generate.. Your list may differ slightly, so open all the files and do a search for cfgBuildingLoot and cfgLoot and make sure any configFile >> are changed to missionConfigFile >>, ignore instances of cfgVehicle, etc. leave those as they are.
For each file you will need to copy into your mission pbo and override it in the compiles.sqf
Server Side PBO:
This may differ depending on the mod, so I suggest you open each file and do a search:
You're looking for this: configFile >> "CfgBuildingLoot" ... According to arma 2 wiki, configFile looks into the mods folder root. so replace that with missionConfigFile >> "CfgBuildingLoot"
Note: You may also find cfgLoot, you'll want to modify it like above.
You want to replace every instance only for the "CfgBuildingLoot" from configFile to missionConfigFile. ignore instances of cfgVehicle, etc. leave those as they are.