Skip to content

Loot Lists

Ansible2 edited this page Jul 21, 2021 · 5 revisions

This page will explain a bit about loot lists and how to whitelist and blacklist loot items as of 0.9.0

Files To Edit:

https://github.com/Ansible2/Arma-3-Survival/blob/a9d7894c47a7a572986a009e614cb9b12d6a7ce6/Headers/descriptionEXT/Loot%20Lists/Main%20Loot%20List.hpp

  • Headers\descriptionEXT\Loot Lists\Main Loot List.hpp

https://github.com/Ansible2/Arma-3-Survival/blob/a9d7894c47a7a572986a009e614cb9b12d6a7ce6/Headers/descriptionEXT/Loot%20Lists/Define%20Loot%20Lists.hpp

  • Headers\descriptionEXT\Loot Lists\Define Loot Lists.hpp (BELOW 0.9.1)

The Master Loot List:

The Master Loot List is what's used for specifically whitelisting and/or blacklisting certain item classes across all potential custom lists. So if you desire an item to always be blacklisted, toss its class into the lootBlackList property array .(SEE NOTE 1)

class MasterLootList
    {
        lootBlackList[] = {
            "O_Static_Designator_02_weapon_F",
            "O_UAV_06_backpack_F",
            "O_UAV_06_medical_backpack_F",
            "O_UAV_01_backpack_F",
            "O_IR_Grenade",
            "I_IR_Grenade",
            "TrainingMine_Mag",
            "ChemicalDetector_01_watch_F",
            "ChemicalDetector_01_olive_F",
            "8Rnd_82mm_Mo_Flare_white",
            "muzzle_antenna_01_f",
            "V_Safety_yellow_F",
            "muzzle_antenna_02_f",
            "rhsusf_100Rnd_556x45_M200_soft_pouch_ucp",
            "rhsusf_100Rnd_556x45_M200_soft_pouch_coyote",
            "rhsusf_100Rnd_556x45_M200_soft_pouch",
            "rhs_mag_30Rnd_556x45_M200_Stanag",
            "rhs_mag_20Rnd_556x45_M200_Stanag",
            "rhsusf_100Rnd_762x51_m82_blank",
            "rhsusf_50Rnd_762x51_m82_blank",
            "hgun_Pistol_Signal_F"
        };

        lootWhitelist_launchers[] = {

        };

        lootWhitelist_primaries[] = {

        };

        lootWhitelist_handguns[] = {

        };

        lootWhitelist_backpacks[] = {

        };

        lootWhitelist_vests[] = {

        };

        lootWhitelist_uniforms[] = {

        };

        lootWhitelist_headgear[] = {

        };

        lootWhitelist_items[] = {

        };

        lootWhitelist_explosives[] = {

        };
    };

Create A Custom Loot List:

  1. Create a .hpp file inside the Headers\descriptionEXT\Loot Lists folder.
  2. Navigate to the Main Loot List.hpp in the same folder and scroll to the bottom. You'll see a class called CustomLootLists that looks something like this:
class CustomLootLists
{
    #include "SOG PF Loot List.hpp"
};
  1. Add a #include with the filename and extension that you created in step 1:
class CustomLootLists
{
    #include "SOG PF Loot List.hpp"
    #include "My File.hpp"
};
  1. Now go back to the .hpp file you created and copy this template to the file:
class myLootListClass
{
    title = "My Title";

    conditionWeapons = "";
    conditionClothes = "";
    conditionMagazines = "";

    patches[] = {   
    };

    checkForDuplicates = 0;

    lootBlackList[] = {
    };

    lootWhitelist_launchers[] = {
    };

    lootWhitelist_primaries[] = {
    };

    lootWhitelist_handguns[] = {
    };

    lootWhitelist_backpacks[] = {
    };

    lootWhitelist_vests[] = {
    };

    lootWhitelist_uniforms[] = {
    };

    lootWhitelist_headgear[] = {
    };

    lootWhitelist_items[] = {
    };

    lootWhitelist_explosives[] = {
    };
};
  1. Edit the list to your liking. For a breakdown of each properties' function look here.

CONTINUE IF BELOW 0.9.1

  1. Now navigate to the Define Loot Lists.hpp in the same folder as the rest of your work.
#define LOOT_LIST_VALUES \
    0,\
    1

// DO NOT CHANGE "OFF" POSITION
#define LOOT_LIST_STRINGS \
    "OFF", \
    "SOG PF Loot List"
  1. Add the exact spelling of the title property from you loot list to the #define LOOT_LIST_STRINGS and add a sequential number to the #define LOOT_LIST_VALUES (don't forget to add \ to any line that isn't the last one in the list). (SEE NOTE 2):
#define LOOT_LIST_VALUES \
    0,\
    1,\
    2

// DO NOT CHANGE "OFF" POSITION
#define LOOT_LIST_STRINGS \
    "OFF", \
    "SOG PF Loot List",\
    "My Title"
  1. Now launch the mission and from the mission parameter menu in the multiplayer lobby, scroll down to the Area Settings and find the Loot Whitelist Mode option. Select your list and launch.

NOTES

  1. Loot whitelists in the MasterLootList class will only be used when a custom loot list is. The blacklist will always be considered.
  2. Do not adjust the position of OFF in the LOOT_LIST_STRINGS, it always needs to be at index 0.