[Tutorial] Custom Loot Tables and Adjusting Spawn Rates

Discussion in 'Tutorials' started by AVendettaForYou, Jun 25, 2013.

  1. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    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
     
  2. Zeehond23

    Zeehond23 Valued Member!

    Joined:
    Mar 7, 2013
    Messages:
    596
    Likes Received:
    52
    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.
     
  3. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    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?
     
  4. Zeehond23

    Zeehond23 Valued Member!

    Joined:
    Mar 7, 2013
    Messages:
    596
    Likes Received:
    52
    Nope, have all the classnames and their loot positions entered into the files
     
  5. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    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.
     
  6. Zeehond23

    Zeehond23 Valued Member!

    Joined:
    Mar 7, 2013
    Messages:
    596
    Likes Received:
    52
    That would be great man, thanks!
     
  7. clifdayz

    clifdayz Well-Known Member

    Joined:
    Jul 28, 2015
    Messages:
    142
    Likes Received:
    13
    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).
     
    DangerRuss likes this.
  8. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    Sounds like one of those things where you end up dumping half of your dayz_code into the mission file
     
  9. Zeehond23

    Zeehond23 Valued Member!

    Joined:
    Mar 7, 2013
    Messages:
    596
    Likes Received:
    52
    Sure seems like it. Although it would be a "fun" project.

    @clifdayz
    Wouldn't the scheduler ran clientside produce problems though?
     
  10. clifdayz

    clifdayz Well-Known Member

    Joined:
    Jul 28, 2015
    Messages:
    142
    Likes Received:
    13
  11. Greg798

    Greg798 New Member

    Joined:
    Nov 5, 2012
    Messages:
    9
    Likes Received:
    1
    Hi. Somebody could introduce loot and the zombie of Namalsk 0.75 on dayz 1.8.9? How did you make it?
     
  12. clifdayz

    clifdayz Well-Known Member

    Joined:
    Jul 28, 2015
    Messages:
    142
    Likes Received:
    13
    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.
     
  13. Greg798

    Greg798 New Member

    Joined:
    Nov 5, 2012
    Messages:
    9
    Likes Received:
    1

Share This Page