Jump to content
Sign in to follow this  
psrkallez06

Confused about classes in a config.

Recommended Posts

So i want to modify the current load of a uniform just for learning, I checked this: https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide#Uniform_configuration

 

And i tried the script written there:

/// Uniform config ///
 
class cfgWeapons
{
    class UniformItem;
 
    class U_B_soldier_new: Uniform_Base
    {
        author = "Splendid Modder";
        scope = 2;
        displayName = "New Uniform";
        picture = "\A3\characters_f\data\ui\icon_u_b_soldier_new_ca.paa";
        model = "\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d";
        hiddenSelections[] = {"camo"};
        hiddenSelectionsTextures[] = {"\A3\Characters_F_New\BLUFOR\Data\b_soldier_new.paa"};
 
        class ItemInfo: UniformItem
        {
            uniformModel = "-";
            uniformClass = B_soldier_new;
            containerClass = Supply40;
            mass = 40;
        };
    };
};

But when i try to compile it from a .cpp to a .bin  get:  line 4: /cfgWeapons.U_B_soldier_new: Undefined base class 'Uniform_Base'

 

What does that mean? What is a base class and why do i need it?

 

I also tried just adding a class with the maximumload like this:

class cfgWeapons
{
    class UniformItem;
	class Item_Base_F;
 
    class Item_U_B_Wetsuit: Item_Base_F
    {
        author = "Splendid Modder";
        scope = 2;
		scopeCurator=2;
        displayName = "New Uniform";
		editorCategory="EdCat_Equipment";
		editorSubcategory="EdSubcat_Uniforms";
		vehicleClass="ItemsUniforms";
        picture = "\A3\characters_f\data\ui\icon_u_b_soldier_new_ca.paa";
        model = "\A3\Weapons_f\dummyweapon.p3d";
 
        class ItemInfo: UniformItem
        {
            uniformModel = "-";
            uniformClass = B_soldier_new;
            containerClass = Supply40;
            mass = 40;
			maximumload = 9999;
        };
    };
}; 

But the load doesn't change ingame even tho the script compiles.

Thanks!

Share this post


Link to post
Share on other sites

From my little knowledge and i mean little... Your issue is your uniform "class U_B_soldier_new" is a child of the parent class "Uniform_Base" meaning your class "class U_B_soldier_new" is trying to link or inherit information from "Uniform_Base" but it doesn't exist in your config.

 

Again i'm new to editing configs and modding in general myself so i hope my information was correct & useful.

 

-Irish

Share this post


Link to post
Share on other sites

From my little knowledge and i mean little... Your issue is your uniform "class U_B_soldier_new" is a child of the parent class "Uniform_Base" meaning your class "class U_B_soldier_new" is trying to link or inherit information from "Uniform_Base" but it doesn't exist in your config.

 

Again i'm new to editing configs and modding in general myself so i hope my information was correct & useful.

 

-Irish

Thanks for your answer! Gonna try and fix that then! Cheers :D

Share this post


Link to post
Share on other sites

I also just found out that if you increase the containerClass = Supply40; to containerClass Supply180; it will increase the amount of items you can store in the uniform. just for your info.

 

Here is a simple example uniform with a unit wearing the uniform.

class CfgPatches
{
    class My_Mod_Config
    {
        units[] = {"New_Unit"}; //UNIT_THAT_WEARS_THE_UNIFORM_CLASSNAME Goes inbetween the ----> ""
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Characters_F"}; //Dont Touch if making / using a uniform
    };
};

class cfgWeapons
//////////////////////////////////////////////////////////////////////////////////////////////////
{
    class Uniform_Base{
		
	};
	class UniformItem;

	
    class ItemInfo;
	
	class U_I_CombatUniform;
	
	class Test_Uniform : U_I_CombatUniform
    {
        scope = 2;
        displayName = "New Uniform";
		author = "Splendid Modder";
		picture = "";
        
        class ItemInfo : UniformItem {
            uniformModel = "-";
            uniformClass = "New_Unit";
            containerClass = "Supply180";
            mass = 70;
			
        };
	};

//////////////////////////////////////////////////////////////////////////////////////////////////
	class cfgVehicles
{	
	class I_Soldier_base_F;
	class I_soldier_F;
//////////////////////////////////////////////////////////////	
	
	class New_Unit : I_soldier_F
    {
                scope = 2;
                displayName = "New Unit";
				author = "Splendid Modder";
				nakedUniform = "U_BasicBody";
                uniformClass = "Test_Uniform";
                hiddenSelections[] = {"Camo"};
                hiddenSelectionsTextures[] = {""};
		
		identityTypes[] = {"Head_NATO", "G_NATO_default"}; // to prevent the unit from getting old man greek face.. can be left out
		side = 1; // making the unit a blufor.. leave out if you want unit to stay on the independent side
		
		backpack = "B_Parachute";
        linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio","FirstAidKit"}; // add helmet & vest classname to this list
        respawnLinkedItems[] = {"G_Combat","ItemMap","ItemCompass","ItemWatch","ItemRadio","FirstAidKit"}; // add helmet & vest classname to this list
		Weapons[] = {"Throw","Put"}; // only add rifle & / pistol classname, leave throw and put they are used for explosives and grenades
		respawnWeapons[] = {"Throw","Put"}; // only add rifle & / pistol classname, leave throw and put they are used for explosives and grenades
		Magazines[] = {}; // add the rifles/ pistols magazine here
		respawnMagazines[] = {}; // add the rifles/ pistols magazine here
    };
	};
};

Share this post


Link to post
Share on other sites

 

I also just found out that if you increase the containerClass = Supply40; to containerClass Supply180; it will increase the amount of items you can store in the uniform. just for your info.

 

Here is a simple example uniform with a unit wearing the uniform.

class CfgPatches
{
    class My_Mod_Config
    {
        units[] = {"New_Unit"}; //UNIT_THAT_WEARS_THE_UNIFORM_CLASSNAME Goes inbetween the ----> ""
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Characters_F"}; //Dont Touch if making / using a uniform
    };
};

class cfgWeapons
//////////////////////////////////////////////////////////////////////////////////////////////////
{
    class Uniform_Base{
		
	};
	class UniformItem;

	
    class ItemInfo;
	
	class U_I_CombatUniform;
	
	class Test_Uniform : U_I_CombatUniform
    {
        scope = 2;
        displayName = "New Uniform";
		author = "Splendid Modder";
		picture = "";
        
        class ItemInfo : UniformItem {
            uniformModel = "-";
            uniformClass = "New_Unit";
            containerClass = "Supply180";
            mass = 70;
			
        };
	};

//////////////////////////////////////////////////////////////////////////////////////////////////
	class cfgVehicles
{	
	class I_Soldier_base_F;
	class I_soldier_F;
//////////////////////////////////////////////////////////////	
	
	class New_Unit : I_soldier_F
    {
                scope = 2;
                displayName = "New Unit";
				author = "Splendid Modder";
				nakedUniform = "U_BasicBody";
                uniformClass = "Test_Uniform";
                hiddenSelections[] = {"Camo"};
                hiddenSelectionsTextures[] = {""};
		
		identityTypes[] = {"Head_NATO", "G_NATO_default"}; // to prevent the unit from getting old man greek face.. can be left out
		side = 1; // making the unit a blufor.. leave out if you want unit to stay on the independent side
		
		backpack = "B_Parachute";
        linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio","FirstAidKit"}; // add helmet & vest classname to this list
        respawnLinkedItems[] = {"G_Combat","ItemMap","ItemCompass","ItemWatch","ItemRadio","FirstAidKit"}; // add helmet & vest classname to this list
		Weapons[] = {"Throw","Put"}; // only add rifle & / pistol classname, leave throw and put they are used for explosives and grenades
		respawnWeapons[] = {"Throw","Put"}; // only add rifle & / pistol classname, leave throw and put they are used for explosives and grenades
		Magazines[] = {}; // add the rifles/ pistols magazine here
		respawnMagazines[] = {}; // add the rifles/ pistols magazine here
    };
	};
};

Awesome thank you very much! If i may ask. Where did you learn this? Are you self-learned or did you read tutorials? If so which? Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

To learn is pretty simple once everything is broken down into more understandable bits. I used examples/templates to get me started like reverse engineering in a way. Rewind to the beginning of this year and i was exactly like you not knowing much about mod making (And i still have alot to learn :D) More than anything time is whats needed for modding especially trying to understand what makes the game "tick" and what works were, much like a "Rule Set" if you want to call it that.

I looked at this template to get me started and this allowed me to gain a greater understanding of how things work and are used https://forums.bistudio.com/topic/188679-tutorial-supersimple-aircraft-template/

 

About 5-6 months ago i was having issues making my own custom helmet and now im currently working on a VTOL aircraft. And i say this not to boast but to inspire you to stick to modding and try to learn Arma needs more modders :D

 

Best of luck

 

-Irish

Share this post


Link to post
Share on other sites

To learn is pretty simple once everything is broken down into more understandable bits. I used examples/templates to get me started like reverse engineering in a way. Rewind to the beginning of this year and i was exactly like you not knowing much about mod making (And i still have alot to learn :D) More than anything time is whats needed for modding especially trying to understand what makes the game "tick" and what works were, much like a "Rule Set" if you want to call it that.

I looked at this template to get me started and this allowed me to gain a greater understanding of how things work and are used https://forums.bistudio.com/topic/188679-tutorial-supersimple-aircraft-template/

 

About 5-6 months ago i was having issues making my own custom helmet and now im currently working on a VTOL aircraft. And i say this not to boast but to inspire you to stick to modding and try to learn Arma needs more modders :D

 

Best of luck

 

-Irish

Glad to hear it, Thanks man. Also good luck with your VTOL! :D

Share this post


Link to post
Share on other sites

This page here has been my go-to when I have questions. One of the reasons its so helpful is they explain (mostly) what each line does :)

 

Good luck!

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  

×