Jump to content
Microbicus

Base damage

Recommended Posts

I'd like to ask if someone could explain how base damage works?

The idea is to edit base damage from grenades/ammo/melee and/or increase structure durability, but I couldn't even find where these variables are stored...

Please help xD

Share this post


Link to post
Share on other sites

DZ\gear\camping\config.cpp has base building objects. for example class Fence. There are nested classes within class Fence with fields that specify the "Armor" of the Fence's components (e.g. Wooden Upper Wall, Wooden Lower Wall etc.). So for example there is a nested class with the name "Wall_Wood_Down" and within that class there is a ArmorType of Melee for Health with a damage field of:

damage=0.64999998;

this field says how much damage to let thru. so for example the Splitting Axe does 15 melee damage. with the field above the wall receive: 15*0.64999998=9.7 damage. so if you set it to 1 the wall gets the full damage of a weapon. if you set it to 0 the lower wall will get no melee damage even if you pound on it with an axe.

So now for example I make this to change the armor of the Wall_Wood_Down so it receives no melee damage. making a mod (with a name for example "TestWallCfgOverride") with this config.cpp below that changes the damage field to 0. and now i can hit the wooden lower wall again and again no damage it is still at 16000 health:

class CfgPatches
{
	class TestWallCfgOverride
	{
		requiredVersion=0.1;
		units[]={"Fence"};
		requiredAddons[]={"DZ_Data","DZ_Gear_Camping"};
	};
};
class CfgVehicles
{
	class BaseBuildingBase;
	class Fence: BaseBuildingBase
	{
		class DamageSystem
		{
			class DamageZones
			{
				class Wall_Wood_Down
				{
					class ArmorType
					{
						class Melee
						{
							class Health
							{
								damage=0;
							};
						};
					};
				};
			};
		};
	};
};

 

Edited by david4460

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

×