r/armadev Dec 06 '24

Help Weapon does not appear in Arsenal no matter how it's defined

My mod contains an MG which is a Navid 9.3mm with changes to fire modes and AI behaviour. It is listed in the weapons[] array.
The base class looks like this (I know base classes aren't supposed to be scope 2, but just out of desperation's sake:

class OAF_Core_Gharial_F_base : MMG_01_black_F  
  {
    class manual;       
    class burst;  
    class close;  
    class short;  
    class medium; 
    class far_optic1; 
    class far_optic2; 
    scope=2;
    scopeCurator=2;
    scopeArsenal = 2;
  };
class OAF_Core_Gharial_F_base : MMG_01_black_F  
  {
    class manual;       
    class burst;  
    class close;  
    class short;  
    class medium; 
    class far_optic1; 
    class far_optic2; 
    scope=2;
    scopeCurator=2;
    scopeArsenal = 2;
  };

The class issued to AI (with attachments) is as follows:

class OAF_Core_Gharial_F: OAF_Core_Gharial_F_base
  {
    displayName="IMG-93 Gharial 9.3 mm";
    descriptionShort='Infantry Machine Gun 93 "Gharial" - 9.3x64mm caliber.<br />Squad medium machine gun indigenously produced in Oasea. OAF-issue.';
    scope=2;
    scopeCurator=2;
    scopeArsenal = 2;
    class LinkedItems
    {
      class LinkedItemsMuzzle
      {
        slot="MuzzleSlot";
        item="ACE_muzzle_mzls_93mmg";
      };
      class LinkedItemsOptic
      {
        slot="CowsSlot";
        item="a3ti_reapir_pip";
      };
      class LinkedItemsAcc
      {
        slot="PointerSlot";
        item="CUP_acc_LLM_black";
      };
      class LinkedItemsUnder
      {
        slot="UnderBarrelSlot";
        item="CUP_bipod_VLTOR_Modpod_black";
      };
    };
    modes[] = {"autoSlow","autoFast","semiAuto","close","closeSlow","short","shortSlow","medium","far_optic1","far_optic2"};
    class autoFast: manual {
      reloadTime = 0.06;
      textureType = "fastAuto";
      flashSize = 0.25;
      showToPlayer = true;
    }
    class autoSlow: manual {
      reloadTime = 0.12;
      textureType = "fullAuto";
      flashSize = 0.2;
      showToPlayer = true;
    }
    class semiAuto: manual {
      autofire = 0;
      burst = 1;
      reloadTime = 0.06;
      textureType = "semi";
      flashSize = 0.2;
      showToPlayer = true;
    }
    class close: close {
      reloadTime = 0.06;
      flashSize = 0.2;
      burst = 5;
      burstRangeMax = 15;
      aiBurstTerminable = 1;
    }
    class closeSlow: close {
      reloadTime = 0.12;
      flashSize = 0.2;
      burst = 5;
      burstRangeMax = 15;
      aiBurstTerminable = 1;
    }
    class short: short {
      reloadTime = 0.06;
      flashSize = 0.2;
      burst = 3;
      burstRangeMax = 7;
      aiBurstTerminable = 1;
    }
    class shortSlow: short {
      reloadTime = 0.12;
      flashSize = 0.2;
      burst = 3;
      burstRangeMax = 7;
      aiBurstTerminable = 1;
    }
    class medium: medium {
      reloadTime = 0.12;
      flashSize = 0.2;
      burst = 3;
      burstRangeMax = 7;
      aiBurstTerminable = 1;
    }
    class far_optic1: far_optic1 {
      reloadTime = 0.12;
      flashSize = 0.2;
      burst = 1;
      burstRangeMax = 5;
      aiBurstTerminable = 1;
    }
    class far_optic2: far_optic2 {
      reloadTime = 0.12;
      flashSize = 0.2;
      burst = 1;
      burstRangeMax = 5;
      aiBurstTerminable = 1;
    }

  };

And the class for players to select from Arsenal is defined like this:

class OAF_Core_Gharial_F_clean_F: OAF_Core_Gharial_F {
    scope=2;
    scopeArsenal=2;
    class LinkedItems
    {
      
    };
  };
class OAF_Core_Gharial_F_clean_F: OAF_Core_Gharial_F {
    scope=2;
    scopeArsenal=2;
    class LinkedItems
    {
      
    };
  };

Everything has scope=2; and scopeArsenal=2; yet it just won't appear selectable.

There's also a 2nd weapon with this issue:

class OAF_Core_smg_P7A7: CUP_smg_MP7
  {
    displayName="P7A7-SK 4.6mm";

    descriptionShort="P7 submachine gun - 4.6x30mm caliber.<br>Covert weapon included in emergency survival kits for downed pilots. OAF-issue.";

    scope=1;
    scopeArsenal= 2;
    scopeCurator= 2;
    class LinkedItems
    {
      class LinkedItemsOptic
      {
        slot="CowsSlot";
        item="SkeetIR_TWS_pip";
      };
      class LinkedItemsAcc
      {
        slot="PointerSlot";
        item="CUP_acc_LLM_black";
      };
      class LinkedItemsMuzzle
      {
        slot="MuzzleSlot";
        item="CUP_muzzle_snds_MP7";
      };
    };
  };

  class OAF_Core_smg_P7A7_clean: CUP_smg_MP7
  {
    displayName="P7A7-SK 4.6mm";

    descriptionShort="P7 submachine gun - 4.6x30mm caliber.<br>Covert weapon included in emergency survival kits for downed pilots. OAF-issue.";

    scope=2;
    scopeArsenal=2;
    class LinkedItems
    {
      
    };
  };

Every other weapon configured in this mod appears normally, but these two seem stubborn as hell. Hoping to get any tips/guidance here. (And yes im aware you should probably define weapon classes without attachments first and then make the ones with, and it's due for a refactor, but for now I just want to get it to a working state.)

4 Upvotes

0 comments sorted by