Jump to content
Sign in to follow this  
Sertica

Item Config Wiki Is Confusing

Recommended Posts

https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide

Quote

class Existing_Base_Class; // If an existing class is to be adjusted, it has to be declared using the class it inherits from originally. The new values of properties are used instead of the original ones. class Existing_Class: Existing_Base_Class { property = value; };

 

The wiki says to declare the class and parent class to override the members.  But the config viewer shows multiple parent classes.  So I can't see the logic of identifying which one class you need to declare extension from.  E.g., I want to change the B_Caryall_oli backpack class to a "Tent Backpack" for script use in my mission.  The wiki says to inherit from Bag_Base, but why that one?  There are 7 parents according to config viewer.  Here is the array:

["B_Carryall_Base","Bag_Base","ReammoBox","Strategic","Building","Static","All"]

It looks like single inheritance from right to left.  Would it not be B_Carryall_Base instead of Bag_Base?

class cfgVehicles {
	class B_Carryall_Base;
	class B_Carryall_oli:B_Carryall_Base {
		displayName = "Tent Backpack";
		maximumLoad = 0;
		mass = 320;
	};
};

 

Share this post


Link to post
Share on other sites

The truth is, both are correct. The long way around and more old-fashioned way of doing things would be to type up the entire inheritance tree. However, this is no longer required since...well a long time ago when the engine was updated. Your method is perfectly functional and is simply a short-hand way of doing things now that was introduced in ArmA3 (I think).

Share this post


Link to post
Share on other sites

There seems to be a way to edit configs in mission files without a mod.  In Invade & Annex the CSAT troops do more missile damage to NATO tanks than vice versa.

Share this post


Link to post
Share on other sites

I found a way to make the bag assemble into a tent.  The engine recognizes the AssembleInfo class copied from the vanilla weapon bags.

class cfgVehicles {
	class B_Carryall_oli;
	class TentBackpack:B_Carryall_oli {
		class AssembleInfo {
			assembleTo = "Land_TentDome_F";
			base = "";
			displayName = "Small Tent";
			dissasembleTo[] = {};
			primary = 1;
		};
		displayName = "Tent Backpack";
		maximumLoad = 0;
		mass = 320;
	};
};

 

Share this post


Link to post
Share on other sites

@Sertica, I made a small mod a couple of months ago that does just that. ^^ 

Feel free to break it open and take a look, it might help with your endeavours.  

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  

×