100% Custom Loot tables - TUTORIAL

Well you've got an error in your files somewhere.
I suggest you start again from fresh and get normal loot spawns working again and redo the mod.
It does work. :)
Yea I rewrote it and it worked, after I looked back at my pastebin in the itemchance values I actually was missing a , for a Mk17 magazine.
 
Your building_spawnLoot.sqf is a complete mess! :)

mine looks like this:

Code:
private ["_obj", "_type", "_config", "_positions", "_itemTypes", "_lootChance", "_countPositions", "_bias",
"_rnd", "_iPos", "_nearBy", "_index", "_weights", "_cntWeights", "_itemType", "_qty"];

_obj = _this;
_type = typeOf _obj;
_config = missionconfigFile >> "CfgBuildingLoot" >> _type;
_positions = [] + getArray (_config >> "lootPos");
_itemTypes = [] + getArray (_config >> "lootType");
_lootChance = getNumber (_config >> "lootChance");
_countPositions = count _positions;
_qty = 0; // effective quantity of spawned weaponholder

// bias for this building. The lower it is, the lower chance some of the lootpiles will spawn
_bias = 50 max dayz_lootSpawnBias;
_bias = 100 min _bias;
_bias = (_bias + random(100-_bias)) / 100;
//diag_log(format["BIAS:%1 LOOTCHANCE:%2", _bias, _lootChance]);
{
    if (count _x == 3) then {
        _rnd = (random 1) / _bias;
        _iPos = _obj modelToWorld _x;
        _nearBy = nearestObjects [_iPos, ["ReammoBox"], 2];

        if (count _nearBy > 0) then {
            _lootChance = _lootChance + 0.05;
        };
            
        if (_rnd <= _lootChance) then {
            if (count _nearBy == 0) then {
    //diag_log (str(dayz_CBLBase));
    //diag_log ("_type: " +str(_type));
                _index = dayz_CBLBase find _type;
    //diag_log ("index: " +str(_index));
                _weights = dayz_CBLChances select _index;
    //diag_log ("weights: " +str(_weights));
                _cntWeights = count _weights;
    //diag_log ("cntWeights: " +str(_cntWeights));
                _index = floor(random _cntWeights);
    //diag_log ("_index: " +str(_index));
                _index = _weights select _index;
    //diag_log ("_index: " +str(_index));
                _itemType = _itemTypes select _index;
    //diag_log ("_itemType: " +str(_itemType));
    //diag_log format["Item: %1, Group: %2", _itemType select 0, _itemType select 1];
                [_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot;
                _qty = _qty +1;
            };
        };
        sleep ((random 3) / 1000);
    } else {
        diag_log(format["%1 Illegal loot position #%3 from %2 in building %4 -- skipped", __FILE__,
                        configName _config, _forEachIndex+1, typeOf _obj]);
    };
} forEach _positions;

_qty
 
Hey guys, new to these forums. I have followed the initial guide to the letter. I have tried couple of times and finally i think i have it right. However...

This error has raised its ugly head every time i try to join my server now:

ErrorMessage: Include file mpmissions\__cur_mp.Chernarus\cfgBuildingLoot.hpp
respawn = not found.

(This is the first time I've ever even seen this \__cur_mp.Chernarus\ file, not to mind be lead to believe that this is the mission file the guide refers to.)

As far as i can tell, this may be because i have the mission file in the wrong place, or the server is trying to address the wrong mission folder.

My question: The name of my mission file is dayz_1.chernarus. Does this need to be in pbo form, and where does it need to be placed? So far i have had it in the MPMissions folder in my arma2oa directory. Some guidance here would be very helpful.
 
The initial guide is invalid with 1.7.7. You should be following this now. I have had no issues with it other than it doesn't register my Admin Packs and Donor Packs as lootable items. (Which if anyone is running rmod2.1 and knows how to fix this I would greatly appreciate it!)

You also need to go through it thoroughly to ensure you did not miss any punctuations. 1 missed or out of place " or , or { will prevent any loot from loading what so ever.

Hopefully that helps.
 
ok so i've been at this for around 12 hours now and its really stating to get to me.

I only got my server 2 days ago so I'm kinda new to all of this

I'm trying to get NO trash loot to spawn (yet its still EVERYWHERE).
I tried to get LESS zombies around towns (yet they are EVERYWHERE).
I tried to get medical crates to spawn in hospitals (only trash spawns in there).

any help would be much appreciated, I will upload my dayz_mission folder for anyone that would have the time and patients to help me.................thank you in advance.

HTML:
http://www.mediafire.com/?ydagl6d030rtv3c
 
I tried all this. It doesn't work on 1.7.7.1. I removed all items from the loot list that are weapon holder item but they are still spawning. Can anyone confirm if they have this working on 1.7.7.1?
 
Having trouble getting this mod to work on my server, Server is Overwatch using 1.7.7.1, I am using the files from the @overwatch
I have followed all the steps on the tutorial, except it will not work, I can get 10000000 zombies to spawn but not a single loot. I dont know what i did wrong.

Is the description.ext suppose to look like this at the top? or did i put #include "CfgBuildingLoot.hpp" to far? it did say VERY top. Or would my issue by something more? any help would be appreciated.

#include "CfgBuildingLoot.hpp"
respawn = "BASE";
respawndelay = 5;
onLoadMission= "DayZ Chernarus";
OnLoadIntro = "Welcome to Chernarus";
OnLoadIntroTime = False;
OnLoadMissionTime = False;
disabledAI = true;
disableChannels[]={0,2,7};
enableItemsDropping = 0;
onPauseScript = "";
briefing = 0;
debriefing = 0;
 
Yea i cant get this to work in 1.8, if anyone knows how a tutorial would benefit pretty much all private server admins.

:)
 
When i changed to path of this file to the mission.pbo then i got this error .. dont know why everything seems fine .. loot spawns , zombies spawns hmmm

Code:
[_itemType select 0, _it>
  Error position: <select _index;
 
[_itemType select 0, _it>
  Error Zero divisor
File mpmissions\__CUR_MP.chernarus\dayz_code\compile\building_spawnLoot.sqf, line 30
Error in expression < select _index;
 
anybody got a working 1.8.3 copy, and would post it for dl?

The Weapons spawn rarely and without ammo, everytime.
 
Back
Top