100% Custom Loot tables - TUTORIAL

Would it be possible to change the types of zombies spawning in certain buildings with the same technique, using a server side fix?
 
I managed to get mine to load in the server but its a real slow load and some people just get stuck on a black "loading" screen, Military tents and wrecks in the road are gone as well just like most everybody elses, did not check the helicrash loot though
 
This works good, but I can't find where I can alter the loot inside a randomly spawned MedBox0 (like in a Hospital)?
I'd like to be able to add AntiBiotics as an additional item you'd find in a MedBox.
Any ideas?
 
Hi, I was wondering which init.sql file you were referring to in the directions, and why my app data log isn't showing the SPAWNING WITH CUSTOM LOOT. Should I post my missions.pbo? Thanks a bunch!
Also, I keep getting an error like "cannot find custom\variables.sqf" even though I changed the destination in my init.sqf. I have no idea. Thanks!
Scratch all that, my new problem is when I am about to spawn on the map (at the screen where you normally push 'continue') a message pops up saying "Script fixes\building_spawnLoot.sqf // Set Tonemapping not found" I hear all the ambient noise (wind, birds, etc.) and when I hit 'm' it acts like I have a map, but all I get is a black screen after the 'continue' screen. Can anyone help??
Thanks!
UPDATE.....*again* (I've been tinkering with this for a bit): I get this error in my logs:
Error in expression <ding_spawnLoot.sqf

// Set Tonemapping
"Filmic" setToneMappingParams [0.153, 0.3>
Error position: <Filmic" setToneMappingParams [0.153, 0.3>
Error Missing ;

File mpmissions\__CUR_MP.chernarus\init.sqf, line 30
Error in expression <ding_spawnLoot.sqf

// Set Tonemapping
"Filmic" setToneMappingParams [0.153, 0.3>
Error position: <Filmic" setToneMappingParams [0.153, 0.3>
Error Missing ;
File mpmissions\__CUR_MP.chernarus\init.sqf, line 30
Error in expression <ding_spawnLoot.sqf

// Set Tonemapping
"Filmic" setToneMappingParams [0.153, 0.3>
Error position: <Filmic" setToneMappingParams [0.153, 0.3>
Error Missing ;
File mpmissions\__CUR_MP.chernarus\init.sqf, line 30
Invalid path (only relative paths supported): 'C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowhead\MPMissions\dayz_1.chernarus\loot_init.sqf'
Warning Message: Script fixes\building_spawnLoot.sqf

// Set Tonemapping
not found
"DEBUG: loadscreen guard started."
I don't know what it means. lol. Any help is appreciated.
Scratch that AGAIN. lol. I am making changes, lots. Now I have a new problem that I can't figure out. Everything is working except I don't get no loots. So, I looked in my rpt log and found this multiple times:
"Survivors:1, FPS:17, FPSMin:17"
"SpawnCheck Loc.Agents: 6/16. Models: 7/42 W.holders: 0/68 (radius:220m 17fps)."
"CLIENT: Conscious..."
Error in expression <_index","_LootClass"];
_obj = _this select 0;
_type = typeOf _obj;
_config>
Error position: <select 0;
_type = typeOf _obj;
_config>
Error select: Type Object, expected Array,Config entry
File mpmissions\__CUR_MP.chernarus\Fixes\building_spawnLoot.sqf, line 3
Again, I can't decipher it at all. Any kind of help is greatly appreciated!
 
okei i tried to do what the first post said and no loot spawned, here is the building_spawnLoot and yeah know it says txt after sqf but i have made another one after i found that out but the one i used and that is the same.

http://www.mediafire.com/view/ov8qozwxandrhuw/building_spawnLoot.sqf.txt

and i took a look in my rpt log and it said this:
"Survivors:1, FPS:40, FPSMin:32"
"SpawnCheck Loc.Agents: 11/28. Models: 11/55 W.holders: 0/55 (radius:200m 32fps)."
Error in expression <Class"];

_obj = _this select 0;
_type = typeOf>
Error position: <select 0;
_type = typeOf>
Error select: Type Object, expected Array,Config entry
File mpmissions\__CUR_MP.chernarus\fixes\building_spawnLoot.sqf, line 5
 
I've tried this on dayz.st server. I have zero loot anywhere and "CLEANUP:TOTAL 52 LOOT BAGS" lines appearing in the RPT file.
 
okei i tried to do what the first post said and no loot spawned, here is the building_spawnLoot and yeah know it says txt after sqf but i have made another one after i found that out but the one i used and that is the same.

http://www.mediafire.com/view/ov8qozwxandrhuw/building_spawnLoot.sqf.txt

and i took a look in my rpt log and it said this:
"Survivors:1, FPS:40, FPSMin:32"
"SpawnCheck Loc.Agents: 11/28. Models: 11/55 W.holders: 0/55 (radius:200m 32fps)."
Error in expression <Class"];

_obj = _this select 0;
_type = typeOf>
Error position: <select 0;
_type = typeOf>
Error select: Type Object, expected Array,Config entry
File mpmissions\__CUR_MP.chernarus\fixes\building_spawnLoot.sqf, line 5

You haven't changed the configFile >> "CfgBuildingLoot" >> _type; to missionConfigFile >> "CfgBuildingLoot" >> _type;
 
You haven't changed the configFile >> "CfgBuildingLoot" >> _type; to missionConfigFile >> "CfgBuildingLoot" >> _type;
I am having the same problem, and all of the instances where it said configfile >> "CfgBuildingLoot" in all of the files I changed to missionConfigFile >> (etc.). However, it doesn't work. Here is the path to my mission file, if that helps "C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowhead\MPMissions\dayz_1.chernarus\Fixes". Could it be because I am using DayzCC?
Thanks!
 
Anyone else? No one other than lazyink (Thanks for the response, by the way!) has any kind of a solution? I don't mean to sound like a whiner, but I would love to be playing this game again, but I haven't been able to for the last 2 weeks. Also, I was looking around in my files, could the problem be from the fact that I don't actually have a config file in my mission folder? If it is, where would I get one and how would I set it up?
Thank you for any kind of a reply!
 
Just like to say this workaround works a dream on my Reality Server. V1.7.7.1 has loot again! :)

Now if only I can figure out how to alter/add loot positions in buildings.

In CfgBuildingPos.hpp it has:

Code:
class Land_kulna: Residential {
        lootPos[] = {{0.503174,0.217773,-1.11633},{-0.498291,1.92871,-1.12811}};

This makes it clear how to add extra spawn points.
But anyone know what these coords are relative to?

X,Y,H?

:)
 
One reason why some people might be getting no loot after tinkering is that they've altered the lootChance = line in the default class at the top of cfgBuildingLoot.hpp?

This class Default is how each building is initially set up. So making this variable lootChance with a high value is bad. Make it very low. Then the chance of a building having no loot is made rare. :)

Hope this helps.

Code:
class CfgBuildingLoot {
    class Default {
        zombieChance = 0.4;
        minRoaming = 0;
        maxRoaming = 5;
        zombieClass[] = {"zZombie_Base","z_hunter","z_teacher","z_suit1","z_suit2","z_worker1","z_worker2","z_worker3","z_villager1","z_villager2","z_villager3"};
        lootChance = 0.2;
        lootPos[] = {};
        lootType[] = {};
        hangPos[] = {};
        vehPos[] = {};
    };

Please correct me if I'm wrong. :)
 
One reason why some people might be getting no loot after tinkering is that they've altered the lootChance = line in the default class at the top of cfgBuildingLoot.hpp?

This class Default is how each building is initially set up. So making this variable lootChance with a high value is bad. Make it very low. Then the chance of a building having no loot is made rare. :)

Hope this helps.

Code:
class CfgBuildingLoot {
    class Default {
        zombieChance = 0.4;
        minRoaming = 0;
        maxRoaming = 5;
        zombieClass[] = {"zZombie_Base","z_hunter","z_teacher","z_suit1","z_suit2","z_worker1","z_worker2","z_worker3","z_villager1","z_villager2","z_villager3"};
        lootChance = 0.2;
        lootPos[] = {};
        lootType[] = {};
        hangPos[] = {};
        vehPos[] = {};
    };

Please correct me if I'm wrong. :)
Thank you for the suggestion! I looked at my default building lootChance and it was 0. I changed it to 0.2, but there was still no loot. Thanks a bunch for the suggestion, though!
 
Thank you for the suggestion! I looked at my default building lootChance and it was 0. I changed it to 0.2, but there was still no loot. Thanks a bunch for the suggestion, though!

I also got no loot when I had accidentally marked up an Item in cfgBuildingLoot.hpp as the wrong type.
ie I had set

{"ItemAntibiotic","generic",0.10}

which is incorrect instead of

{"ItemAntibiotic","magazine",0.10},

Maybe check your items have the right classification next to them in that file?

There are a lot of variables in variables.sqf that affect the spawning of loot, so careful editing needs to be done.

dayz_maxMaxWeaponHolders = 200
dayz_spawnArea = 50
dayz_safeDistPlr = 5
dayz_lootSpawnBias = 87
dayz_lootDelay = 3
dayz_lootWait = -100
dayz_spawnDelay = 120
dayz_spawnWait = -120


Is what I use.
 
I looked al
I also got no loot when I had accidentally marked up an Item in cfgBuildingLoot.hpp as the wrong type.
ie I had set

{"ItemAntibiotic","generic",0.10}

which is incorrect instead of

{"ItemAntibiotic","magazine",0.10},

Maybe check your items have the right classification next to them in that file?

There are a lot of variables in variables.sqf that affect the spawning of loot, so careful editing needs to be done.

dayz_maxMaxWeaponHolders = 200
dayz_spawnArea = 50
dayz_safeDistPlr = 5
dayz_lootSpawnBias = 87
dayz_lootDelay = 3
dayz_lootWait = -100
dayz_spawnDelay = 120
dayz_spawnWait = -120


Is what I use.
I looked all through my building_spawnLoot.sqf and I don't see anything wrong and nothing spawns, http://opendayz.net/threads/custom-loot-not-spawning.12226/
 
I looked al

I looked all through my building_spawnLoot.sqf and I don't see anything wrong and nothing spawns, http://opendayz.net/threads/custom-loot-not-spawning.12226/
Same here, I just fnished going through all my loot files, and everyting seems correct. Not wrong commas, or apostrophes, etc.
Also, in my .rpt file, I get this error, not sure if it is connected to the messed up stuff: "Invalid path (only relative paths supported): 'C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowhead\MPMissions\dayz_1.chernarus\loot_init.sqf'"
Thanks!
 
Same here, I just fnished going through all my loot files, and everyting seems correct. Not wrong commas, or apostrophes, etc.
Also, in my .rpt file, I get this error, not sure if it is connected to the messed up stuff: "Invalid path (only relative paths supported): 'C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowhead\MPMissions\dayz_1.chernarus\loot_init.sqf'"
Thanks!

You've got a wrong path referring to the loot_init.sqf file?

May I suggest you look in variables.sqf

It should read

//init global arrays for Loot Chances
call compile preprocessFileLineNumbers "fixes\loot_init.sqf";

and that file should be in the fixes folder inside your mission.

All original dayz sqf files copied from dayz_server.pbo that you've altered need to be in that fixes folder.


ie for me this is:

F:\STEAM\SteamApps\common\Arma 2 Operation Arrowhead\MPMissions\Mydayz_1.Chernarus\fixes
 
Back
Top