Jump to content
  • 1

Adding loot from the RHS


Teacher

Question

Hello! Dear friends, show for illustrative purposes how to add spawn loot items and weapons for example: I want to add the following classes

rhs_6b23_6sh116_flora
rhs_6b23_6sh116_vog_flora

rhs_weap_t5000
rhs_weap_svdp_wd_npz

rhs_weap_ak74mr
rhs_weap_ak74m_camo

 

add the example that is in the file CfgLootTable.h but nothing works, the topics that are on the forum, or not what you need, or deleted!

 

P.S. Is there somewhere in the compiler or something like exile, but on Epoch? well, or a detailed description that would alter this table?

 

Thanks in advance.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 29.10.2017 at 2:05 PM, Drokz said:

Those Items need to have a price. You need to have an entry in CfgLootTable.h and in CfgPricing.hpp too

Yes that's right, I handled it in about 20 minutes after writing the post, but some things I still don't understand, for example:

    class SniperRifle
    {
        items[] = {
                { { "SniperRiflem107", "CfgLootTable" }, 8 },

                // Marksman DLC
                { { "SniperRifleMarkDLC", "CfgLootTable" }, 10 },

                { { "srifle_LRR_F", "weapon" }, 11 },
                { { "srifle_GM6_F", "weapon" }, 16 },
                { { "srifle_DMR_01_F", "weapon" }, 17 },
                { { "SniperRifleM14", "CfgLootTable" }, 18 },
                { { "srifle_EBR_F", "weapon" }, 20 }
        };
    };
    // All Marksman DLC weapons without attachments
    class SniperRifleMarkDLC
    {
        items[] = {
                { { "srifle_DMR_02_F", "weapon" }, 1 },
                { { "srifle_DMR_02_camo_F", "weapon" }, 1 },
                { { "srifle_DMR_02_sniper_F", "weapon" }, 1 },
                { { "srifle_DMR_03_F", "weapon" }, 1 },
                { { "srifle_DMR_03_khaki_F", "weapon" }, 1 },
                { { "srifle_DMR_03_tan_F", "weapon" }, 1 },
                { { "srifle_DMR_03_multicam_F", "weapon" }, 1 },
                { { "srifle_DMR_03_woodland_F", "weapon" }, 1 },
                { { "srifle_DMR_04_F", "weapon" }, 1 },
                { { "srifle_DMR_04_Tan_F", "weapon" }, 1 },
                { { "srifle_DMR_05_blk_F", "weapon" }, 1 },
                { { "srifle_DMR_05_hex_F", "weapon" }, 1 },
                { { "srifle_DMR_05_tan_f", "weapon" }, 1 },
                { { "srifle_DMR_06_camo_F", "weapon" }, 1 },
                { { "srifle_DMR_06_olive_F", "weapon" }, 1 }
        };
    };
    class SniperRiflem107
    {
        items[] = {
                { { "m107_EPOCH", "weapon" }, 1 },
                { { "m107Tan_EPOCH", "weapon" }, 1 }
        };
    };
    class SniperRifleM14
    {
        items[] = {
                { { "M14_EPOCH", "weapon" }, 1 },
                { { "M14Grn_EPOCH", "weapon" }, 1 }
        };
    };

 

Here is the piece of code, if you can explain some points    

1.  What items "SniperRiflem107" and "SniperRifleM14" added to "class SniperRifle" and then they created more classes? Why "m107_EPOCH" "m107Tan_EPOCH" "M14_EPOCH" "M14Grn_EPOCH" could not be placed in "class SniperRifle"

 

2.  Why in this piece (and not only) { { "SniperRifleM14", "CfgLootTable" }, 18 }, instead of "weapon" is "CfgLootTable"

 

Why so many questions?

It's very simple, I want to remake the table for your server, but without this knowledge it is simply unrealistic especially without auto compiler too subtly made.

Thanks in advance for your answers!

 

P.S. As I am typing through a translator, some things may be not clear to you, don't be surprised!)

 

Link to comment
Share on other sites

  • 0

1. They could have been added to the class SniperRifle but each color would then have its own chance to spawn, this way there a 50/50 chance to spawn one of the classes on top of the other chances from the SniperRifle config.

2 . CfgLootTable usage allows for recursion of nested loot tables and chances.

Note: These numbers do not need to add up to 100 but it does make it easier to calculate chances and when you see a table with chances, all the same, it means they all have an equal chance to spawn.

Link to comment
Share on other sites

  • 0
1 hour ago, vbawol said:

1. They could have been added to the class SniperRifle but each color would then have its own chance to spawn, this way there a 50/50 chance to spawn one of the classes on top of the other chances from the SniperRifle config.

2 . CfgLootTable usage allows for recursion of nested loot tables and chances.

Note: These numbers do not need to add up to 100 but it does make it easier to calculate chances and when you see a table with chances, all the same, it means they all have an equal chance to spawn.

Thank you very much for the reply, now the picture is almost clear, only one point, and that the figure is at the end { { "srifle_DMR_02_F", "weapon" }, 1 }, if the drop chance, then what is the percentage and can it be trusted?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...