100% Custom Loot tables - TUTORIAL

I got a problem seven my loot doesn't seem to spawn and i did everything correctly?
 

Attachments

  • dayz_mission (1).pbo
    667 KB · Views: 91
The problem is you are using a lot of custom additions already, so your modified compiles.sqf is overriding the variable change for building_spawnLoot. since you are using this method, you would need to edit your compiles.sqf on line 27 and change it to
Code:
building_spawnLoot = compile preprocessFileLineNumbers "fixes\building_spawnLoot.sqf";
 
I am looking at your code you posted seven in the OP post. A few things are missing from your code such as all the food and the clothing. If I fail to add these back in will they no longer spawn? Or is "","food" spawning in the food array?
 
I am looking at your code you posted seven in the OP post. A few things are missing from your code such as all the food and the clothing. If I fail to add these back in will they no longer spawn? Or is "","food" spawning in the food array?
To add to this, there is a ton of stuff missing from these files, such as the ak107 which I have spawning through a substitution script on my server. I'd like to get rid of it but I need to know if I need to add it to this file.
 
Swamp - i don't think it can spawn because it's not allowed in normal DayZ code. You'd need to have an addon like @Rmod running for it to work and spawn in. (IE it's probably trying to spawn, but your client doesn't allow it so it either places nothing in it's place, or re-rolls on the list).

The easiest way to add custom items is to do what the OP (seven) suggested to the tables, inserting the newer gun codes you're wanting to add into the drop table. Then, make it a requirement for people to load @Rmod to play on your server (Rmod helps skip the limitation of DayZ on all weapons and most vehicles).

The "better" way to do it would be to alter the @DayZ code to allow for exactly what you're after, so nobody would need the @Rmod... but they would need the new version of @DayZ you are creating.


(In short, there's no easy way to load in new guns or new vehicles without altering some code that the clients will need to download to play.)
 
I just put them on my npcs, makes a nice gift for someone or s group that takes them out lol. <3 M8_sharpshooter no need for rmod or anything either.
 
  • Like
Reactions: Cur
I do the same thing swamp. You are pretty much able to put whatever you want on them. If you notice an ai walking around without a gun you know you need to change it.
 
The problem is you are using a lot of custom additions already, so your modified compiles.sqf is overriding the variable change for building_spawnLoot. since you are using this method, you would need to edit your compiles.sqf on line 27 and change it to
Code:
building_spawnLoot = compile preprocessFileLineNumbers "fixes\building_spawnLoot.sqf";

That didn't work sadly no loot is spawning, when i use a default building_spawnloot loot spawns?
 
So it is fair to say that redirecting Dayz to use the building_spawnloot in the mission file will change all the loot spawned. So if I were to leave something out of the building_spawnloot fix it won't spawn in the game.
 
I am looking at your code you posted seven in the OP post. A few things are missing from your code such as all the food and the clothing. If I fail to add these back in will they no longer spawn? Or is "","food" spawning in the food array?


Food as a whole will drop all the required food, I never added the extra changes needed for spawn_loot.sqf to change food since this isn't really a needed change.

So it is fair to say that redirecting Dayz to use the building_spawnloot in the mission file will change all the loot spawned. So if I were to leave something out of the building_spawnloot fix it won't spawn in the game.


Yes if you remove something from the tables it will not spawn anymore. This code stops reading the original tables and uses the custom ones you draw up in building_spawnloot.sqf
 
Can the loot CLASSES be altered?

I'd like to change what they contain within them, seeing as how a bunch of them have meds and food/water in them, and I'd rather not have that happen.... But I'd still like to maintain the flares/chemlights and water bottles .. so would I have to put those in as individual drops in the loot tables or how would I change the "generic" table?

Also is it possible to have EMPTY jerry cans spawn by simply inserting the item ID for it into the loot table (would prefer a mix of empty and filled jerry)
 
Can the loot CLASSES be altered?

I'd like to change what they contain within them, seeing as how a bunch of them have meds and food/water in them, and I'd rather not have that happen.... But I'd still like to maintain the flares/chemlights and water bottles .. so would I have to put those in as individual drops in the loot tables or how would I change the "generic" table?

Also is it possible to have EMPTY jerry cans spawn by simply inserting the item ID for it into the loot table (would prefer a mix of empty and filled jerry)


I would assume an easy fix were to remove those ""generic ""military ""trash and just insert that IDs. Makes sense from what he has presented in the thread.
 
Well seeing as the list of items that can exist in "Generic" or "military"... are absolutely massive, adding that to each and every loot table would A) Lead to loot piles with say.. 1 flare spawning in spot. Rather than a mixture of small items or perhaps the mixture with your primary item..
 
Food as a whole will drop all the required food, I never added the extra changes needed for spawn_loot.sqf to change food since this isn't really a needed change.




Yes if you remove something from the tables it will not spawn anymore. This code stops reading the original tables and uses the custom ones you draw up in building_spawnloot.sqf
No you are wrong there i fixed my problem i was missing a comma [derp] but i have removed many things out of the list such as M107/M4a1 cco sd and added different things into it and for hunting i got rid of junk spawn and it still works 100%
 
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.
 
Is working great so far, just one thing I noticed. I do not have tents spawning in with the building_spawnloot, forgot to put them in. Even though I left it out of the supermarket I had 7 tents spawn in one. That doesn't seem right. Does generic include these tents?
 
tents are there own object "WeaponHolder_ItemTent", if you managed to spawn 7 in one building, then your chance values are out of sync and you have managed to make tents common. Tents have a standard spawn rate of 0.01.
 
Back
Top