Jump to content
Sign in to follow this  
simonsd47

I wrote the character code does not work

Recommended Posts

class cfgPatches
{
    class AEW_ANA
    {
        requiredVersion=0.1;
        requiredAddons[]=
        {
            "A3_characters_f_beta",
            "A3_characters_f",
            "A3_weapons_f",
            "A3_Aegis_Characters_F_Aegis"
        };
        units[]= // classes from cfgVehicles
        {        
            I_Soldier_F,
            ANA_Soldier_base_F,
            ANA_Soldier_F,
            Headgear_ANA_hel_can_spec4,
            Item_ANA_hel_can_spec4
        };
        weapons[]= // classes from cfgWeapons
        {
            ANA_hel_can_spec4,
            ANA_fat_alpat_spec4
        };
    };
};
class cfgVehicles
{
    class I_Soldier_base_F;
    class ANA_Soldier_base_F: I_Soldier_base_F
    {
        author = "Simonsd47"; 
        scope = 1; //this means players can't access the the soldier in game
        editorPreview="\ANA\ANA\data\editPreview\editPreview_ANA.jpg";
        side=1;
        faction="ANA_F";
        vehicleClass="Men";
        model = "\A3\Characters_F_Beta\INDEP\ia_soldier_01.p3d"; //this defines the 3d model for the uniform
        hiddenSelections[] = {"Camo","insignia"};
        hiddenSelectionsTextures[] = {"\ANA\ANA\data\textuers\ANA_soldier_clothing.paa"};
        weapons[] = { "Aegis_arifle_M4A1_F", "Throw", "Put" };        
        respawnWeapons[] = { "Aegis_arifle_M4A1_F", "Throw", "Put" };    
        Items[] = { "FirstAidKit" };            
        RespawnItems[] = { "FirstAidKit" };        
        magazines[] = { "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green", "HandGrenade" };            
        respawnMagazines[] = { "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red", "SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green", "HandGrenade" };    
        linkedItems[] = { "V_HarnessOSpec_brn", "ANA_hel_can_spec4", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "NVGoggles_INDEP" };    
        respawnLinkedItems[] = { "V_HarnessOSpec_brn", "ANA_hel_can_spec4", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "NVGoggles_INDEP" };    
        };
    class Item_Base_F;
    class Item_ANA_fat_alpat_spec4: Item_Base_F
    {
        author = "Simonsd47";
        displayName = "Combat Fatigues[ANA]"; //In-game name of your uniform
        model = "\A3\Weapons_f\dummyweapon.p3d";
        editorCategory = "EdCat_Equipment";
        editorSubcategory = "EdSubcat_Uniforms";
        scope = 2;
        scopeCurator = 2;
        vehicleClass = "ItemsUniforms";
        
        class TransportItems
        {
            class ANA_fat_alpat_spec4 //make sure this matches the name of your uniform class in cfgWeapons
            {
                name = "ANA_fat_alpat_spec4"; //make sure this matches the name of your uniform class in cfgWeapons
                count = 1;
            };
        };
    };    
    class I_Soldier_A_F;                    
    class ANA_soldier_F: I_Soldier_A_F
    {
        author = "Sinmonsd47";    
        _generalMacro="ANA_soldier_F";        
        scope = 2;                    
        identityTypes[] = { "LanguagePER_F","Head_TK","G_NATO_default" };    
        editorPreview="\ANA\ANA\data\editPreview\editPreview_ANA.jpg";
        displayName = "Rifleman";
        camouflage=1.500000;
        uniformClass = "ANA_fat_alpat_spec4";            
        backpack="I_Fieldpack_oli_Ammo";
        hiddenSelections[] = { "camo","Insignia" };                    
        hiddenSelectionsTextures[] = { "\ANA\ANA\data\textuers\ANA_soldier_clothing.paa" };                    
        weapons[] = { "Aegis_arifle_M4A1_F", "Throw", "Put" };        
        respawnWeapons[] = { "Aegis_arifle_M4A1_F", "Throw", "Put" };    
        Items[] = { "FirstAidKit" };            
        RespawnItems[] = { "FirstAidKit" };        
        magazines[] = { "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green", "HandGrenade" };            
        respawnMagazines[] = { "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red","30Rnd_556x45_Stanag_red", "SmokeShell", "SmokeShellGreen", "Chemlight_green", "Chemlight_green", "HandGrenade" };    
        linkedItems[] = { "V_HarnessOSpec_brn", "ANA_hel_can_spec4", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "NVGoggles_INDEP" };    
        respawnLinkedItems[] = { "V_HarnessOSpec_brn", "ANA_hel_can_spec4", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "NVGoggles_INDEP" };    
        };
    class Headgear_Base_F;
    class Headgear_ANA_hel_can_spec4: Headgear_Base_F
    {
        scope = 2;
        scopeCurator = 2;
        displayName = "Modular Helmet[ANA SPEC4]";
        author = "Simonsd47";
        vehicleClass = ItemsHeadgear;
        class TransportItems
        {
            class ANA_hel_can_spec4
            {
                name="ANA_hel_can_spec4";
                count=1;
            };
        };
    };
};    
class cfgWeapons
{
    class UniformItem; 
    class Uniform_Base;
    class ItemCore;
    class HeadgearItem;
    class HelmetBase;
    class H_HelmetIA;
    class ANA_fat_alpat_spec4: Uniform_Base
    {
        author = "Simonsd47"; 
        scope = 2;    //scope 2 means this item is accessible in the arsenal
        displayName = "Combat Fatigues[ANA]"; //In-game name of your uniform
        picture = "\ANA\ANA\data\ui\icon_ANA_fat_alpat_ca.paa"; //UI picture of the item
        model = "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d"; //the 3d model of the clothes when placed on the ground
        hiddenSelections[] = {"camo"};
        hiddenSelectionsTextures[] = 
        {
            "\ANA\ANA\data\textuers\ANA_soldier_clothing.paa" //path to your texture, does not have to be the same as the uniform soldiers wear
        }; 

        class ItemInfo: UniformItem
        {
            uniformModel = "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d";
            uniformClass = ANA_Soldier_base_F; //has to match your uniform defining soldier
            containerClass = "Supply40"; //how much stuff your uniform can carry
            mass = 40;    //hom much your unifrom weights
        };
    };
    class ANA_hel_can_spec4: H_HelmetIA
    {
        author = "Simonsd47";
        scope = 2;
        weaponPoolAvailable = 1;
        displayName = "Modular Helmet[ANA SPEC4]";
        picture = "\ANA\ANA\data\ui\icon_NAA_hel_can_alpat_ard.paa";
        model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_plain";
        hiddenSelections[] = { "camo" };
        hiddenSelectionsTextures[] = { "\ANA\ANA\data\textuers\headgear_helmet_canvas_ANA.paa" };
         };
    };
class cfgFactionClasses
{
    class ANA_F
    {
        displayName="Afghan national army";
        priority=6;
        side=1;
        icon="\ANA\ANA\data\editPreview\cfgFactionClasses_ANA_ca.paa";
        flag="\ANA\ANA\data\editPreview\cfgFactionClasses_ANA_ca.paa";
    };
};

Share this post


Link to post
Share on other sites

What exactly doesn't work? Could you maybe give us the error message so we have a start point to try and help rather than going line by line...

  • Like 1

Share this post


Link to post
Share on other sites

There is no error message, but the characters and factions I wrote are not displayed in the game editor.

Share this post


Link to post
Share on other sites
17 hours ago, Jackal326 said:

What exactly doesn't work? Could you maybe give us the error message so we have a start point to try and help rather than going line by line...

There is no error message, but the characters and factions I wrote are not displayed in the game editor.

Share this post


Link to post
Share on other sites
2 hours ago, simonsd47 said:

There is no error message, but the characters and factions I wrote are not displayed in the game editor.

What tools are you using to pack the PBO, because I can see a couple of potential issues that might throw some errors which makes me think its not packing correctly...

Share this post


Link to post
Share on other sites
22 hours ago, Jackal326 said:

What tools are you using to pack the PBO, because I can see a couple of potential issues that might throw some errors which makes me think its not packing correctly...

It has been resolved

Share this post


Link to post
Share on other sites
3 hours ago, simonsd47 said:

It has been resolved

Glad to hear that, do you mind posting what was causing the issue and how you fixed it in case anyone else experiences something similar in the future?

Share this post


Link to post
Share on other sites
On 12/8/2023 at 12:17 AM, Jackal326 said:

Glad to hear that, do you mind posting what was causing the issue and how you fixed it in case anyone else experiences something similar in the future?

I defined a more ana_soldier_base_f

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
Sign in to follow this  

×