Jump to content
Sign in to follow this  
AlphaWolF

Need help to get a uniform working.

Recommended Posts

Basically after 4 weeks Ive managed to get headgear, Custom heads, Vests, all working in game using and slightly modifying the character samples in the tools.

But I am unable to get uniforms working no matter what :( could some one please point out where the issue is as selecting the model from the list in VR arsenal, displays nothing but the naked base body.

Thanks in advance to those who can be bothered to help.

CONFIG.CPP

#include "basicdefines_A3.hpp"
class DefaultEventhandlers;

#include "cfgPatches.hpp"

#include "cfgheads.hpp"

class UniformSlotInfo;

class CfgVehicles
{
class Man;
class CAManBase: Man
{
	class HitPoints
	{
		class HitHead;
		class HitBody;
		class HitHands;
		class HitLegs;
	};
};

class SoldierWB: CAManBase
{
	threat[] = {1, 0.1, 0.1};
};

//Base class for BLUFOR soldiers
class Test_Soldier_base_F: SoldierWB
{
	faceType = Man_A3; /// this soldier is going to use standard faces
	side = 1; /// that means BLUFOR
	faction = BLU_F; /// Standard NATO faction
	genericNames = "NATOMen"; /// Standard names for lads of NATO (and European civils)
	vehicleClass = Men; /// Should be listed under Men

	scope = 0; /// base class should not be visible in editor
	class Wounds /// changes material of skin according to damage
	{
		tex[] = {};
		mat[] = {
			"A3\Characters_F\Common\Data\basicbody.rvmat", 			/// what material is changed
			"A3\Characters_F\Common\Data\basicbody_injury.rvmat",	/// how does the material look like in damage 0.5 and more
			"A3\Characters_F\Common\Data\basicbody_injury.rvmat",	/// how does the material look like while the part has damage 1	

			"A3\Characters_F\Heads\Data\hl_white_bald_muscular.rvmat",			/// next materials are used through personality of the soldier
			"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"					
		};
	};

	model 			= "\Metal_Gear_Solid\A3_character_example.p3d"; /// path to model
	modelSides[] 	= {3, 1}; 				/// what sides could use this uniform, means civilians and BLUFOR can use it
	nakedUniform 	= "U_BasicBody";		/// what "uniform" does this soldier use without any other uniform
	uniformClass 	= "Octocamo";		/// standard uniform used by this soldier, there is a special one defined later

	class UniformInfo /// defines allowed slots of the uniform
	{
		class SlotsInfo
		{
			class NVG: UniformSlotInfo {slotType = NVG_SLOT; };
			class Scuba: UniformSlotInfo {slotType = SCUBA_SLOT;};
			class Googles: UniformSlotInfo {slotType = GOGGLE_SLOT;};
			class Headgear: UniformSlotInfo {slotType = HEADGEAR_SLOT;};
		};
	};

	class HitPoints : HitPoints
	{
		class HitHead: HitHead {armor = 0.3*HeadArmourCoef;}; /// default soldier doesn't have any head armour, uses helmet
		class HitBody: HitBody {armor = 0.5*BodyArmourCoef;}; /// default soldier doesn't have protective uniform on body, uses vest
		class HitHands: HitHands {armor = 0.8*HandArmourCoef;}; /// some protection for hands by uniform
		class HitLegs: HitLegs {armor = 0.8*LegArmourCoef;}; /// some protection for legs by uniform
	};

	hiddenSelections[] = {"Camo", "insiginia"}; /// selection defined in sections of model that may have texture and materials changed by setObjectTexture or next parameter
	hiddenSelectionsTextures[] = {"\a3\characters_f\common\data\basicbody_grey_co.paa"}; /// what texture does this soldier use for camo selection

	weapons[] = {Test_weapon_01_holo_pointer_F, Throw, Put}; /// we have a sample weapon, why not use it? Throw and put weapons are required for grenades/mines
	respawnWeapons[] = {Test_weapon_01_holo_pointer_F, Throw, Put}; /// should be the same as previous most of the time
	Items[] = {FirstAidKit}; /// one First aid kit is good to start with
	RespawnItems[] = {FirstAidKit};
	magazines[] = {30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, HandGrenade, HandGrenade};
	respawnMagazines[] = {30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, 30Rnd_test_mag, HandGrenade, HandGrenade};		
	linkedItems[] = {V_Test_Vest, H_Test_Headgear, ItemMap, ItemCompass, ItemWatch, ItemRadio, NVGoggles}; /// items directly in inventory slots
	respawnLinkedItems[] = {V_Test_Vest, H_Test_Headgear, ItemMap, ItemCompass, ItemWatch, ItemRadio, NVGoggles};
};

class Test_Soldier_F: Test_Soldier_base_F /// class visible in editor
{
	scope = 2; /// scope needs to be 2 to have a visible class
	displayName = "Test Soldier"; /// what's displayed in editor or on cursor over
};
};

class cfgWeapons
{
class InventoryItem_Base_F;
class ItemCore;
#include "cfgUniforms.hpp"	/// sample uniform is defined in a separate file to make it cleaner
#include "cfgVests.hpp"		/// sample vest is defined in a separate file to make it cleaner
#include "cfgHeadgear.hpp"	/// sample cap is defined in a separate file to make it cleaner
};

UNIFORMS.HPP

class UniformItem: InventoryItem_Base_F
{
type = UNIFORM_SLOT; /// to what slot does the uniform fit
};

class Octocamo: Itemcore
{
scope = 2; /// scope needs to be 2 to have a visible class
allowedSlots[] = {BACKPACK_SLOT}; /// where does the uniform fit to when not equipped
displayName = "Octocamo"; /// how would the stuff be displayed in inventory and on ground
picture = "\A3\characters_f\data\ui\icon_U_BasicBody_CA.paa"; /// this icon fits the uniform surprisingly well
model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver"; /// how does the uniform look when put on ground

class ItemInfo: UniformItem
{
	uniformModel = "-";
	uniformClass = Test_Soldier_base_F; /// what soldier class contains parameters of the uniform (such as model, camouflage, hitpoints and others)
	containerClass = Supply90; /// what fake vehicle is used to describe size of uniform container, there is quite a lot SupplyXX classes ready
	mass = 80; /// combined weight and volume
};
};

Edited by AlphaWolF

Share this post


Link to post
Share on other sites

From what I can see you need to redo your whole config. But rather than try articulate all the issues I think you need to have a read of some guides on doing custom characters.

Have a look here: https://community.bistudio.com/wiki/Arma_3_Modding_Characters

And in particular this:

http://forums.bistudio.com/showthread.php?148130-Arma3-Characters-Modding-Tutorial&p=2324469&viewfull=1#post2324469

Edited by pomigit

Share this post


Link to post
Share on other sites

Thanks for the links buddy ,but already have those and used them in the past.

There is no reason that what I have done shouldn't work as they are BI own sample files so I am left wondering is there own sample files DONT WORK! when it comes to uniforms, because from working on this solid for over a week now it seems im not alone in not being able to get uniforms to work.

I want to avoid going backwards and using old configs as it looks like BI have made a lot of changes in them that add new features so I want to stick to the sample files as they are the most recent updated ones.

HEADGEAR=CHECK!

VESTS=CHECK!

HEADS=CHECK!

FACTIONS=CHECK!

UNIFORMS=FAIL!

Update..

After some more research ive learned that Uniforms are handled under cfgWeapons but if this is the case Im now Totally confused as to the purpose of cfgUniforms.hpp in BI TOOLS sample files.

Im sure its a newer better method but there dosent seem to be any way to get it to work.

can anybody elaborate?

Edited by AlphaWolF

Share this post


Link to post
Share on other sites

Actually I think I may understand as I noticed that the uniforms.hpp and other equipment that would normally live under the cfgweapons entry is actually still listed under that entry just be it as an external file! but given the name uniforms to help navigation and understanding.

class cfgWeapons
{
class InventoryItem_Base_F;
class ItemCore;
#include "cfgUniforms.hpp"	/// sample uniform is defined in a separate file to make it cleaner
#include "cfgVests.hpp"		/// sample vest is defined in a separate file to make it cleaner
#include "cfgHeadgear.hpp"	/// sample cap is defined in a separate file to make it cleaner

---------- Post added at 22:38 ---------- Previous post was at 21:34 ----------

Still no JOY :mad:

Feel like im banging my head against a wall with these configs ive been at this for days and tried so much stuff but all i get is the uniform name in VR arsenal but upon selecting it NOTHING HAPPENS! just default naked body.

Or trying to load the uniform as part of a faction in editor gives me no entry '.model'. error

Share this post


Link to post
Share on other sites

I cant comment on BI's sample files as ive never used them. I personally learned like a lot of others by simply depboing the game files and looking at BI's own config files. By the look of things though the only "new" and different thing BI have done with the sample files is to separate uniforms, vests and headgear into separate hpp files and call them in the main config. This is purely for tidyiness, the construct of what is in the hpp files will still be the same as whats in the config and in those guides.

That aside, the first thing that struck me with your config is that you have defined classes for CAMAN and SoldierWB, and you are using SoldierWB as your base class, if this is what BI have in the sample files then I can tell you its totally unnecessary for 99% of character mods. This is why I directed you to the guides. You need to understand how class inheritance works

Edited by pomigit

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  

×