Jump to content

Recommended Posts

So i recently made a retexture of a uniform following a tutorial, at first i used the config that the tutorial used and then one that i found on the internet. But it doesn't work i was wondering if someone could help me out here.

Note - i do not know how to make configs or how to code.

  • Like 1

Share this post


Link to post
Share on other sites

the config im using at the moment:

 


    class CfgPatches
{
    class RJS_Uniform_Config
    {
        version = "1";
        units[] = {};
        weapons[] = {};
        requiredVersion = "1";
        requiredAddons[] = {};
    };
};
class CfgVehicles
{

        class B_Soldier_base_F;
        class RJS_Uniform: B_Soldier_F
    {
        scope = 2;
        author = "MpRtato";
        model = "\A3\characters_f_beta\INDEP\ia_soldier_01.p3d";
        hiddenSelections[] = {"camo","insignia"};
        hiddenSelectionsTextures[] = {"Custom_Uniform\Data\custom_camo_co.paa"};
        hiddenSelectionsMaterials[] = {"Custom_Uniform\Data\custom_camo.rvmat"};

};
};

class cfgWeapons
{
  class UniformItem;
    class Uniform_Base;

    class RJS_Camo: Uniform_Base
    {
        scope = 2;
        author = "Road Runner";
        displayName = "RJS Uniform";
        picture = "-";
        model = "\A3\characters_f_beta\INDEP\ia_soldier_01.p3d";
        class ItemInfo: UniformItem
        {
            uniformModel = "\A3\characters_f_beta\INDEP\ia_soldier_01.p3d";
            uniformClass = "RJS_Uniform";
            containerClass = "Supply50";
            mass = 50;
            armor = 0;
        };
    };
};

Share this post


Link to post
Share on other sites
12 hours ago, MpRtato said:

config

 

Hello there MpRtato and welcome to Bis Forums !

 

This is example of mine :

 

# It should work ckeck it beause i sorted a lot of code.

 

Spoiler



class CfgPatches
{
	
	class SPARTANS_UNIFORMS
    {
        units[] = // all the classes from cfgVehicles
        {
			class SPARTANS_UNIFORMS_I_ATACS_AU_F
        };
        weapons[] = // all the classes from cfgWeapons
        {
			class SP_I_ATACS_AU
		};
        requiredVersion = 0.1;
        requiredAddons[] = 
		{
			"A3_Characters_F_Common", "A3_Characters_F","A3_Characters_F_BLUFOR"
		};
    };
};
	
class CfgVehicles
{ 

class I_soldier_F;

class SPARTANS_UNIFORMS_I_ATACS_AU_F: I_soldier_F
{
	author = "[GR]GEORGE";
	scope = 2;
	scopeArsenal = 2;
	displayName = "SPARTANS ATACS AU";
	model = "\A3\characters_f_beta\INDEP\ia_soldier_01.p3d";
	uniformClass = "SP_I_ATACS_AU";
	hiddenSelections[] = {"camo","insignia"};
	hiddenSelectionsTextures[] = {"\SPARTANS_UNIFORMS\data\textures\indep\I_ATACS_AU.paa"};
};
};

class cfgWeapons 
{
	
class Uniform_Base;
class UniformItem;

class SP_I_ATACS_AU: Uniform_Base
{
	author = "[GR]GEORGE";
	scope = 2;
	scopeArsenal = 2;
	displayName = "SPARTANS ATACS AU";
	model="\A3\Characters_F\Common\Suitpacks\suitpack_blufor_soldier.p3d";
	picture = "\SPARTANS_UNIFORMS\data\ui\ui_sp.paa";
	class ItemInfo: UniformItem
	{
		uniformModel = "-";
		uniformClass = "SPARTANS_UNIFORMS_I_ATACS_AU_F";
		containerClass = "supply120";
		armor = 100;
		passThrough	= 0.1;
		mass = 1;
	};
};
};

 

Share this post


Link to post
Share on other sites
1 hour ago, MpRtato said:

jup, worked amazing, big thanks

 

Youe welcome MpRtato , have fun !

Share this post


Link to post
Share on other sites
14 hours ago, GEORGE FLOROS GR said:

units[] = // all the classes from cfgVehicles
{
    class SPARTANS_UNIFORMS_I_ATACS_AU_F
};
weapons[] = // all the classes from cfgWeapons
{
    class SP_I_ATACS_AU
};

These should be an array of STRINGs of class names...

units[] = // all the classes from cfgVehicles
{
	"SPARTANS_UNIFORMS_I_ATACS_AU_F"
};
weapons[] = // all the classes from cfgWeapons
{
	"SP_I_ATACS_AU"
};

 

  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, Larrow said:

These should be an array of STRINGs of class names...

 

actually it was an array but i delete all of them for the example.

Do you mean this ?

Share this post


Link to post
Share on other sites

as i just noticed , i do have it like this working though.

class SPARTANS_UNIFORMS
    {
        units[] = // all the classes from cfgVehicles
        {
            class SPARTANS_UNIFORMS_I_ATACS_AU_F,
            class SPARTANS_UNIFORMS_I_ATACS_FG_F,

 

Share this post


Link to post
Share on other sites
units[] = // all the classes from cfgVehicles
{
	"SPARTANS_UNIFORMS_I_ATACS_AU_F"
};

This is an array, the [] after the members name signifies that this config entry is an array. In the config an array is surrounded by braces {}.

So the above is an array of one item "SPARTANS_UNIFORMS_I_ATACS_AU_F"

 

1 minute ago, GEORGE FLOROS GR said:

i do have it like this working though

It may work but the config patches entries are incorrect, should be an array of STRINGs of added class names. If any body uses CfgPatches( or configSourceAddonList) to get an array of item types you have added in your mod im not sure what the outcome would be, as it is configured incorrectly.

  • Thanks 1

Share this post


Link to post
Share on other sites

i have another question. Do any of you know why when i add 2 items to the config it can only open one uniform model (the one that's used when  the uniform is on the ground)

----------------------------------------------------------------------------------------------------------------

 

 


class CfgPatches
{
    
    class RJS_UNIFORM
    {
        units[] = // all the classes from cfgVehicles
        {
            class "RJS_CAMO";
            class "RJS_CAMO_SS"
        };
        weapons[] = // all the classes from cfgWeapons
        {
            class "RJS_CAMO1";
            class "RJS_CAMO1_SS"
        };
        requiredVersion = 0.1;
        requiredAddons[] = 
        {
            "A3_Characters_F_Common", "A3_Characters_F","A3_Characters_F_BETA"
        };
    };
};
    
class CfgVehicles

class I_soldier_F;

class RJS_CAMO: I_soldier_F
{
    author = "MpRtato";
    scope = 2;
    scopeArsenal = 2;
    displayName = "RJS Uniform";
    model = "\A3\characters_f_beta\INDEP\ia_soldier_01.p3d";
    uniformClass = "RJS_CAMO1";
    hiddenSelections[] = {"camo","insignia"};
    hiddenSelectionsTextures[] = {"\RJS_UNIFORM\Data\textures\indep\custom_camo_co.paa"};
};

class RJS_CAMO_SS: I_soldier_F
{
    author = "MpRtato";
    scope = 2;
    scopeArsenal = 2;
    displayName = "RJS Uniform (Rolled Sleeves)";
    model = "\A3\characters_f_beta\INDEP\ia_soldier_02.p3d";
    uniformClass = "RJS_CAMO1_SS";
    hiddenSelections[] = {"camo","insignia"};
    hiddenSelectionsTextures[] = {"\RJS_UNIFORM\Data\textures\indep\custom_camo_co.paa"};
};
};

class cfgWeapons 
{
    
class Uniform_Base;
class UniformItem;

class RJS_CAMO1: Uniform_Base
{
    author = "MpRtato";
    scope = 2;
    scopeArsenal = 2;
    displayName = "RJS Uniform";
    model = "\A3\characters_f\Common\Suitpacks\suitpack_universal_F.p3d";
    picture = "\RJS_UNIFORM\UI\icon_RJS_ca.paa";
    class ItemInfo: UniformItem
    {
        uniformModel = "-";
        uniformClass = "RJS_CAMO";
        containerClass = "supply50";
        armor = 0;
        passThrough    = 0.1;
        mass = 1;
    };
};

class RJS_CAMO1_SS: Uniform_Base
{
    author = "MpRtato";
    scope = 2;
    scopeArsenal = 2;
    displayName = "RJS Uniform (Rolled Sleeves)";
    model = "\A3\characters_f\Common\Suitpacks\suitpack_universal_F.p3d";
    picture = "\RJS_UNIFORM\UI\icon_RJS_ca.paa";
    class ItemInfo: UniformItem
    {
        uniformModel = "-";
        uniformClass = "RJS_CAMO_SS";
        containerClass = "supply50";
        armor = 0;
        passThrough    = 0.1;
        mass = 1;
    };
};
};

 

Share this post


Link to post
Share on other sites

it says "Cannot open object a3\characters_f\common\suitpacks\suitpack_universal_f.p3d"

Share this post


Link to post
Share on other sites
37 minutes ago, MpRtato said:

 class "RJS_CAMO";

 

This is an error ";"

and as Larrow said you need to change to this :

 

21 hours ago, Larrow said:

units[] = // all the classes from cfgVehicles
{
	"SPARTANS_UNIFORMS_I_ATACS_AU_F"
};

 

Share this post


Link to post
Share on other sites

welp, i got an error so can you please send a full example of this segment

Share this post


Link to post
Share on other sites
1 hour ago, MpRtato said:

        units[] = // all the classes from cfgVehicles
        {
            class "RJS_CAMO";
            class "RJS_CAMO_SS"
        };
        weapons[] = // all the classes from cfgWeapons
        {
            class "RJS_CAMO1";
            class "RJS_CAMO1_SS"
        };

did you correct this ? and what is the error ?

Share this post


Link to post
Share on other sites
  • As you are inheriting from Uniform_Base you are missing the hidden selections & textures for the suitpack
  • Check your line endings, after copying your code from the above post I found a couple of erroneous invisible characters that caused compilation errors (may have come from forum formatting :shrug:)

This is a tested working config, as much as I can place the units without error and see the uniforms in the arsenal.

I have inherited from soldiers and uniforms slightly higher up the inheritance tree, just for ease of testing.

And of course I do not have your textures so they will need adding back in.

I have also renamed your classes to keep some resemblance of an appropriate naming convention.

class CfgPatches {

    class RJS_UNIFORMS {

    	// all the classes from cfgVehicles
        units[] = {
            "I_soldier_RJS_CAMO",
            "I_soldier_RJS_CAMO_SS"
        };

        // all the classes from cfgWeapons
        weapons[] = {
            "U_RJS_CAMO",
            "U_RJS_CAMO_SS"
        };

        requiredVersion = 0.1;
        requiredAddons[] = {
            "A3_Characters_F_Common", "A3_Characters_F", "A3_Characters_F_BETA"
        };
    };
};

class CfgVehicles {

	class I_soldier_F;
	class I_Soldier_lite_F;

	class I_soldier_RJS_CAMO: I_soldier_F {
	    author = "MpRtato";
	    displayName = "RJS Uniform";
	    uniformClass = "U_RJS_CAMO";
	    hiddenSelectionsTextures[] = {"\A3\Characters_F_Beta\INDEP\Data\ia_soldier_01_clothing_co.paa"};
	};

	class I_soldier_RJS_CAMO_SS: I_Soldier_lite_F {
	    author = "MpRtato";
	    displayName = "RJS Uniform (Rolled Sleeves)";
	    uniformClass = "U_RJS_CAMO_SS";
	    hiddenSelectionsTextures[] = {"\A3\Characters_F_Beta\INDEP\Data\ia_soldier_01_clothing_co.paa"};
	};
};

class CfgWeapons {

	class UniformItem;
	class U_I_CombatUniform;
	class U_I_CombatUniform_shortsleeve;

	class U_RJS_CAMO: U_I_CombatUniform {
	    author = "MpRtato";
	    scopeArsenal = 2;
	    displayName = "RJS Uniform";
	    picture = "\A3\characters_f_beta\data\ui\icon_U_IR_CombatUniform_rucamo_ca.paa";

	    class ItemInfo: UniformItem {
	        uniformModel = "-";
	        uniformClass = "I_soldier_RJS_CAMO";
	        containerClass = "supply50";
	        armor = 0;
	        passThrough = 0.1;
	        mass = 1;
	    };
	};

	class U_RJS_CAMO_SS: U_I_CombatUniform_shortsleeve {
	    author = "MpRtato";
	    scopeArsenal = 2;
	    displayName = "RJS Uniform (Rolled Sleeves)";
	    picture = "\A3\characters_f_beta\data\ui\icon_U_IR_CombatUniform_rucamo_ca.paa";

	    class ItemInfo: UniformItem {
	        uniformModel = "-";
	        uniformClass = "I_soldier_RJS_CAMO_SS";
	        containerClass = "supply50";
	        armor = 0;
	        passThrough = 0.1;
	        mass = 1;
	    };
	};
};

 

  • Thanks 1

Share this post


Link to post
Share on other sites

massive thanks couldn't have done it without you. Probably won't be asking any more questions.

  • Like 1

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

×