[Tutorial] Custom Loot Tables and Adjusting Spawn Rates

Personally I have never messed around with the new vanilla dayz at all, and it looks like they've changed a lot. But right from the start I can see that you're not using the Namalsk variables in those loot files.

building_spawnloot.sqf
(old)
Code:
_config = missionConfigFile >> dayzNam_buildingLoot >> _type;

(new)
Code:
_config = (missionConfigFile >> "CfgLoot" >> "Buildings" >> _type);

You're of course missing the entire CfgBuildingLootNamalsk.hpp.

You seem to have duplicated the buildings folder. One is in the root, the other is in the Groups folder.

I'm not seeing a loot_init.sqf which appears to be pretty important for the old Namalsk servers because it's loaded with Namalsk variables.
loot_init.sqf
http://pastebin.com/n1GGaJkj
 
Personally I have never messed around with the new vanilla dayz at all, and it looks like they've changed a lot. But right from the start I can see that you're not using the Namalsk variables in those loot files.

building_spawnloot.sqf
(old)
Code:
_config = missionConfigFile >> dayzNam_buildingLoot >> _type;

(new)
Code:
_config = (missionConfigFile >> "CfgLoot" >> "Buildings" >> _type);

You're of course missing the entire CfgBuildingLootNamalsk.hpp.

You seem to have duplicated the buildings folder. One is in the root, the other is in the Groups folder.

I'm not seeing a loot_init.sqf which appears to be pretty important for the old Namalsk servers because it's loaded with Namalsk variables.
loot_init.sqf
http://pastebin.com/n1GGaJkj

That is for dayz 1.7.7.1, it wouldn't work on dayz 1.8.8.
Loot_init has been taken out in dayz 1.8.8, which makes everything easier but also more difficult ;)

Main point is, the lootspawning works and is configurable for all the chernarus buildings (can edit type and positions without a problem). The moment I add a namalsk class building to the same file, the chern buildings keep on spawning loot but the namalsk buildings remain barren.
 
I recall a file that held the actual loot positions. There are programs out there that allow you to go into the map editor, enter a building, and retrieve coordinates for loot spawns. I wonder if thats what you're missing?
 
I recall a file that held the actual loot positions. There are programs out there that allow you to go into the map editor, enter a building, and retrieve coordinates for loot spawns. I wonder if thats what you're missing?

Nope, have all the classnames and their loot positions entered into the files
 
I might be able to put you in touch with a guy who could help. He runs an Namalsk Overpoch server, but he knows his stuff better than I do and could help shed some light possibly. He runs Dawn Patrol. He goes by Kobayashi.
http://www.dawnpatroldayz.com/

I haven't spoken with him in awhile. I'll see if I can get ahold of him on steam tonight.
 
At some point (you can look at the versions), they way the loot code gets called changed in dayzmod. player_spawnCheck.sqf is the file that calls building_spawnLoot.sqf, but ONLY for buildings that already have their class defined.
Code:
    _config = configFile >> "CfgLoot" >> "Buildings" >> _type;
    _canSpawn = isClass (_config);

So, you need to pull player_spawnCheck,sqf (and all related files) into the mission. While its defined in compiles.sqf, there is a hardcoded call to it in sched_spawnCheck.sqf. So then you need to go backward from there. It's possible, but messy. I gave up after a while.

What I can tell you that is helpful, is that lootpos + zedpos for buildings in napf, namalsk, lingor, sharani and panthera have been checked into core dayzmod and will make it into the next patch (and no, I don't know when that will happen).
 
core dayzmod has been modified to support many other maps, namalsk included. I never got as far as trying to get all the other features working, but I've heard that others got some of it (like EMP).

The problem is that Namalsk contained a copy of dayzmod embeded in it. so if you want to use the old one, you have to download old dayzmod. If you want hte new one, it doesn't have all the stuff.
 
Back
Top