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

mrwolv

Remove Vehicle Damage since update

Recommended Posts

how do i remove the vehicle damage since update as it now calls sounds here is the damage part

 

override void OnContact( string zoneName, vector localPos, IEntity other, Contact data )
	{

		if ( zoneName == "" )
		{
			Print("CarScript >> ERROR >> OnContact dmg zone not defined!");
			return;
		}
		
		switch( zoneName )
		{
/*
			case "dmgZone_lightsLF":
				//Print("dmgZone_lightsLF");
			break;
			
			case "dmgZone_lightsRF":
				//Print("dmgZone_lightsRF");
			break;
*/
			default:
				if ( GetGame().IsServer() && zoneName != "")
				{
					float dmgMin = 150.0;	
					float dmgThreshold = 750.0;
					float dmgKillCrew = 3000.0;
					float dmg = data.Impulse * m_dmgContactCoef;

					if ( dmg < dmgThreshold )
					{					
						if ( dmg > dmgMin )
						{
							//Print( GetType() + " >>> " + " smlHit >>> " + "zoneName: "  + zoneName + " >>> - " + dmg.ToString() + " HP >>> in " + GetSpeedometer() + " km/h");
							AddHealth( zoneName, "Health", -dmg);
							//m_PlayCrashSoundLight = true;
							SynchCrashLightSound( true );
						}
					}
					else
					{
						//Print( GetType() + " >>> " + " BIGHit >>> " + "zoneName: " + zoneName + " >>> - " + dmg.ToString() + " HP >>> in " + GetSpeedometer() + " km/h" );
						for( int i =0; i < CrewSize(); i++ )
						{
							Human crew = CrewMember( i );
							if ( !crew )
								continue;

							PlayerBase player;
							if ( Class.CastTo(player, crew ) )
							{
								if ( dmg > dmgKillCrew )
								{		
									player.SetHealth(0.0);
								}
								else
								{
									//deal shock to player
									float shockTemp = Math.InverseLerp(dmgThreshold, dmgKillCrew, dmg);
									float shock = Math.Lerp( 50, 100, shockTemp );

									player.AddHealth("", "Shock", -shock );
									//Print( "SHOCK..........." + shock );
								}
							}
						}

						//m_PlayCrashSoundHeavy = true;
						SynchCrashHeavySound( true );
						ProcessDirectDamage( 3, null, zoneName, "EnviroDmg", "0 0 0", dmg );
					}
				}
			break;
		}
	}

 

Share this post


Link to post
Share on other sites

float dmg = data.Impulse * m_dmgContactCoef;

I'm not sure, but this seems to be where the damage is calculated. So maybe try adding in * 0.1 or whatever value you want to reduce the damage. Or 0 to eliminate it.

Share this post


Link to post
Share on other sites

Which file is this from? How would I go about editing it? 

Pardon my ignorance, I've been running my own server for a few weeks now, and while I've been able to tweak loot and mob spawns, I haven't yet figured out how to actually get in to the game files.

I've been scouring Google for info but can't find much.

Share this post


Link to post
Share on other sites

DayZServer\dta\scripts\4_World\Entities\Vehicles\CarScript.c

override void OnContact( string zoneName, vector localPos, IEntity other, Contact data )
{

}

If you remove the function completely the game will crash, just leave it completely empty like above.

Job Done, Enjoy no damage and enjoy still being alive after the impact..

Edited by MrSisterFister
Added more

Share this post


Link to post
Share on other sites
On 15/12/2018 at 6:28 PM, crobo said:

Which file is this from? How would I go about editing it? 

Pardon my ignorance, I've been running my own server for a few weeks now, and while I've been able to tweak loot and mob spawns, I haven't yet figured out how to actually get in to the game files.

I've been scouring Google for info but can't find much.

Use a PBO Manager: http://www.armaholic.com/page.php?id=16369

Most of the changes are in the "scripts.pbo" in the "dta" folder in the root of the DayZ Server directory.  Just stop server, make backup of PBO files you are changing, unpack the PBO, make your changes then Repack it and start your server again.

Good Luck

Share this post


Link to post
Share on other sites
2 hours ago, MrSisterFister said:

DayZServer\dta\scripts\4_World\Entities\Vehicles\CarScript.c

override void OnContact( string zoneName, vector localPos, IEntity other, Contact data )
{

}

If you remove the function completely the game will crash, just leave it completely empty like above.

Job Done, Enjoy no damage and enjoy still being alive after the impact..

this now calls a new error if the section is empty as it now calls sounds to vehicles just tested it with the same as it used to be and it dosent work anymore still damages them the cars just total them selfs after going to fast

Edited by mrwolv

Share this post


Link to post
Share on other sites
On 12/17/2018 at 8:01 AM, mrwolv said:

this now calls a new error if the section is empty as it now calls sounds to vehicles just tested it with the same as it used to be and it dosent work anymore still damages them the cars just total them selfs after going to fast

Has anyone tried it with the modified function I mentioned above? I haven't had the chance.

Share this post


Link to post
Share on other sites
On 12/17/2018 at 7:14 AM, MrSisterFister said:

Use a PBO Manager: http://www.armaholic.com/page.php?id=16369

Most of the changes are in the "scripts.pbo" in the "dta" folder in the root of the DayZ Server directory.  Just stop server, make backup of PBO files you are changing, unpack the PBO, make your changes then Repack it and start your server again.

Good Luck

Cheers!

Hold my beer, i'm going in.

Share this post


Link to post
Share on other sites
On 17/12/2018 at 2:01 PM, mrwolv said:

this now calls a new error if the section is empty as it now calls sounds to vehicles just tested it with the same as it used to be and it dosent work anymore still damages them the cars just total them selfs after going to fast

I'll have a look over Christmas if i can get my ass off Arma :)

Share this post


Link to post
Share on other sites

can I add water to the car at the spawn?
 with Essence and Oil

Share this post


Link to post
Share on other sites

×