Jump to content
tinymouse

Need help with custom faction

Recommended Posts

So I've been working on this for about 72+ hours I built the config fig file and my faction is present in the game, but if I change the side to anything but BLUFOR the uniform class seems to stop working. I really don't know what to do at this point and any help would be greatly appreciated. 

class CfgPatches
{
    class unit_config
    {
        units[] = {
            "CusFac_Riffleman",

        };
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
    }
};
class CfgFactionClasses
{//Faction Class for units ie Nato --> PMC
    class CusFac
    {
        displayName = "PMC"; // Faction name but will be changed by Editor Categorie
        author = "Kebable";
        priority = 0;
        side = 2;
    }
};
class CfgVehicleClasses
{//subclass for untis ie Nato --> PMC --> Men --> UNIT (outdated game required use CfgEditorSubcategories
    class CusFac_Units
    {
        displayName = "Car2";
    }
};
class CfgEditorCategories
{
    class CusFac_Main_PMC
    {
        displayName = "PMC2";
    }
};
class CfgEditorSubcategories
{// Sub cat maker for editor use this instead of CfgVehicleClasses
    class CusFac_Sub_Men
    {
        displayName = "Car";
    }
};
class CfgVehicles 
{
    class B_Soldier_base_F;
    class CusFac_Riffleman:B_Soldier_base_F
    {
        _generalMacro = "CusFac_Riffleman";
        scope = 2;
        scopeCurator = 2;
        displayName = "Riffleman";
        faction = "CusFac"; //use to asign category for faction, vics, and people
        VehicleClass = "CusFac_units"; //not used but still required
        //editorCategory = "CusFac_Main_PMC"; //sub category for unit, use for props
        editorSubcategory = "CusFac_Sub_Men"; //should be used with all assets
        side = 2;

        nakedUniform = "U_BasicBody";
        uniformClass = "U_B_CombatUniform_mcam_tshirt";
        backpack = "B_AssaultPack_khk";

        identityTypes[] = {"Head_NATO","LanguageENG_F","G_NATO_default"};


        linkedItems[] = {"V_PlateCarrier1_rgr","H_HelmetB","ItemMap","ItemRadio","ItemCompass","ItemWatch","NVGoggles"};
        respawnlinkedItems[] = {"V_PlateCarrier1_rgr","H_HelmetB","ItemMap","ItemRadio","ItemCompass","ItemWatch","NVGoggles"};

        weapons[] = {"arifle_MX_ACO_pointer_F","hgun_P07_F"};
        respawnWeapons[] = {"arifle_MX_ACO_pointer_F","hgun_P07_F"};

        magazines[] = {"30Rnd_65x39_caseless_mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"};
        respawnMagazines[] = {"30Rnd_65x39_caseless_mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"};

    }
};

 

Share this post


Link to post
Share on other sites

Hi, it also happened to me. Don't worry i found a solution. 

Change the classname B_Soldier_base_F to any classname of a soldier unit from your desired side (OPFOR, INDFOR, Civ). It took me 4 hours to figure it out.

 

Also thank you for showing your config on subclasses, it helped me fixing my own. 

 

Share this post


Link to post
Share on other sites

From what I can see, the "U_B_CombatUniform_mcam_tshirt" is set up to only be applied to BLUFOR and CIVILIAN sides. If you want to make sure it stays permanently I recommend either setting up your own uniform or to config override the original uniform unit to include the side/s you wish to use it on. Both have their pros and cons and will really come down to you making the decision that suits your needs the most.

For the second option, I haven't directly tested but try putting the "B_Soldier_02_f" lines I have put down below into your CfgVehicles class and add "A3_Characters_F" to your requiredAddons under CfgPatches and see if that rectifies your issues. Make the edits necessary but pay attention to the notes. 

class CfgPatches{
  class unit_config{
    units[] = {
      "CusFac_Riffleman"
    };
    weapons[] = {};
    requiredVersion = 0.1;
    requiredAddons[] = {
      "A3_Characters_F" // <--- This needs to be added to your requiredAddons[] because edits are being made to a class already established
    };
  }
};

class CfgVehicles{
  class B_Soldier_base_F;
  
  class B_Soldier_02_f: B_Soldier_base_F{
    // modelSides[]={3,1}; <--- Original line. If you intend on adding another side, you will need to include "3,1" otherwise vanilla stuff will break. 
    modelSides[]={0,1,2,3}; // 0-OPFOR, 1-BLUFOR, 2-GUER/INDP, 3-CIV [EXAMPLE]
  };
  
};

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×