Jump to content
Sign in to follow this  
ShotgunSheamuS

help wanted for making custom uniform

Recommended Posts

Hi there guys.

My appologies if this has been asked before, or if this topic is in the wrong thread. Struggeling to find an answer, and not sure where this belongs.

So I have been holding out from asking assistance with this project of mine, to see how far I can get. So far propper detailed guides have been next to impossible to find, the most I find, are scattered all in pieces here and there, and also most seem to assume you already familiar with editing in ArmA, which I am not (and this is my first ever mod, in any game so far). So, not noob friendly, and for the past week, the total noob I am, I have been trying to figure this out, and slowly, day by day I want to tear my hair out, slap someone really hard, and go cry in a corner, but at the same time I discover something new and figure something out, and I make progress, and it is good. It has been a wild rollercoaster this past... Now I think I am at the last step of getting it to function 100%, or so I would assume (correct me if I am wrong), and I cant figure out how to do it. And here I am asking some assistance.

Basically I am trying to make new custom uniforms and gear for my realism unit in the form of a mod. However it's really a matter of editing the existing A3 content, just retexture of uniform and gear to be quite forward. (camo patterns)

So, I have mastered the config.cpp files, in which I have defined everything from faction right down to the different gear to wear etc. I have edited the _co textures as desired and I have managed to do the rvmat a few hours ago. So when I test, I have my faction and I can choose my custom made soldier from custom made faction, place him on the map in editor, and there he will be, wearing the uniform and gear I configured and no errors at all. However, the edited texture i made wont apply itself, it displays the A3 default indep camo texture (I'm using the ia_officer uniform).

Now from my understanding, (and this is just by looking at other peoples mods explained further in this paragraph), I link the _ti_ca , _smdi, and _nohq textures to rvmat, and the _co texture for my uniform was specified in the config.cpp i made for the uniform by hiddenselectiontextures. Now I am guessing i need to link the rvmat I made to the ia_officer model somehow. I have depbo'd some mods that are made to be custom uniforms, and i see they have models in the mod, not referencing the original a3 models from a3 dir (ofcourse not since it doesnt allow to save), But they are vanilla a3 models, but even those models wont allow me to save. I quickly drafted a test mod, by replacing "xyz" mod's textures with my own, along with the configs etc, and it works great, however I am stuck with using the same layout that person worked with (and i dont always agree with other peoples layouts), and if I dont stick to it, I get error that it cant find texture or model. Now, dont get me wrong, I dont want to depend on other peoples mods, I don't want to be restricted to that layout, the naming convention, or the models they provide, because I may want more and different uniform models and other vanilla stuff etc. But mostly, I got this far on my own, I would like to complete this last piece on my own, I just need to be pointed in the right direction.

So now I ask, how do I go about doing that for myself? Somehow get those models and save them linked to the rvmat I made? I have tried searching about p3d models and rvmat and the relation between them, all i get is porting custom made models to O2 or basic text based rvmat config and save from cpp to rvmat. nothing explaining the relationship between the two. So either I am completely on the wrong trail and completely missunderstand, like the week old noob I am, or maybe I am searching for the wrong description for a how to... orrr it is a very touchy and avoided subject, since BI dont allow unbinarizing their content and this may involve that. But then I would just like to know how other modders are able to make these custom textured uniforms and gear using the copied versions of existing models vanilla A3 models working with their custom made rvmat and textures. I cannot just stop here.

regards

Sheamus

Edited by ShotgunSheamuS
forgot to subscribe to my own thread -blush-

Share this post


Link to post
Share on other sites

First up if you want to redistribute a3 vanilla models you will need permission from BIS to do so. Modders that are editing the a3 models are most likely using a hex editor to change the texture paths, making sure that they use the exact same number of characters in the path.

The correct hiddenSelection for the ia_officer model are:

hiddenSelections[] = {"camo1", "camo2", "insignia"};

Original textures are.

\a3\characters_f_beta\indep\data\ia_soldier_01_clothing_co.paa

\a3\characters_f_beta\indep\data\officer_spc_co.paa

You can use the hiddenSelectionsMaterials[] token to change the rvmat, you will lose wound texture though.

hiddenSelectionsMaterials[] = {"pathToRvmat"};

Share this post


Link to post
Share on other sites

Thanks for the response, really appreciate it. However, without trying to be rude, I would like to ask if you can be less vague? I am a total noob at modding and arma. This little custom uniform mod is my first attempt at anything like this, so I have no background.

So anyways, I have questions about your reply.

Firstly, the hidden selections, camo1, 2 and insignia. are you suggesting I use that line of code exactly as is? Because I don't quite remember having to define camo and never seen it anywhere in order to define it, perhaps you have a sample if that is the case?. Also you point out two texture for officer? Not sure where soldier_01_clothing fits in, but I am guessing it is camo2 right? and insignia, that is faction related, so needs to point to faction icon?

secondly you mentioned using the hiddenselectionsmaterials for rvmat, which i did do, (and had no effect) but why would I lose wound texture? Don't you point it towards the _injury rvmat file for that?

I have no intention redistributing the A3 models, not my intention, I just want my textures to show on the model then I will gladly reference the vanilla models. However this mod will only be internal for my unit, whom all own A3 so I can point to vanilla models if that is possible.

This changing texture paths based with hex editor, how does that work, is there a how to guide? And yes I googled, and this is really the best I could come up with. With the lack of response to that post, I can see this is touching boundries now trying to just change the texture of a model, and I dont see why it should be such a pain? Surely it is most common and popular for people to make custom camo pattern uniforms representing their country or realism unit? Is that why they include the models in mods?

Share this post


Link to post
Share on other sites
Firstly, the hidden selections, camo1, 2 and insignia. are you suggesting I use that line of code exactly as is? Because I don't quite remember having to define camo and never seen it anywhere in order to define it, perhaps you have a sample if that is the case?. Also you point out two texture for officer? Not sure where soldier_01_clothing fits in, but I am guessing it is camo2 right? and insignia, that is faction related, so needs to point to faction icon?

Yes, add the line exactly as is. The hiddenSelections[] line was most likely inherited from another class, but what you are inheriting is wrong. I think camo1 is the bottoms and camo2 is the top, insignia is a square patch on the arm, you can leave it out if you want. I don't think the insignia selection is faction related.

hiddenSelections[] = {"camo1", "camo2", "insignia"};  
hiddenSelectionsTextures[] = {"BottomTexturePath", "TopTexturePath"}; // insignia texture left out

secondly you mentioned using the hiddenselectionsmaterials for rvmat, which i did do, (and had no effect) but why would I lose wound texture? Don't you point it towards the _injury rvmat file for that?[/Quote]Its a known bug, that's all I know.

This changing texture paths based with hex editor, how does that work, is there a how to guide? And yes I googled, and this is really the best I could come up with. With the lack of response to that post, I can see this is touching boundries now trying to just change the texture of a model, and I dont see why it should be such a pain? Surely it is most common and popular for people to make custom camo pattern uniforms representing their country or realism unit? Is that why they include the models in mods?
An old post of mine - [Help]Skinning new units

Its easier to use hiddenSelections nowadays, I don't know why they included the models in their mod.

Post your config using the [noParse]


[/noParse] BBCode tags if you need help.

This thread if useful - [Tutorial]Simple Re-texturing Guide (From Start To Finish)

Share this post


Link to post
Share on other sites

Now thats an answer I can work with!!! Makes quite a bit of sense now, thank you for the in depth answer.

I will quickly try and patch up my uniform config and draft a quick sample retexture and test, if all goes well, I'll post my success within next 24hours! if not, I will provide you with my config and layout.

Thank you again :)

---------- Post added at 23:11 ---------- Previous post was at 21:43 ----------

Ugh, so now I am lost again -sigh- and this I don't understand why.

I have made the changes as suggested, and referenced the A3 models directly, but unfortunately now, for some reason, in the editor I can no longer select faction or units. like my mod no longer is active? All I did was suggested changes, changed directory of models, and organized my layout as follows

\core (pbo)
 - Headgear (disabled config)
 - Models (empty = now irrelevent if I can use vanilla models)
 - Units
   - Icon (icon for faction logo/flag)
   - Soldier
     - 2014_standard (where my main config for soldier and custom textures are)
       - ui (icon for uniform)
 - Vests (disabled config)

And here is my config. Appologies for all the comments, being new, I try fill these in for myself as I figure them out, and for future reference to my realism unit who will have to manage it if i ever go MIA one day.

#define ReadAndWrite		0
#define ReadAndCreate		1
#define ReadOnly		2
#define ReadOnlyVerified		3

#define true	1
#define false	0

#define VSoft		0
#define VArmor		1
#define VAir		2

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

#define private		0
#define protected		1
#define public		2 

class CfgPatches
{
class ZA_CORE_2014_Soldier		//create your own class
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Data_F","A3_Weapons_F","A3_Characters_F","A3_Characters_F_Beta","A3_Characters_F_BLUFOR"};
};
};

class CfgFactionClasses
{
class ZULU_ALPHA // create a faction.
{
	displayName = "ZA";		// name of faction. (preferebly use abbreviation)
	priority = 100;		// where in drop down list of editor you want them. (lower number moves up and vice verse)
	side = 1;		// 1 is for blu_for side. 2 = opfor, 3 = Indep, 4 = civi
	icon = "\core\Units\Icon\Icon.paa"; //directory of your faction logo/flag.
};
};

class CfgVehicleClasses
{
class ZA_2014_Soldier_Standard		//create a soldier class to be defined below.
{
	displayName = "ZA Soldier";		//name of class in editor/game. (medic, Patrol leader, Second in command, Lead sclout)
};
};

class CfgVehicles
{

class B_Soldier_base_F; 						// Because soldier will be blu_for, use blufor base.
class ZA_2014_Soldier_Brown: B_Soldier_base_F 	// create a custom soldier base to define soldier base from above, kinda like renaming the base soldier to your own.
{
	scope = 2;		// use 0 to use for base only, or 2 for public. 1 is for protected, not sure what that does.
	displayName = "Standard (Brown)";		// Name shown in editor? or Inventory?
	uniformClass = "ZA_2014_Browns";		// below uniform class defined in cfgWeapons.
	nakedUniform = "U_BasicBody";		// naked body model. (this is default)
	model = "\A3\characters_f_beta\indep\ia_officer.p3d";		// link to custom (or vanilla) uniform model.

	faction = "ZULU_ALPHA";		// specified in CfgFactionClasses.
	vehicleClass = "ZA_2014_Soldier_Standard";		// specified in CfgVehicleClasses you created.
	canCarryBackPack=1;		//pretty obvious. (1=yes/0=no)
	canDeactivateMines=1;		//pretty obvious. (1=yes/0=no)
	engineer=1;		//pretty obvious. (1=yes/0=no)
	attendant = "true";		//pretty obvious.
	uniformAccessories[] = {}; //eyeprotection, goggles etc?
	Items[] = {};		//items???
	weapons[] = {"Throw","Put"};		// (throw) to throw grenades and (put) to place mines. also add primary and secondary weapons here.
	magazines[] = {};		// if weapon provided, add magazines here, copy and paste as many magazines as you want.
	linkedItems[] = {"ItemWatch","ItemRadio","ItemGPS"};		// specify the vest and helmet here as well.
	respawnLinkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS"};		// same as above, for if you want to respawn with this after death.

	hiddenSelectionsTextures[] = {"\core\Units\Soldier\2014_standard\u_za_browns_uniform1_co","\core\Units\Soldier\2014_standard\u_za_browns_uniform2_co"};		// link to custom (or vanilla) uniform texture. (May include more than one!)
	hiddenSelections[] = {"camo1","camo2"};		// "insignia"		//this depends on uniform model, some only require one camo, others more.

	class Wounds
	{
		tex[] = {};
		mat[] = {};
	};
};
};

class cfgWeapons
{
class Uniform_Base;
class UniformItem;
//	class InventoryItem_Base_F;
//	class ItemCore;
//	class HeadGearItem;
//	class V_PlateCarrier1_rgr;
//	class VestItem;

class ZA_2014_Browns: Uniform_Base		//special properties for uniform when taken off. inventory item
{
	scope = 2;		// pretty obvious.
	model = "\A3\characters_f\Common\Suitpacks\suitpack_universal_F";		// model used for when item is on the ground and not worn.
	displayName = "ZA Browns (Field Uniform)";		// display name in inventory.
	picture = "\core\Units\Soldier\2014_standard\ui\icon_u_za_brownsuniform_ca.jpg";		// directory to uniform icon for inventory.

	class ItemInfo: UniformItem
	{
		uniformModel = "-";		//not sure why this is left blank???
		uniformClass = "ZA_2014_Soldier_Brown";		// this uniform class is your custom soldier base.
		containerClass="Supply60";		// how much you can carry, i assume number is weight of gear packed inside?
		mass=80;		// how much this item weighs without contents from above.
	};
};
};

As I said, I had it working before, just couldnt get uniform to work, but yeah I guess all my tinkering messed it up. But here is a script from previous build, before I changed things up. And I tested now, works 100% except for that damn uniform texture.

#define ReadAndWrite		0
#define ReadAndCreate		1
#define ReadOnly		2
#define ReadOnlyVerified		3

#define true	1
#define false	0

#define VSoft		0
#define VArmor		1
#define VAir		2

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

#define private		0
#define protected		1
#define public		2 

class CfgPatches
{
class ZA_CORE_2014_Soldier //create a class
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Data_F","A3_Weapons_F","A3_Characters_F","A3_Characters_F_BLUFOR"};
   };
};


class CfgFactionClasses
{
class ZA_CORE //create a faction
{
	displayName = "ZA"; // name of faction (preferebly use abbreviation)
	priority = 100; // where in drop down list you want them (lower number moves up and vice verse)
	side = 1; // 1 is for blu_for side
       icon = "\ZA_CORE\Addons\Unit\ZuluAlpha\Icon\Icon.jpg";
   };
};


class CfgVehicleClasses
{
class ZA_Soldier_2014_Standard //create a soldier to be defined below
{
	displayName = "ZA Soldier"; //name (medic, Patrol leader, Second in command, Lead sclout)
   };
};

class CfgVehicles
{

   class B_Soldier_base_F; // Because soldier will be blu_for
   class B_Carryall_oucamo;

   class ZA_2014_Soldier_FieldUniform_Brown: B_Soldier_base_F //create a uniform base to define soldier from above
{
	scope = 2;
	displayName = "Standard (Brown)"; //Name shown in editor? or Inventory?
       faction = "ZA_CORE"; //specified in CfgFactionClasses
	vehicleClass = "ZA_Soldier_2014_Standard"; //specified in CfgVehicleClasses you created
       canCarryBackPack=1;
	canDeactivateMines=1;
	engineer=1; 
       attendant = "true";
	uniformAccessories[] = {};
       uniformClass = "ZA_2014_Soldier_FieldUniform_Brown"; //above mentioned class
	nakedUniform = "U_BasicBody"; //naked body model (use default)
	model = "\ZA_CORE\Addons\Models\za_uniform.p3d"; //link to custom (or vanilla) uniform model
	Items[] = {}; //items???
	weapons[] = {"Throw","Put"}; //in order to equip grenades and mines. also add primary and secondary weapons here
       magazines[] = {}; //if weapon provided, add magazines here, copy and paste as many magazines as you want
       linkedItems[] = {"ZA_Chestrig_Olive","ZA_Beret_Oxx","ItemWatch","ItemRadio","ItemGPS"}; //specify the vest and helmet here as well
	respawnLinkedItems[] = {"ZA_Chestrig_Olive","ZA_Beret_Oxx","ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS"}; //same as above, for if you want to respawn with this after death
       hiddenSelectionsTextures[] = {"\ZA_CORE\Addons\Gear\Uniform\Soldier\u_za_browns_uniform_co.paa"}; //link to custom (or vanilla) uniform texture
       hiddenSelections[] = {"Camo"};
       class Wounds
	{
		tex[] = {};
		mat[] = {"A3\Characters_F_Beta\INDEP\Data\ia_soldier_01_clothing.rvmat","A3\Characters_F_Beta\INDEP\Data\ia_soldier_01_clothing_injury.rvmat","A3\Characters_F_Beta\INDEP\Data\ia_soldier_01_clothing_injury.rvmat","A3\Characters_F\Heads\Data\hl_white_bald_muscular.rvmat","A3\Characters_F\Heads\Data\hl_white_bald_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_white_bald_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_black_bald_muscular.rvmat","A3\Characters_F\Heads\Data\hl_black_bald_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_black_bald_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_white_hairy_muscular.rvmat","A3\Characters_F\Heads\Data\hl_white_hairy_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_white_hairy_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_white_old.rvmat","A3\Characters_F\Heads\Data\hl_white_old_injury.rvmat","A3\Characters_F\Heads\Data\hl_white_old_injury.rvmat","A3\Characters_F\Heads\Data\hl_asian_bald_muscular.rvmat","A3\Characters_F\Heads\Data\hl_asian_bald_muscular_injury.rvmat","A3\Characters_F\Heads\Data\hl_asian_bald_muscular_injury.rvmat"};
	};
};
};

class cfgWeapons
{
class Uniform_Base;
class UniformItem;
class InventoryItem_Base_F;
class ItemCore;
class HeadGearItem;
class V_PlateCarrier1_rgr;
class VestItem;

class ZA_2014_Soldier_FieldUniform_Brown: Uniform_Base //special properties for uniform when taken off. inventory item
{
	scope = public;
       model = "\ZA_CORE\Addons\Models\suitpack_universal_F";
	displayName = "ZA Browns (Field Uniform)";
	picture = "\ZA_CORE\Addons\Gear\Uniform\Soldier\ui\icon_u_za_brownsuniform_ca.jpg";

	class ItemInfo: UniformItem
	{
		uniformModel = "-";
		uniformClass = "ZA_2014_Soldier_FieldUniform_Brown";
		containerClass="Supply60";
		mass=80;
	};
};
};

I'm probably going to have to sort of go back to previous build layout and try your suggestions. But first have a look and see, maybe you can point something out and I can learn something here. :)

Share this post


Link to post
Share on other sites

Your latest config looks fine, I think it may be in the wrong place, try moving it to your Units folder. I have never noticed a config.cpp lower than one sub-folder level.

Share this post


Link to post
Share on other sites

Well you see, the config that does work, is placed 3 levels down in hierarchy as well, just like my latest. Only difference is in previous build, I had uniforms, backpacks, headgear and vests catagorized in on folder titled Gear, now all I did was moved them all up into root of pbo, and did some renaming of the folders, and then updated config with new paths, and strangely that doesn't work now, even though I too can't see why it should not work at all. But I figured there was some rule of thumb I wasn't adhering to which you could have pointed out. But if you agree it should work, then I guess i'll call it a bug lol.

Anyhow, I'll try moving it to my units folder, and further up till I get to root, if it doesn't work, I'll just revert back to previous build, and make necessary changes there. not a big deal. If that breaks, then hell, it probably could be your suggested changes thats breaking it since thats all changes I'll make. (could possibly explain why modders copy the models into their mods perhaps?) I'll keep updated.

Thanks

---------- Post added at 19:10 ---------- Previous post was at 17:48 ----------

Okay so, I got it working... Kinda

So i figured out why mod wouldnt load, not sure where the problem lies completely yet, but gonna look further into it, and I can already say it has nothing to do where the config lies, because I tried that, and still didnt do anything, so I remembered I changed the root name of folder from za_core to just core in the new build, and that seems to be the problem, so if I change back to za_core then it works. And this without the need to update my paths in configs, and I think thats why my soldier now has an invisiable uniform, the textures are working, but path is incorrect.

The reason I posted this quickly, the belt buckle that is visible in the pic, would you guess that is what the insignia is referring too perhaps?

UPDATE

So anyhow, quickly updated the paths in my config script, and moved config back to original place, and tested with much SUCCESS

I am so very happy right now I could cry, finally i can go back to sleeping properly.. you have been such a big help, I cannot thank you enough.

So lastly, I have some last questions. (hope you dont mind answering if you can)

1. How did you identify that the ia_officer had more than one camo property and their names camo1, camo2 and insignia (not camo3)? If I am going to continue with my units uniform mod, I am going to experiment with a few different uniforms, and other future mods (maybe) so without having to poke you for answers, how would I tell which models require multiple textures and how would I tell which textures exactly? With this uniform I noted the ia_officer_co, but would never have guessed the ia_soldier_01_clothing_co was required, even if I knew I needed a secondary texture.

2. Would like if you could elaborate on that insignia, I am guessing it may be that belt buckle?

3. If my mods name is @test_mod, should the pbo name of the mod also be test_mod and not just mod? It is the only thing I can think of, however I am going to stick to that as a rule of thumb anyways.

4. How can I thank you? LOL I'm sure I had another 1 or 2 important questions, but i'll poke you instead when they come up. I'll follow those guides you posted incase it gets covered there.

Thank you sooo much for your guidance and time. It is really appreciated and since above "soldier" is just a quick test to get everything working, you assisted me to get him looking "right" so I'll keep him and just rename to Surpher as base example in your honor =P

Edited by ShotgunSheamuS
update

Share this post


Link to post
Share on other sites

Glad you got it working.

1. The majority of hiddenSelections are "Camo". To check you can open the models in a text editor and search for "camo" sometimes you will find camo1, camo2 etc. You can also find what the original textures are this way by searching for "_co.paa". The model will look unreadable in a text editor but you should be able to see the character strings.

2. Insignia is a square patch on one or both of the arms, the belt buckle is most likely and area of the model mistakenly not covered by the hiddenSelection.

3. No too generic, You can call your mod folder what you like but you need to tag your classes and pbo to make them unique to you or your clan to avoid conflicting with other peoples addons. I use surph_ e.g. surph_addonName.pbo, surph_classname.

Share this post


Link to post
Share on other sites

Right. quickly tried opening the model in text editor, and voila... Your a boss lol,

I'll look up this insignia thing, I'm curious about it. Not so sure about the flagpatch on the soldier since it's in the texture, but ill go mess with it just to see the results. maybe you are right. =P

Okay well I'll keep my pbo name the same as mod folder name for future purposes, and I'll also try follow your naming convention suggested to avoid clashes with other probable mods.

Thanks again for your help! cheers

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  

×