100% Custom Loot tables - TUTORIAL

Hey Seven, on my server we have removed the 50 cal sniper rifles, the AS50's were easy, just edited the crash site loot, the m107 has been removed but for some reason ammo still spawns? I am assuming this has to do with ["","military"].
So is there anyway to edit what spawns in the random military loot?
 
I'm interested in changing the contents of the ammo boxes, but I can't seem to find where to do that seeing as they are just spawned in like items with no note of whats in them. Would anyone be capable of directing me to the right location to do this? I've had no luck looking thus far.
 
I never said they didn't work, I said I never put in the extra changes to allow changes to the sub categories of food, trash, generic, etc. To modify them sub categories you need to make changes to spawn_loot.sqf. But you can remove and add them as a whole no problem using my edit.
Sorry for the double post, but I noticed this and I am interested in changing them. Would it be possible for you to put together a set of instructions on how to do this as well? It'd be much appreciated.
 
Hey could someone help me out? I followed the tutorial but my loot wont spawn :confused:
 

Attachments

  • dayz_1.chernarus.pbo
    228.7 KB · Views: 9
Does this work with HFB servers? Thanks Seven!
I never have worked with any specific companies so don't know what changes they use or which build of private code they use, but this code uses very little changes so should work fine with any build.

Hey Seven, on my server we have removed the 50 cal sniper rifles, the AS50's were easy, just edited the crash site loot, the m107 has been removed but for some reason ammo still spawns? I am assuming this has to do with ["","military"].
So is there anyway to edit what spawns in the random military loot?
I will add the code when I have time to show what changes need made to spawn_loot.sqf to allow this fix.

I'm interested in changing the contents of the ammo boxes, but I can't seem to find where to do that seeing as they are just spawned in like items with no note of whats in them. Would anyone be capable of directing me to the right location to do this? I've had no luck looking thus far.
Ammo boxes are predefined objects with predefined items, none of the dayz code actually handles this, but you could run a check on that specific object, then overwrite its inventory once it has spawned.
 
Would this work for adding new spawn points to non-spawning buildings, eg LDC? After looking thru the posts i'm not seeing anything about assigning new loot points...
 
Ammo boxes are predefined objects with predefined items, none of the dayz code actually handles this, but you could run a check on that specific object, then overwrite its inventory once it has spawned.

I like the way you think, unfortunately I'm running into problems actually doing it. I've done some research and found out how to overwrite the inventory easily enough, but actually checking for the specific object is where I'm lost. Would it be possible for you to give me some guidance in that area?
 
TylerB, I got this working (A little editing seemed to break it, even though I checked over they syntax of it several times, and all looked fine)
However if you like, I could take a look at it for you
 
TylerB, I got this working (A little editing seemed to break it, even though I checked over they syntax of it several times, and all looked fine)
However if you like, I could take a look at it for you
Yea if you could help me out that would be great I tried to fix it but I'm not experienced. I posted my pbo file in my post above. Thanks man
 
Quick question

What is the problem exactly?
All looks fine to me
On my server however, the loot is edited correctly, though when it spawns, it does not show the message in the RPT. I tested it was still working by changing a Barracks to always spawn a GPS (9.99 chance), went to one in game and there were loads of them =p
Give something like that a try to see if it works or not
 
I took a look at his mission PBO as well, and it looks fine to me. He hasn't yet modified the custom loot table to add any items, which means it is still Seven's unaltered code pasted directly from his pastebin. Nevertheless, I went line by line through his building_spawnLoot.sqf and found no errors in syntax, etc. The only thing I can come up with, is that he is running a custom compiles.sqf through his init.sqf, and possibly that could be causing a problem. Also, perhaps he should rename his server mission PBO to "dayz_mission" and using PBO manager, add the word "prefix" to the PBO properties-> property field, and "z\addons\dayz_server" to the value field. That is about all I can come up with.
 
If I'm running a custom compiles through my init how would I know? Also @zakun the loot won't spawn in the server. Like no trash or anything
 
Line 23 in init.sqf
Code:
call compile preprocessFileLineNumbers "compiles.sqf";

Line 6 in your custom compiles.sqf
Code:
_config =configFile >> "CfgLoot";
 
No, I was just showing you that there are some changes in there that could very well be causing problems with your custom loot file.
For example, line 25 of the custom compiles.sqf
Code:
building_spawnLoot =compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";

That will surely be causing a problem
 
Back
Top