Jump to content
Sign in to follow this  
zeotrope

Adding a MEDIKIT or TOOLKIT to backpack

Recommended Posts

Now this is just plain frustrating. The only documentation I can find is based on lame ass INIT code and not config based code. Nothing seems logical about scripting when It comes to a simple wish: Add a medikit or toolbox to a given loadout.

So here are my 2 configs. Soldier and Backpack. I am unsure what command to use and where to place it. AddItemToBackpack???? Item? Items? WTF???

....Calm down. :)

Here is my soldier 1 config. Ive tried placing it in items and linked items with no luck. Why is the medikit different to other items?

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_Soldier1 { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class CfgVehicles { 

   class B_Soldier_base_F; 

   class Tacops_Soldier1_E : B_Soldier_base_F { 
       _generalMacro = "B_Soldier_F";
       scope = 2; 
       displayName = "Tacops Soldier 1";
picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 
       nakedUniform = "U_BasicBody";
       uniformClass = "Example_CombatUniform_mcam1";
       hiddenSelections[] = {"Camo"}; 
       hiddenSelectionsTextures[] = {"tacops_uni_gen1\clothes\data\uni_gen.paa"}; 
       model = "\A3\Characters_F\blufor\b_soldier_01.p3d";

       //Backpack = "Gen_tacops_D";
Backpack = "Gen_tacops_D";

items[] = {"FirstAidKit"};

weapons[] = {"LMG_Mk200_F","launch_B_Titan_short_F","Binocular"};

magazines[] = {
		"200Rnd_65x39_cased_Box",
		"200Rnd_65x39_cased_Box",
		"Titan_AT",
	      };

       linkedItems[] = {"ItemGPS","Tacops_NVGoggles","ItemMap","ItemCompass","itemRadio","ItemWatch","Tacops_Helmet_at1","Vest_tacops_D"};

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

   }; 

}; 

class cfgWeapons { 
   class Uniform_Base; 
   class UniformItem; 

   class Example_CombatUniform_mcam1 : Uniform_Base { 
       scope = 2; 
       displayName = "Tacops Soldier 1"; 
       picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 

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

And here is my backpack (Medical)

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_Soldier1 { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class CfgVehicles { 

   class B_Soldier_base_F; 

   class Tacops_Soldier1_E : B_Soldier_base_F { 
       _generalMacro = "B_Soldier_F";
       scope = 2; 
       displayName = "Tacops Soldier 1";
picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 
       nakedUniform = "U_BasicBody";
       uniformClass = "Example_CombatUniform_mcam1";
       hiddenSelections[] = {"Camo"}; 
       hiddenSelectionsTextures[] = {"tacops_uni_gen1\clothes\data\uni_gen.paa"}; 
       model = "\A3\Characters_F\blufor\b_soldier_01.p3d";

       //Backpack = "Gen_tacops_D";
Backpack = "Gen_tacops_D";

items[] = {"FirstAidKit"};

weapons[] = {"LMG_Mk200_F","launch_B_Titan_short_F","Binocular"};

magazines[] = {
		"200Rnd_65x39_cased_Box",
		"200Rnd_65x39_cased_Box",
		"Titan_AT",
	      };

       linkedItems[] = {"ItemGPS","Tacops_NVGoggles","ItemMap","ItemCompass","itemRadio","ItemWatch","Tacops_Helmet_at1","Vest_tacops_D"};

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

   }; 

}; 

class cfgWeapons { 
   class Uniform_Base; 
   class UniformItem; 

   class Example_CombatUniform_mcam1 : Uniform_Base { 
       scope = 2; 
       displayName = "Tacops Soldier 1"; 
       picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 

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

Summary: how are medikits and toolkits added to a backpack?

Zeo

Edited by Zeotrope

Share this post


Link to post
Share on other sites

You have to create a new backpack

class base_backpack_class;

class new_backpack : base_backpack_class {

	class TransportItems {

		class _xx_medikit {
			name = "medikit";
			count = 1;
		};

		class _xx_toolkit {
			name = "toolkit";
			count = 1;
		};
	};
};

then for your soldier, you have to have backpack = "new_backpack";

obviously, for the backpacks I just used general made up names

but, based on what I see from your config...

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_Soldier1 { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class CfgVehicles { 

   class B_Soldier_base_F; 
   [color="#FF0000"]class Gen_tacops_D;[/color]

   class Tacops_Soldier1_E : B_Soldier_base_F { 
       _generalMacro = "B_Soldier_F";
       scope = 2; 
       displayName = "Tacops Soldier 1";
picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 
       nakedUniform = "U_BasicBody";
       uniformClass = "Example_CombatUniform_mcam1";
       hiddenSelections[] = {"Camo"}; 
       hiddenSelectionsTextures[] = {"tacops_uni_gen1\clothes\data\uni_gen.paa"}; 
       model = "\A3\Characters_F\blufor\b_soldier_01.p3d";

       //Backpack = "Gen_tacops_D";
Backpack = "Gen_tacops_D";

items[] = {"FirstAidKit"};

weapons[] = {"LMG_Mk200_F","launch_B_Titan_short_F","Binocular"};

magazines[] = {
		"200Rnd_65x39_cased_Box",
		"200Rnd_65x39_cased_Box",
		"Titan_AT",
	      };

       linkedItems[] = {"ItemGPS","Tacops_NVGoggles","ItemMap","ItemCompass","itemRadio","ItemWatch","Tacops_Helmet_at1","Vest_tacops_D"};

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

   }; 

[color="#FF0000"]class Gen_tacops_D_toolkit : Gen_tacops_D {

	class TransportItems {

		class _xx_toolkit {
			name = "toolkit";
			count = 1;
		};
	};[/color]

}; 

class cfgWeapons { 
   class Uniform_Base; 
   class UniformItem; 

   class Example_CombatUniform_mcam1 : Uniform_Base { 
       scope = 2; 
       displayName = "Tacops Soldier 1"; 
       picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 

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

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_Soldier1 { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class CfgVehicles { 

   class B_Soldier_base_F; 
   [color="#FF0000"]class Gen_tacops_D;[/color]

   class Tacops_Soldier1_E : B_Soldier_base_F { 
       _generalMacro = "B_Soldier_F";
       scope = 2; 
       displayName = "Tacops Soldier 1";
picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 
       nakedUniform = "U_BasicBody";
       uniformClass = "Example_CombatUniform_mcam1";
       hiddenSelections[] = {"Camo"}; 
       hiddenSelectionsTextures[] = {"tacops_uni_gen1\clothes\data\uni_gen.paa"}; 
       model = "\A3\Characters_F\blufor\b_soldier_01.p3d";

       //Backpack = "Gen_tacops_D";
Backpack = "Gen_tacops_D";

items[] = {"FirstAidKit"};

weapons[] = {"LMG_Mk200_F","launch_B_Titan_short_F","Binocular"};

magazines[] = {
		"200Rnd_65x39_cased_Box",
		"200Rnd_65x39_cased_Box",
		"Titan_AT",
	      };

       linkedItems[] = {"ItemGPS","Tacops_NVGoggles","ItemMap","ItemCompass","itemRadio","ItemWatch","Tacops_Helmet_at1","Vest_tacops_D"};

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

   }; 

[color="#FF0000"]class Gen_tacops_D_medikit : Gen_tacops_D {

	class TransportItems {

		class _xx_medikit {
			name = "medikit";
			count = 1;
		};
	};[/color]

}; 

class cfgWeapons { 
   class Uniform_Base; 
   class UniformItem; 

   class Example_CombatUniform_mcam1 : Uniform_Base { 
       scope = 2; 
       displayName = "Tacops Soldier 1"; 
       picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa"; 

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

Take note that this creates new items, so you'll see them in VAS.

Edited by BadHabitz

Share this post


Link to post
Share on other sites

Thanks for your time man. I used the last config (medikit) you show above with the following error log..

File c:\users\user\desktop\tacops_master_copy\tacops_uni_gen1\config.cpp, line 88: /CfgVehicles/: Missing '}'

Error 3 while parsing

Error in config c:\users\user\desktop\tacops_master_copy\tacops_uni_gen1\config.cpp

w:\C_branch\Poseidon\Arrowhead\El\ParamFile\paramFile.cpp(753) : Class destroyed, but still locked

File c:\users\user\desktop\tacops_master_copy\tacops_uni_gen1\config.cpp, line 88: /CfgVehicles/: Missing '}'

Error 3 while parsing

Error in config c:\users\user\desktop\tacops_master_copy\tacops_uni_gen1\config.cpp

w:\C_branch\Poseidon\Arrowhead\El\ParamFile\paramFile.cpp(753) : Class destroyed, but still locked

Cannot load font core\data\fonts\lucidaconsoleb8

Fonts file \core\data\fonts\lucidaConsoleB8 not found

Cannot load font core\data\fonts\lucidaconsoleb11

Fonts file \core\data\fonts\lucidaConsoleB11 not found

Creating texture headers file...

1 texture headers saved to file "C:\Users\User\AppData\Local\Temp\ARMAaddons\tacops_uni_gen1\texHeaders.bin"

w:\C_branch\Poseidon\Arrowhead\El\FileServer\fileServer.cpp(2513) : Assertion failed 'req->RefCounter()==1'

Share this post


Link to post
Share on other sites
Thanks for your time man. I used the last config (medikit) you show above with the following error log..

Think I forgot a closed squiggly...

class Gen_tacops_D_medikit : Gen_tacops_D {

	class TransportItems {

		class _xx_medikit {
			name = "medikit";
			count = 1;
		};
	};

}; 

class Gen_tacops_D_medikit : Gen_tacops_D {

	class TransportItems {

		class _xx_medikit {
			name = "medikit";
			count = 1;
		};
	};
       [color="#FF0000"][b]};[/b][/color]
}; 

Not easy for me to do this at work without my configs and Notepad++.

The close in red closes the open in the first line. Next one up closes TransportItems. The one up after that closes the _xx_medikit. Should work. You'll have to do the same for the toolkit selection as well.

Whenever you see errors, always scour your config and make sure every open has a close with it, because for me that represents the majority of my pbo pack failures.

Edited by BadHabitz

Share this post


Link to post
Share on other sites

Well it works without error...but that still does not provide a medikit in the ruck....it's empty.

Is it the fact that my player isn't a medic class? Not sure how that works. But my point is, what's the use of carrying a medikit if I cant use it as e medic :) How can I make my player a medic?

Zeo

Share this post


Link to post
Share on other sites
How can I make my player a medic?

Try adding attendant = 1; to your unit.

Share this post


Link to post
Share on other sites

I forgot that once you create Gen_tacops_D_medikit that you need to assign that to your soldier. Actually, I mentioned it in my first post, but didn't add it once I started filling out your config. Your line should be backpack = "Gen_tacops_D_medikit";

Share this post


Link to post
Share on other sites

OK all working. Here is my config. I needed to add reference to the classname so it would work. But thanks guys. Also, is there are a hand list of all ICONMAN icons? And can I force a rank from the config below? They seem to be all team leaders. Anyway great help as usual. Thank you.

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_Soldier3 {

units[] = {};

weapons[] = {};

requiredVersion = 0.1;

requiredAddons[] = {"A3_Characters_F", "A3_Characters_F_BLUFOR"};

};

};

class med_tacops_D;

class CfgVehicles {

class B_Soldier_base_F;

class med_tacops_D;

class Tacops_Soldier3_E : B_Soldier_base_F {

_generalMacro = "B_Soldier_F";

scope = 2;

displayName = "Tac-Ops Medic";

nakedUniform = "U_BasicBody";

uniformClass = "Example_CombatUniform_mcam3";

hiddenSelections[] = {"Camo"};

hiddenSelectionsTextures[] = {"tacops_uni_gen3\clothes\data\uni_gen3.paa"};

model = "\A3\Characters_F\blufor\b_soldier_03.p3d";

attendant = 1;

icon = "iconManMedic";

Backpack = "med_tacops_D_medikit";

items[] = {"FirstAidKit"};

weapons[] = {"LMG_Mk200_MRCO_F","Binocular"};

respawnweapons[] = {"LMG_Mk200_MRCO_F","Binocular"};

magazines[] = {

"200Rnd_65x39_cased_Box",

"200Rnd_65x39_cased_Box",

};

Respawnmagazines[] = {

"200Rnd_65x39_cased_Box",

"200Rnd_65x39_cased_Box",

};

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

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

};

class med_tacops_D_medikit : med_tacops_D {

class TransportItems {

class _xx_medikit {

name = "medikit";

count = 1;

};

};

};

};

class cfgWeapons {

class Uniform_Base;

class UniformItem;

class Example_CombatUniform_mcam3 : Uniform_Base {

scope = 2;

displayName = "Tacops Soldier 3";

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

class ItemInfo : UniformItem {

uniformModel = "-";

uniformClass = "Tacops_Soldier3_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

Try changing B_Soldier_base_F & B_Soldier_F to B_medic_F to make him a combat life saver with proper symbology.

  • Thanks 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
Sign in to follow this  

×