Jump to content
Sign in to follow this  
greywolf907

Sniper Ghillie config.cpp

Recommended Posts

So I'm hoping someone can help me out because I have tried everything I can think of. I am adding the final unit re textures to my addon pack but wan't to have some custom Ghillie sniper units but for the life of me I can't get my texture .paa to go onto the sniper model correctly I get into the editor after repacking the addon and I see my re texture but the sniper mask and other clothing texture are all mixed up and not correctly applied to the unit. If someone can give me a simple config.cpp example with the right classnames for the blufor Ghillie sniper unit to add a custom color re texture that would be great thanks.

Share this post


Link to post
Share on other sites

Are you trying to re texture the soldier camo or the actual Ghillie part? If it's the former I know it can be done.

Share this post


Link to post
Share on other sites

I want to retexture the uniform and change the color of the Ghillie itself like Massi units for example. I know its possible but could not get it to work.

Share this post


Link to post
Share on other sites

I'm kinda unsure what problems you have, but let's see if I can be a bit useful. The BLUFOR sniper class name is B_sniper_F, but it has no selections defined—the textures are in the model itself. But the selections are there, so you can define them in your config and change the textures there. One selection is named camo and its texture is a3\characters_f\blufor\data\clothing1_co.tga. The other (ghillie part) is named camo3 and its texture is a3\characters_f\common\data\ghillie_mcamo_co.tga. So you need to define the sniper class, selections, and textures in your config, like this (of course, replace the texture names with your ones, with correct path):

class cfgVehicles
{
class B_sniper_F;
class LeSniper: B_sniper_F
{
	hiddenSelections[] = {"camo","camo3"};
	hiddenSelectionsTextures[] = {"uniform_texture.paa","ghillie_texture.paa"};
};
};

The same applies to the AAF sniper (I_Sniper_F). However, OPFOR sniper (O_sniper_F) has three selections in the model: camo1 (clothing, a3\characters_f\opfor\data\clothing_co.tga), camo2 (tech part, a3\characters_f\opfor\data\tech_co.tga), and camo3 (ghillie, a3\characters_f\common\data\ghillie_desert_co.tga), so if you want to retexture that, you must adjust the config above accordingly. Please note that there might be a slight issue in LOD 1 of BLUFOR sniper model due to a slight imprecision in the way the selection is set in the model. But I fixed it; the corrected model shall appear in the next Dev-Branch Build.

Share this post


Link to post
Share on other sites

First off thanks for the help Locklear. Here is what I have ended up with after trying different lines about 20 times and still not getting it right and not knowing what I started with anymore its just a basic test config to at least get the texture correctly on the unit in the editor then fine tune it.

class CfgPatches

{

class example_uniform_config

{

units[] = {};

weapons[] = {};

requiredVersion = 0.1;

requiredAddons[] = {"A3_Characters_F_BLUFOR"};

};

};

class CfgVehicles

{

class B_sniper_F;

class T1_GHILLIE: B_sniper_F

{

_generalMacro = "T1_GHILLIE"; //unsure what this does

scope = 2;

displayName = "GHILLIE Test Soldier";

faction = "TIER1_UNITS";

nakedUniform = "U_BasicBody"; //class for "naked" body

model = "a3\characters_f\common\data\ghillie_mcamo_co.tga";

uniformClass = "TIER1_G1"; //the uniform item

hiddenSelections[] = {"Camo","camo3"};

hiddenSelectionsTextures[] = {"\T1_GHILLIE\data\GHILLIE_T1.paa"};

side = 1;

};

};

class cfgWeapons

{

class Uniform_Base;

class UniformItem;

class U_B_GhillieSuit;

class ItemCore;

class TIER1_G1: Uniform_Base

{

scope = 2;

displayName = "TEST GHILLIE";

picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";

model = "a3\characters_f\common\data\ghillie_mcamo_co.tga";

class ItemInfo : UniformItem

{

uniformModel = "-";

uniformClass = "T1_GHILLIE"; //would be same as our made soldier class

containerClass = "Supply20"; //how much it can carry

mass = 80; //how much it weights

};

};

};

I still have the uniform all mixed up on the unit in the editor my retextured mask ends up on his left leg and other things all mixed together :p Again thanks for the help man.

Share this post


Link to post
Share on other sites

This bit here

hiddenSelections[] = {"Camo","camo3"};
hiddenSelectionsTextures[] = {"\T1_GHILLIE\data\GHILLIE_T1.paa"};

You're telling the game you want camo1 and 3 to have a new texture but only define one path. It will automatically apply that path to Camo1. If you want to just change the Ghillie remove Camo1 from the HiddenSelections line. :)

Share this post


Link to post
Share on other sites

Thanks for the help Slatts. Can you modify what I have above to how it should be It's not letting me load the unit in the editor now not sure what I line I messed up.

Share this post


Link to post
Share on other sites
class CfgPatches
{
class example_uniform_config
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Characters_F_BLUFOR"};
};
};

class CfgVehicles
{

class B_sniper_F;


class T1_GHILLIE: B_sniper_F
{
_generalMacro = "T1_GHILLIE"; //unsure what this does
scope = 2;
displayName = "GHILLIE Test Soldier";
faction = "TIER1_UNITS";
nakedUniform = "U_BasicBody"; //class for "naked" body
model = "a3\characters_f\common\data\ghillie_mcamo_co.tga" ;
uniformClass = "TIER1_G1"; //the uniform item
hiddenSelections[] = {"camo3"};
hiddenSelectionsTextures[] = {"\T1_GHILLIE\data\GHILLIE_T1.paa"};
side = 1;
};
};

class cfgWeapons
{
class Uniform_Base;
class UniformItem;
class U_B_GhillieSuit;
class ItemCore;


class TIER1_G1: Uniform_Base
{
scope = 2;
displayName = "TEST GHILLIE";
picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_m cam_ca.paa";
model = "a3\characters_f\common\data\ghillie_mcamo_co.tga" ;

class ItemInfo : UniformItem
{
uniformModel = "-";
uniformClass = "T1_GHILLIE"; //would be same as our made soldier class
containerClass = "Supply20"; //how much it can carry
mass = 80; //how much it weights
};
};
};

Share this post


Link to post
Share on other sites

Yeah that still gives me a error something about .cfg skeletons and the unit is totally invisible like it needs some base class for the model. Sorry for being a newb at this figured out how to get all the other units in my retexture pack to work but this Ghillie is beyond my skills. Thanks again

Share this post


Link to post
Share on other sites

In both soldier and uniform config, you have .tga (a texture) instead of model. In case of sniper character class, the model is "A3\Characters_F\BLUFOR\b_sniper.p3d", but just delete it from your config altogether, since it's enough to have it inherited from the parent class. Do the same with the model part of the uniform config (the model there is actually a model of the uniform's suitpack, which you probably don't care about at all at this point). For the retexture itself, follow Slatts' suggestion; if you want to change the ghillie part only, define just "camo3" in hiddenSelections and your texture in hiddenSelectionsTextures.

Share this post


Link to post
Share on other sites

Better yet. Here's a new one.

	

Class CfgVehicles
{
        class B_Sniper_F;
        class My_Sniper: B_Sniper_F
{
	hiddenSelections[] = {"Camo3", "Insignia"};
	uniformClass = "MySniper_GhillieSuit";
	hiddenSelectionsTextures[] = {"\MyAddonFolder\data\MyTexture.paa"};
	scope = 2;
};
};
Class CfgWeapons
       class U_I_GhillieSuit;
       class UniformItem;
class MySniper_GhillieSuit: U_I_GhillieSuit
{
               scope = 2;
	displayName = "Ghillie Suit (Mine)";
	hiddenSelections[] = {"Camo3"};
	hiddenSelectionsTextures[] = {"\MyAddonFolder\data\MyTexture.paa"}; //Same as the path in My_Sniper class
	class ItemInfo: UniformItem 
	{
		containerclass = "Supply60";
		mass = 60;
		uniformclass = "My_Sniper";
		uniformmodel = "-";
		hiddenSelections[] = {"Camo3", "Insignia"};
		hiddenSelectionsTextures[] = {"\MyAddonFolder\data\MyTexture.paa"}; //Same as the path in My_Sniper class
	};
};
};

Edited by Slatts

Share this post


Link to post
Share on other sites

Greywolf907 contacted me via PM so I wrote him the config I suggest there. I will post it here as well so others might take a look.

class cfgVehicles
{
class B_sniper_F;
class LeSniper: B_sniper_F
{
	displayName = "Le Sniper";
	uniformClass = "U_LeSniper";
	hiddenSelections[] = {"camo","camo3"};
	hiddenSelectionsTextures[] = {"a3\characters_f\blufor\data\clothing1_co.paa","\T1_GHILLIE\data\GHILLIE_T1.paa"};
};
};

class cfgWeapons
{
class UniformItem;

class U_B_GhillieSuit
{
	class ItemInfo: UniformItem{};
};

class U_LeSniper: U_B_GhillieSuit
{
	displayName = "Le Sniper's Ghillie";
	class ItemInfo: ItemInfo
	{ 
		uniformClass = LeSniper;
	}; 
};
};

Considering the path to your texture is all right and the texture is packed, this code simply takes everything from the BLUFOR Sniper and just changes the ghillie texture. DisplayName is added so you can find the model easily in the editor. With uniform, the idea is the same: just inherit all the stuff from the original uniform and change only what you really need to change. In this case, it's displayName and uniformClass.

Edited by pettka

Share this post


Link to post
Share on other sites

Ok Locklear I get the following error.

File c:\users\user\desktop\tacops_master_copy\tacops_uni_gen7\config.cpp, line 18: /cfgWeapons/U_B_GhillieSuit/: ';' encountered instead of '{'

Slatts when I compile yours I get the following error.

File c:\users\user\desktop\tacops_master_copy\tacops_uni_gen7\config.cpp, line 0: '.Class': 'C' encountered instead of '='

I've been trying for over a year to simply alter the texture on the GhillieSuit Head Dress and with no success. Just seems impossible. Your code simple wont work. I have successfully re-textured over 200 ArmA 3 assets but not this.

Sorry If I sound frustrated but I'd really like to add this to my Tac-Ops mod and it seems beyond me.

Edited by Zeotrope

Share this post


Link to post
Share on other sites
Ok Locklear I get the following error.

File c:\users\user\desktop\tacops_master_copy\tacops_uni_gen7\config.cpp, line 18: /cfgWeapons/U_B_GhillieSuit/: ';' encountered instead of '{'

Try it now, please, I have added the missing part to Locklear's post, my bad that I haven't spotted it earlier :icon_evil:

Share this post


Link to post
Share on other sites

enum {
   destructengine = 2,
   destructdefault = 6,
   destructwreck = 7,
   destructtree = 3,
   destructtent = 4,
   stabilizedinaxisx = 1,
   stabilizedinaxesxyz = 4,
   stabilizedinaxisy = 2,
   stabilizedinaxesboth = 3,
   destructno = 0,
   stabilizedinaxesnone = 0,
   destructman = 5,
   destructbuilding = 1
};

class CfgPatches { 
   class LeSniper { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"}; 
   }; 
}; 




class cfgVehicles
{
class B_sniper_F;
class LeSniper: B_sniper_F
{
	displayName = "Le Sniper";
	uniformClass = "U_LeSniper";
	hiddenSelections[] = {"camo","camo3"};
	hiddenSelectionsTextures[] = {"tacops_uni_gen7\clothes\data\uni_gen.paa","tacops_uni_gen7\clothes\data\uni_gen.paa"};
};
};

class cfgWeapons
{
class UniformItem;

class U_B_GhillieSuit
{
	class ItemInfo: UniformItem{};
};

class U_LeSniper: U_B_GhillieSuit
{
	displayName = "Le Sniper's Ghillie";
	class ItemInfo: ItemInfo
	{ 
		uniformClass = LeSniper;
	}; 
};
};

So this is my code so far. Note the Paa files are just placeholders to get something to work.

In the editor I find "Le Sniper" under MEN/SNIPER

So when I preview I get....

No Entry 'config.bin/CfgWeapons/U_LeSniper.Namesound'.

Then I try again and I get....

No Entry 'config.bin/CfgWeapons/U_LeSniper.SelectionFireAnim'.

Any ideas?

Share this post


Link to post
Share on other sites

Still no reply for this one? I can see it's almost working. Can one of you wonderful Devs take another look?

Share this post


Link to post
Share on other sites

Well, the code is working when I try it, so it's kinda tough to identify the problem. If you have more things in the addon you are trying it in, maybe it would be the best idea to place the retexture code elsewhere, so it wouldn't be affected by anything else. Once you get that working, you can finalize your textures, and focus on problems with the addon later. If nothing helps, please try to provide some additional information (what else is in your addon, etc.), so I have something to work with.

Share this post


Link to post
Share on other sites

i have the same problem, but i am yet to try normal branch

i am on dev branch now, maybe that is the problem ?

i am running no mods, only official bundle and dev branch

class CfgPatches
{
class AOA_mod
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.00;
	requiredAddons[] = {"A3_Characters_F","A3_Characters_F_BLUFOR"};
	version = "1.01";
};
};

class CfgFactionClasses
{
class AOA_operations
{
	displayName = "AOA"; //Faction Name under ind
	author = "sui";
	icon = "\sui_aoa_ops\data\aoa.paa";
	priority = 2;
	side = 2; //ind
};
};

class CfgVehicleClasses
{
class AOA_Ops_unit
{
	displayName = "AOA ops";
};
};

class cfgVehicles
{
class B_Soldier_base_F;
class AOA_Ops: B_Soldier_base_F
{
	_generalMacro = "B_Soldier_F";
       scope = 2;
	displayName = "AOA Ops";
	faction = AOA_operations; // Puts unit under new faction
	side = 2; //ind
	vehicleClass = "AOA_Ops_unit";
	icon = "iconManLeader";
       nakedUniform = "U_BasicBody";
	uniformClass = "U_B_CombatUniform_mcam";
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"\sui_aoa_ops\data\iiv_nato_co.paa"};
};
};

class cfgWeapons
{
class UniformItem;

class U_B_CombatUniform_mcam
{
	class ItemInfo: UniformItem{};
};

class AOA_Ops: U_B_CombatUniform_mcam
{
	displayName = "AOA Ops uniform";
	class ItemInfo: ItemInfo
	{
		uniformClass = AOA_Ops;
	};
};
};

*edit to say:

i have NO clue what i am doing in script i just copy paste without understanding a lot of it

edit 2

get the same error in normal branch

Edited by suiside
tried normal branch

Share this post


Link to post
Share on other sites
Well, the code is working when I try it, so it's kinda tough to identify the problem. If you have more things in the addon you are trying it in, maybe it would be the best idea to place the retexture code elsewhere, so it wouldn't be affected by anything else. Once you get that working, you can finalize your textures, and focus on problems with the addon later. If nothing helps, please try to provide some additional information (what else is in your addon, etc.), so I have something to work with.

Very frustrating. I try this will no mods on and still the same result. I'm ready to give up on trying to re-skin the Ghillie.

Unless you (Locklear or pettka) would be so kind as to provide a 'working' example (code or PBO) I just can't get this to work. It's a shame because my Tac-Ops mod has a full array of re-skinned blufor in 3 different types of custom camo. All apart from one class, The Sniper. He is still the default Bohemia Blufor Camo.

Share this post


Link to post
Share on other sites

Please bump this in the beginning of January, since I won't have much time to look into this until then.

Share this post


Link to post
Share on other sites
Very frustrating. I try this will no mods on and still the same result. I'm ready to give up on trying to re-skin the Ghillie.

Unless you (Locklear or pettka) would be so kind as to provide a 'working' example (code or PBO) I just can't get this to work. It's a shame because my Tac-Ops mod has a full array of re-skinned blufor in 3 different types of custom camo. All apart from one class, The Sniper. He is still the default Bohemia Blufor Camo.

i found the problem

you have to set an identity

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

i don't know why but i found it searching for configs i could read

http://forums.bistudio.com/showthread.php?161294-Independent-Uniform-Config&p=2466244&viewfull=1#post2466244

i just tried it and got it to work

class CfgPatches
{
class AOA_mod
{
	author = "sui";
	units[] = {"AOA_NightOps"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Characters_F","A3_Characters_F_BLUFOR","A3_Characters_F_Bootcamp"};
	version = "1.01";
};
};

class CfgFactionClasses
{
class AOA_operations
{
	displayName = "AOA"; //Faction Name under ind
	author = "sui";
	icon = "\sui_aoa_ops\data\aoa.paa";
	priority = 2;
	side = 2; //ind
};
};

class CfgVehicleClasses
{
class AOA_Ops_unit
{
	displayName = "AOA NightOps";
};
};

class cfgVehicles
{

class B_Protagonist_VR_F;
class AOA_NightOps: B_Protagonist_VR_F
{
	_generalMacro = "B_Soldier_F";
       scope = 2;
	displayName = "AOA NightOps";
	faction = AOA_operations; // Puts unit under new faction
	side = 2; //ind
	vehicleClass = "AOA_Ops_unit";
	icon = "iconManLeader";
       nakedUniform = "U_BasicBody";
	uniformClass = "U_NightOps";
	identityTypes[] = {"Head_NATO", "G_NATO_default"};
	model = "\a3\characters_f_bootcamp\Common\VR_Protagonist_F.p3d";
	hiddenSelections[] = {"camo","camo1","camo2"};
	hiddenSelectionsTextures[] = {"\sui_aoa_nightops\data\NO_01_co.paa","\sui_aoa_nightops\data\NO_02_co.paa","\sui_aoa_nightops\data\NO_armor_co.paa"};
	linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio","FirstAidKit","ItemGPS","H_Shemag_olive_hs"};
	respawnLinkedItems[] = {"U_AOA_NightOps","ItemMap","ItemCompass","ItemWatch","ItemRadio","FirstAidKit","ItemGPS","H_Shemag_olive_hs"}; // add helmet & vest classname to this list
	Weapons[] = {"Throw","Put","hgun_P07_snds_F"}; // only add rifle & / pistol classname, leave throw and put they are used for explosives and grenades
	respawnWeapons[] = {"Throw","Put","hgun_P07_snds_F"}; // only add rifle & / pistol classname, leave throw and put they are used for explosives and grenades
	Magazines[] = {"30Rnd_9x21_Mag"}; // add the rifles/ pistols magazine here
	respawnMagazines[] = {"30Rnd_9x21_Mag"}; // add the rifles/ pistols magazine here
};
};

class cfgWeapons
{
	class U_B_Protagonist_VR;
       class UniformItem;
	class U_NightOps: U_B_Protagonist_VR
{
	scope = 2;
	author = "sui";
	displayName = "AOA NightOps uniform";

	class ItemInfo: UniformItem
	{
		uniformModel = "-";
		uniformClass = "AOA_NightOps";
		containerClass = "Supply30";
           mass = 70;

	};
};
};

was trying to skin the VR suit though the skin does not show the man stands (now with white bright lines where normal faction colors were)

Edited by suiside
to add config for reference

Share this post


Link to post
Share on other sites

Thanks for the efforts but no. It does not work. I still get the same errors. So I will revert back to my old config and re-state my simple intention: How can I re-texture the Head-dress (fringes) of the Ghillie (sniper). The code below gives no errors and manages to re-texture the base uniform. It does not however re-texture the head. ANY IDEAS??????

enum {
   destructengine = 2,
   destructdefault = 6,
   destructwreck = 7,
   destructtree = 3,
   destructtent = 4,
   stabilizedinaxisx = 1,
   stabilizedinaxesxyz = 4,
   stabilizedinaxisy = 2,
   stabilizedinaxesboth = 3,
   destructno = 0,
   stabilizedinaxesnone = 0,
   destructman = 5,
   destructbuilding = 1
};

class CfgPatches { 
   class Tacops_Soldier7_Sniper { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class CfgVehicles { 


   class B_Soldier_base_F; 
   class B_recon_F;

   class Tacops_Soldier7_E : B_recon_F { 
       _generalMacro = "B_Soldier_F";
       scope = 2; 
       displayName = "Tac-Ops Recon";
picture = "\A3\characters_f\data\ui\icon_u_ghillie_oucamo_ca.paa"; 
       nakedUniform = "U_BasicBody";
       uniformClass = "Example_CombatUniform_mcam7";
identityTypes[] = {"Head_NATO", "G_NATO_default"};
       //hiddenSelections[] = {"Camo"}; 
hiddenSelections[] = {"camo","camo3"};
       hiddenSelectionsTextures[] = {"tacops_uni_gen7\clothes\data\uni_gen.paa","tacops_uni_gen7\clothes\data\uni_gen_head.paa"};  
model = "\A3\Characters_F\blufor\b_sniper.p3d";
//attendant = 1;
icon = "iconManRecon";

       backpack = "Gen_Assault_D";

items[] = {"FirstAidKit"};

       weapons[] = {"srifle_LRR_SOS_f","throw","put","Rangefinder"};
respawnweapons[] = {"srifle_LRR_SOS_f","throw","put","Rangefinder"};

magazines[] = {
		"7Rnd_408_Mag",
		"7Rnd_408_Mag",
		"7Rnd_408_Mag",
		"7Rnd_408_Mag",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
	      };

Respawnmagazines[] = {
		"7Rnd_408_Mag",
		"7Rnd_408_Mag",
		"7Rnd_408_Mag",
		"7Rnd_408_Mag",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
		"HandGrenade",
	      };

              LinkedItems[] = {"ItemGPS","ItemMap","ItemCompass","itemRadio","ItemWatch","Vest_tacops_D","dummy"};

       respawnLinkedItems[] = {"ItemGPS","ItemMap","ItemCompass","itemRadio","ItemWatch","Vest_tacops_D","dummy"};

   }; 

}; 

class cfgWeapons { 
   class Uniform_Base; 
   class UniformItem; 

   class Example_CombatUniform_mcam7 : Uniform_Base { 
       scope = 2; 
       displayName = "Tacops Soldier 7"; 
       picture = "\A3\characters_f\data\ui\icon_u_ghillie_oucamo_ca.paa"; 

       class ItemInfo : UniformItem { 
           uniformModel = "-"; 
           uniformClass = "Tacops_Soldier7_E"; //would be same as our made soldier class 
           containerClass = "Supply20"; //how much it can carry 
           mass = 80; //how much it weighs 
       }; 
   }; 
}; 

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  

×