Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

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

×