Jump to content

How can i make traders killable?


Bestia

Recommended Posts

I have been modding the traders on my server. The traders on my server is wandering around instead of beeing stuck in the trader area. They also kill bandits, zombies and animals. To make this game more realistic i need to make traders "killable".

I have gone through all my xml's to find a way to modify this, but i cant find it. Max health is set, but they simply wont die.

 

Does anyone know how to make traders killable?

 

Thanks in advance.

 

 

:smile-new:

Link to comment
Share on other sites

You can't while keeping the game EAC friendly. Modifying one of the dll files is where you can change that afaik. But doing so breaks EAC

 

Thanks. EAC is not activated on ny server. Do you know which .DLL must be edited?

 

- - - Updated - - -

 

- - - Updated - - -

Link to comment
Share on other sites

  • 1 year later...

assembly-csharp.dll

 

its possible this is involved with why traders cant be killed

	// Token: 0x06002F72 RID: 12146 RVA: 0x001611F5 File Offset: 0x0015F5F5
public override int DamageEntity(DamageSource _damageSource, int _strength, bool _criticalHit, float _impulseScale)
{
	if (this.NPCInfo != null && this.NPCInfo.TraderID > 0)
	{
		return 0;
	}
	return base.DamageEntity(_damageSource, _strength, _criticalHit, _impulseScale);
}

// Token: 0x06002F73 RID: 12147 RVA: 0x00161220 File Offset: 0x0015F620
public override void ProcessDamageResponseLocal(DamageResponse _dmResponse)
{
	if (this.NPCInfo != null && this.NPCInfo.TraderID > 0)
	{
		return;
	}
	base.SetAttackTarget((EntityAlive)GameManager.Instance.World.GetEntity(_dmResponse.Source.getEntityId()), 600);
	base.ProcessDamageResponseLocal(_dmResponse);
}

// Token: 0x06002F74 RID: 12148 RVA: 0x0016127C File Offset: 0x0015F67C
public override void AwardKill(EntityAlive killer)
{
	if (this.NPCInfo != null && this.NPCInfo.TraderID > 0)
	{
		return;
	}
	base.AwardKill(killer);
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...