Changing Loot Tables

Kflo

Well-Known Member
I would like to know is there anyway to add AKM mags and AK-74 Mags to ammo boxes and have them in the loot table.
It never made sense to me fit this is a Eastern Bloc country and you have DMR boxes, STANAG boxes but you dont have any AKM boxes.

I liked to add a box with say 10 AKM mags, 10 AK-74 Mags, 10 AK-74 SD mags

Then have them in the loot table to spawn at places the other boxes spawn at like barracks, heli crash sites etc.

Where in the code do I look to do this? How do I do this? Is it even possible and is it hard?
 
Hi,

Here, i made something for you, thanks to this tutorial. I'm not sure if it works but give it a try. Credits to this tutorial.



1.

Get custom loot tables working. Here you can find a less than 5 min install tutorial.

After that create a file called. spawn_rmod_loot.sqf and put this in it. PLACE THE FILE IN fixes\compile\spawn_rmod_loot.sqf IN YOUR MISSION FILE.

2.


Go to your compiles.sqf that you should have gotten with your custom loot tables and find:
Code:
spawn_loot = compile preprocessFileLineNumbers "fixes\compiles\spawn_loot.sqf";

after that paste in:

Code:
spawn_rMod_loot = compile preprocessFileLineNumbers "fixes\compiles\spawn_rmod_loot.sqf";

3.
Go to spawm_loot.sqf that you just added to your mission folder with the custom loot tables, and find:

Code:
case "object": {
        //Item is one magazine
        _item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
    };
 
After this line paste in:
Code:
case "ammobox": { // added for spawning misc crates/boxes at crash sites
        _item = [_iItem, _iPos, _radius] call spawn_rMod_loot; // compiles.sqf - ^bdc
    };


4.

In you CfgBuildingLoot.hpp in you mission file, add in the military section these lines.

Code:
{"AK_MAGS","rModBox",0.45},

And that should spawn your ammo box, hopefully.
Tell me if you have any problems.
 
Back
Top