Adding custom ammunition to loot table

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding custom ammunition to loot table

Outlaw2101
Hello.

After successfully adding a significant amount of the default and RobertHammer's firearms to the Panthera loot table, it has come to my attention that whilst ammunition for these guns spawns with them, rounds do not spawn in the loot piles in military establishments. I have unsuccessfully attempted to add "100Rnd_762x54_PK" to the loot table by inputting the entry to the following class in the config.hpp in dayz_code.pbo

};
        class Military: Default {
                zombieChance = 0.3;
                maxRoaming = 6;
                zombieClass[] = {"z_soldier","z_soldier_heavy","z_policeman"};
                lootChance = 0.4;
                lootPos[] = {};
                itemType[] = {

I followed the correct criteria when adding new weapon as follows:

                        {"RH_m4cmkeotech","weapon"},
                        {"Pecheneg","weapon"},
                        {"RH_m39emr","weapon"},
                        {"RH_an94gl","weapon"},
                        {"RH_aks74uk","weapon"},
                        {"RH_bizon","weapon"},
                        {"RH_aks74mk","weapon"},
                        {"RH_aks74mkgl","weapon"},
                        {"RH_m4sbraim","weapon"},
                        {"100Rnd_762x54_PK","magazine"},
                        {"PK","weapon"},



The "100Rnd_762x54_PK" is there, but I am not too sure if this will have it spawn in the loot piles in military buildings. Can anyone provide assistance?

Cheers.
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom ammunition to loot table

Ripstop
Greetings,

I'm just dabbling in the coding and haven't looked at the file that you are modding.

Looking at your example though, I can see that you are trying to add a magazine to a weapon list. At some point the code is going to try to "addweapon" and skip over your magazine. It will need a "addmagazine" command to spawn. I think you may have added your magazine to the wrong list.

Maybe someone in the know will chime in and answer your question more effectively but my suggestion may be enough to help you continue looking for your solution.

Good luck.
Ripstop