Jump to content
Sign in to follow this  
kosmonaut

Replacement Pack Questions

Recommended Posts

So I want to replace the default weapons of various Takistani insurgents/Russians/CDF/etc with RH's AK pack. I've been using this replacement pack by RangerPL for reference. Here's an example bit of code from it:

class USMC_Soldier : USMC_Soldier_Base {
	weapons[] = {"RH_m16a4aim", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West", "HandGrenade_West", "HandGrenade_West"};
	respawnWeapons[] = {"RH_m16a4aim", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenade_West", "HandGrenade_West"};
};

.. replacing the basic USMC rifleman's default M16A4 with its RH equivalent. What I need help with is specifically the "USMC_Soldier_Base" component - where do I find a list of these and how do I know which to use for which unit?

thanks in advance

Edited by kosmonaut

Share this post


Link to post
Share on other sites

You define an inheritance relation this way:

class USMC_Soldier_Base;

Either get the "all in one" config or use the SIX config browser.

Share this post


Link to post
Share on other sites

From my Side, i would like to recommend you to do the Weapon Loadout optional as a second Config. Because if you got Problems in Missions with that, you can switch back to standard Weapon Loadout the easy Way. :)

Share this post


Link to post
Share on other sites
You define an inheritance relation this way:

Either get the "all in one" config or use the SIX config browser.

So I could define it as whatever I wanted? I'm afraid I don't really understand.

Share this post


Link to post
Share on other sites

class SoldierWB : CAManBase {
	class TalkTopics : TalkTopics {};
};

class US_Soldier_Base : SoldierWB {};

class US_Soldier_Pilot_EP1 : US_Soldier_Base {
	weapons[] = {"rh_m4a1r", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnWeapons[] = {"rh_m4a1r", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
};

class US_Delta_Force_EP1 : US_Soldier_Base {
	weapons[] = {"rh_m4a1aim", "NVGoggles", "Binocular_Vector", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "M9"};
	magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "ACE_Battery_Rangefinder", "HandGrenade_West"};
	respawnweapons[] = {"rh_m4a1aim", "NVGoggles", "Binocular_Vector", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "itemGPS", "M9"};
	respawnmagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "ACE_Battery_Rangefinder", "HandGrenade_West", "IR_Strobe_Target", "SmokeShellRed", "15Rnd_9x19_M9", "15Rnd_9x19_M9"};
};
};

This didn't give me any errors on launch, but in the editor the units were both removed from the US faction, and moved to BLUFOR -> Other -> Men {ARMY) and {Special Forces) for the pilot and operator respectively.

This also occurred with some Takistani army units I replaced the weapons for.

help?

Share this post


Link to post
Share on other sites

http://www.MegaShare.com/3860419

Cleaned up.

class CfgPatches {
class RPL_USMC_RP {
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.09;
	requiredAddons[] = {"CACharacters", "CACharacters2", "rh_m4_cfg"};
};
};

class CfgVehicles [color="Blue"]{[/color]
[color="Red"]class Land;	// External class reference[/color]
[color="red"]class Man;	// External class reference[/color]

[color="red"]class CAManBase : Man {
	class TalkTopics;	// External class reference

	class HitPoints {
		class HitHead;	// External class reference
		class HitBody;	// External class reference
	};
};

class SoldierWB : CAManBase {
	class TalkTopics : TalkTopics {};
};
[/color]	class US_Soldier_Base[color="Red"] : SoldierWB {};[/color]

[color="red"]class US_Soldier_EP1 : US_Soldier_Base {
[color="blue"]};[/color][/color]
class US_Soldier_Pilot_EP1 : US_Soldier_Base {
	weapons[] = {"rh_m4a1r", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnWeapons[] = {"rh_m4a1r", "NVGoggles", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
[color="Red"]};[/color]      };

       class US_Delta_Force_EP1 : US_Soldier_Base {
	weapons[] = {"rh_m4a1aim", "NVGoggles", "Binocular_Vector", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "M9"};
	magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "ACE_Battery_Rangefinder", "HandGrenade_West"};
	respawnweapons[] = {"rh_m4a1aim", "NVGoggles", "Binocular_Vector", "Throw", "Put", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "itemGPS", "M9"};
	respawnmagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "ACE_Battery_Rangefinder", "HandGrenade_West", "IR_Strobe_Target", "SmokeShellRed", "15Rnd_9x19_M9", "15Rnd_9x19_M9"};
[color="red"]};[/color]     };
};
};

Red marked Stuff is not needed. You´re only need the Base Class "US_Soldier_Base" here under ClassCfgVehicles. And the Config couldn´t work, since you´ve closed Class CfgVehicles without the Unit Configs (blue Brackets). The Brackets under the Unit Classes are wrong also (red brackets). They should be where i have set the Brackets on the right.

Edited by Humvee28

Share this post


Link to post
Share on other sites

My take:

class CfgPatches
{
class RPL_USMC_RP
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CACharacters2","rh_m4_cfg"};
};
};
class CfgVehicles
{
class US_Soldier_EP1;
class US_Soldier_Pilot_EP1: US_Soldier_Base
{
	weapons[] = {"rh_m4a1r","NVGoggles","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
	respawnWeapons[] = {"rh_m4a1r","NVGoggles","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
};
class US_Delta_Force_EP1: US_Soldier_Base
{
	weapons[] = {"rh_m4a1aim","NVGoggles","Binocular_Vector","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio","M9"};
	magazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","ACE_Battery_Rangefinder","HandGrenade_West"};
	respawnweapons[] = {"rh_m4a1aim","NVGoggles","Binocular_Vector","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio","itemGPS","M9"};
	respawnmagazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","ACE_Battery_Rangefinder","HandGrenade_West","IR_Strobe_Target","SmokeShellRed","15Rnd_9x19_M9","15Rnd_9x19_M9"};
};
};

Normally weapons and respawnweapons should have the same definition/content.

Same for magazines.

Share this post


Link to post
Share on other sites

Thanks a bunch Humvee! It works fine now.

On a (mostly) unrelated note, I'm modifying Binkowski's Army '09 units (for personal purposes of course) and I'm having trouble giving a unit a functioning backpack.

		class bink_usa_aar : USMC_Soldier {
	vehicleClass = "BINK_ACUMen";
	faction = "USArmy";
[color="Red"]		backpack = "US_Assault_Pack_AmmoSAW_EP1";
[/color]		displayName = "Asst. Automatic Rifleman";
	model = "\BINK_US_ACU\models\bink_usa_rifleman_1";
	weapons[] = {"rh_m4a1aim", "NVGoggles", "Throw", "Put", "ItemGPS", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	magazines[] = {"30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "HandGrenade_West", "HandGrenade_West", "SmokeShell", "SmokeShell"};
	respawnWeapons[] = {"rh_m4a1aim", "NVGoggles", "Throw", "Put", "ItemGPS", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnMagazines[] = {"30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG"};

	class Wounds {
		tex[] = {};
		mat[] = {"BINK_US_ACU\data\r1hhl.rvmat", "BINK_US_ACU\data\r1hhl_w1.rvmat", "BINK_US_ACU\data\r1hhl_w2.rvmat", "BINK_US_ACU\data\r1l.rvmat", "BINK_US_ACU\data\r1l_W1.rvmat", "BINK_US_ACU\data\r1l_W2.rvmat"};
	};
};

The unit was based off the basic bink_usa_rifleman_1, but obviously I changed him into an automatic rifleman. I also added a SAW ammo backpack. However, when I get ingame, he has no backpack at all. The backpack line (in red) is the same as in BIS' assistant automatic rifleman unit. What did I do wrong?

many thanks

And I'm sorry for being so needy, I'm just sort of jumping headlong into config modding and there doesn't seem to be much readily available documentation on the sorts of problems I encounter :(

Share this post


Link to post
Share on other sites

		class bink_usa_aar : USMC_Soldier {
	vehicleClass = "BINK_ACUMen";
	faction = "USArmy";
               [color="Blue"]canCarryBackpack = 1;[/color]
	backpack = "US_Assault_Pack_AmmoSAW_EP1";
	displayName = "Asst. Automatic Rifleman";
	model = "\BINK_US_ACU\models\bink_usa_rifleman_1";
	weapons[] = {"rh_m4a1aim", "NVGoggles", "Throw", "Put", "ItemGPS", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	[color="Red"]magazines[] = {"30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "HandGrenade_West", "HandGrenade_West", "SmokeShell", "SmokeShell"};[/color]
	respawnWeapons[] = {"rh_m4a1aim", "NVGoggles", "Throw", "Put", "ItemGPS", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	[color="Red"]respawnMagazines[] = {"30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG", "30Rnd_556x45_STANAG"};[/color]

	class Wounds {
		tex[] = {};
		mat[] = {"BINK_US_ACU\data\r1hhl.rvmat", "BINK_US_ACU\data\r1hhl_w1.rvmat", "BINK_US_ACU\data\r1hhl_w2.rvmat", "BINK_US_ACU\data\r1l.rvmat", "BINK_US_ACU\data\r1l_W1.rvmat", "BINK_US_ACU\data\r1l_W2.rvmat"};
	};
};

Try it with the blue marked Entry. And as PvPScene has mentioned before :

Normally weapons and respawnweapons should have the same definition/content.

Same for magazines.

And I'm sorry for being so needy, I'm just sort of jumping headlong into config modding and there doesn't seem to be much readily available documentation on the sorts of problems I encounter :(

No Problem. Everyone has started somewhere. I´m a Beginner just like you, only a tiny bit more advanced. :)

People like PvPScene are the Guys with rich Expirience. So you should check his Examples and Explantations first, and work with it ;)

Share this post


Link to post
Share on other sites

When I do that, he appears to have no backpack ingame and there is no action to open a backpack, but after I kill him an option (but still no backpack) appears. Very strange.

Share this post


Link to post
Share on other sites

The model needs to support backpacks, aka have a memory point/selection for it.

The config entry is only to have it working technically - not visually.

Share this post


Link to post
Share on other sites
When I do that, he appears to have no backpack ingame and there is no action to open a backpack, but after I kill him an option (but still no backpack) appears. Very strange.

Trial&Error. Welcome. :D

The model needs to support backpacks, aka have a memory point/selection for it.

If i remember right, Bink has mentioned that these Units doesn´t support Backpacks, because they´re made before OA cames out. The Medic got a Ruck, but the Ruck seems to be "build in" in the Model. That´s a pitty, because i like them very much too. :(

The config entry is only to have it working technically - not visually.

Aha. Didn´t known that. Thanks for the Advice.

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  

×