Jump to content

[MRP Suggestion] Team Damage


AlexConway

Recommended Posts

-1. It seems like a great idea but I don't see it going over well with new players. Considering the community rarely does any sort of proper training (aside from Army with their new DS guide), new players aren't going to be taught how to utilize radio (read and write), how to take objectives (what side of the objective is gonna be US or RU), what the playermodels are, and so on. It's just going to lead to more accidental masses and in chaos would likely tip the balance of war onto the opposing side due to accidental friendly fire.

I don't play US that often so I can't recall seeing that many new players shooting at friendlies during war, but it happens at least once or twice every war on RU*.

 

I agree with enabling self-damage or enabling friendly fire with explosive damage, all of which are entirely possible in Gmod. If I'm not wrong based on what Conway is saying, and through experience playing the server, Garnet is doing more of a simple check of what "team" you are on when you take damage - rather than verifying some of that data, like: is the damage from an explosion, was the damage caused by a player, and was the attacking player also the victim.

Alternatively, you could still enable friendly fire but scale the damage (only for people on the same "team") so that a) people have time to identify if the person they're shooting is a friendly or not, b) people can't kill a friendly in one or two shots. The only issue with implementing it this way is that any self-damage would also be scaled - which could be solved by checking if the attacker is not the victim before checking whether or not the attacker and the victim are on the same "team" (this can be done in any order).

I'm assuming the gamemode function that Garnet is using is PlayerShouldTakeDamage, but you can actually get data about the damage source with EntityTakeDamage, allowing you to check if the damage is explosive or not among other things, like: the ammo type of the weapon that dealt damage to the player, the force and position of the damage, and so on. The implementation that would work (in pseudo-code) would look like this:

-- In this code, it should scale the damage if:
-- A) The victim and the attacker are on the same team
-- B) The victim and the attacker are not the same player
-- If A or B is not met, then the damage is not affected.

local scale = 0.25

hook.Add("EntityTakeDamage", "WarFriendlyFire", function(victim, dmg)
  local attacker = dmg:GetAttacker()
    if warisactive then

      -- EntityTakeDamage runs on all entities - check to make sure the victim is a player.
      if victim:IsPlayer() then

        -- check if same team
        if victim.team == attacker.team then

        -- check if victim is attacking self
        if victim != attacker then
			
          dmg:ScaleDamage(scale) 
          -- damage becomes 25% of the originl value
			
        end
      end
    end

  end
end)

This would NOT affect performance in any significant way as 2/3 of it is already happening.

Edited by Torch
* Forgot to end my sentence.
  • Cringe 1
  • 300 IQ 1
Link to comment

-1 This would be especially bad for new players as they arent familiar with the models and they basically shoot at anyone on sight. Again with grenade spam if you have a massive amount of both US and RU in one room fighting your nade could possibly get you a mass ban.

Self damage would be so bad as you can only kill yourself, but if you kill yourself you should get a FailRP warn

Link to comment

-1. Everything Don said is what I was thinking. And not only that but playing on donno class such as Riot or Ghillie you're going to get lit the fuck up, maybe suggest that hurting your own teammates in war is failRP but I  think that teammate being able  to mass in war just wouldn't be a very good idea again.

Edited by Maynard
  • Like 1
  • 300 IQ 1
Link to comment
  • Community Director
1 hour ago, Torch said:

-1. It seems like a great idea but I don't see it going over well with new players. Considering the community rarely does any sort of proper training (aside from Army with their new DS guide), new players aren't going to be taught how to utilize radio (read and write), how to take objectives (what side of the objective is gonna be US or RU), what the playermodels are, and so on. It's just going to lead to more accidental masses and in chaos would likely tip the balance of war onto the opposing side due to accidental friendly fire.

I don't play US that often so I can't recall seeing that many new players shooting at friendlies during war, but it happens at least once or twice every war on RU*.

 

I agree with enabling self-damage or enabling friendly fire with explosive damage, all of which are entirely possible in Gmod. If I'm not wrong based on what Conway is saying, and through experience playing the server, Garnet is doing more of a simple check of what "team" you are on when you take damage - rather than verifying some of that data, like: is the damage from an explosion, was the damage caused by a player, and was the attacking player also the victim.

The question at this point is whether or not adding extra checks to "verify" that data is worth the performance that it could take up, especially since it'd be ran every single time a player takes damage which would be taxing at 100 players during a war. I'm not sure what type of performance impact it would make, but I want to make aware of that concern.

 

EDIT: Alternatively, you could still enable friendly fire but scale the damage (only for people on the same "team") so that a) people have time to identify if the person they're shooting is a friendly or not, b) people can't kill a friendly in one or two shots. The only issue with implementing it this way is that any self-damage would also be scaled - which could be solved by checking if the attacker is not the victim before checking whether or not the attacker and the victim are on the same "team" (this can be done in any order).

I'm assuming the gamemode function that Garnet is using is PlayerShouldTakeDamage, but you can actually get data about the damage source with EntityTakeDamage, allowing you to check if the damage is explosive or not among other things, like: the ammo type of the weapon that dealt damage to the player, the force and position of the damage, and so on. The implementation that would work (in pseudo-code) would look like this:


-- In this code, it should scale the damage if:
-- A) The victim and the attacker are on the same team
-- B) The victim and the attacker are not the same player
-- If A or B is not met, then the damage is not affected.

local scale = 0.25

hook.Add("EntityTakeDamage", "WarFriendlyFire", function(victim, dmg)
  local attacker = dmg:GetAttacker()
    if warisactive then

      -- EntityTakeDamage runs on all entities - check to make sure the victim is a player.
      if victim:IsPlayer() then

        -- check if same team
        if victim.team == attacker.team then

        -- check if victim is attacking self
        if victim != attacker then
			
          dmg:ScaleDamage(scale) 
          -- damage becomes 25% of the originl value
			
        end
      end
    end

  end
end)

 

This is not at all how Garry's Mod or the war system works. The server runs off of DarkRP, you have no DarkRP call variables for team. You're making people think the solution is 10 lines of code, which it is far from. Not to mention the immense lag of constantly checking this function, you realize, every time someone fires a bullet it would run this command/function? People already think HitReg is unreliable. 

 

 

2 hours ago, solitario said:

-1 This is just gonna cause more harm than good

 

 

1 hour ago, Maynard said:

I think that teammate being able to mass in war just wouldn't be a very good idea again.

1 hour ago, Shibe said:

-1 Reasons stated above

1 hour ago, dude said:

mass ban.

 

As stated above, it's just like Self-Damage now, it's a verbal, then a failRP warn, not a MassRDM ban, unless it's clear intentional MassRDM/NITRP. 

 

11 hours ago, Alex Conway said:

First instance is more so slap on the wrist, second instance is a FailRP warn, 3rd, 4th, so on.

 

 

I understand your perspectives, but the server used to be like this and it was perfectly acceptable, the cases of this were few and far between, being here since the beginning I never ever saw a Tali or 11B MassRDM on an objective. The point is to add skill back to the server and to end the meta of aimless explosives and aimless hip-firing of LMGs without consequence. As well as bringing an element of skill of requiring to A. Communicate Friendly AND Enemy Positions B. Delay Reaction time by forcing people to identify a target C. Add some consequence for recklessness.

 

Thank you for your feedback

Link to comment
2 hours ago, Kruger said:

Let's be honest no one would want to do that. They also can just press f4 and look for themselves and that would save a lot of time.

You just summed up the majority of the servers mentality, they cannot be bothered. +1 this could make people think before they do something which hasn't happened for a while

  • Like 2
Link to comment

+1 to the idea of explosives dealing team damage 

-1 to guns dealing team damage. This will just allow people planning to Mass do it in war completely destroying the war effort for one side. It would also be hard to prove it was an intentional RDM in war making it hard to handle sits. 
 

I also don’t know how easy this would be for Garnet to code and with how hard he had been working recently this would be pretty far down on the priority list. 

Edited by Prince
  • Like 2
Link to comment
1 hour ago, Alex Conway said:

This is not at all how Garry's Mod or the war system works. The server runs off of DarkRP, you have no DarkRP call variables for team. You're making people think the solution is 10 lines of code, which it is far from. Not to mention the immense lag of constantly checking this function, you realize, every time someone fires a bullet it would run this command/function? People already think HitReg is unreliable. 

I prefaced the code I wrote calling it pseudo-code, as it is not the full thing but gives you an idea on how it is set up. For the most part, all of that section is actually fully written code, aside from two statements:

Checking if the war is active

Checking the teams of the players

 

I'm not the author of the war addon, so therefore I cannot say for certain how it works, but if it isn't spaghetti-code, then 10 lines of code is all you're going to need.

 

Considering that each class needs to be added individually to a "nation" for war (all of the classes that are implemented but can't cap at first), I'm going to assume one of two things.

There are arrays for both RU and US that classify each individual class, example:

NationUS = {
 TEAM_ARMYSOLDIER,
 TEAM_ARMYSUPPORT,
 TEAM_GBRIFLEMAN,
 TEAM_GBFIELDMEDIC,
 ...
}

Or each class is classified in categories, example:

Nations = {
	US = {
		["army"] = {
			TEAM_ARMYSOLIDER,
			TEAM_ARMYSUPPORT,
			...
		},
		...
	},
	...
}

Essentially what you'd be able to do with these two setups is check if the players team (DarkRP job, whatever you want to call it) exists within the table.

-- Method one (assuming its in a single array):
local plymeta = FindMetaTable("Player")

function plymeta:OnUSClass()
	for _, team in pairs(NationUS) do
		if self:Team() == team then
			return true
		end
	end
	return false
end

-- Method two (assuming its an array nested inside of two tables):
function plymeta:GetNation()
	for nation, categories in pairs(Nations) do
		for category, team in pairs(categories) do
			if self:Team() == team then
				return nation, category
			end
		end
	end
	return "other"
end

I know I'm not explaining in full detail here, but I don't want people to believe something that isn't true. My original response (given changes in the pseudo-code to how the addon is actually setup) would work just fine. There would be no major performance hit, if any at all.

Edited by Torch
  • 300 IQ 1
  • Winner 1
Link to comment
  • Community Director
12 minutes ago, Torch said:

I prefaced the code I wrote calling it pseudo-code, as it is not the full thing but gives you an idea on how it is set up. For the most part, all of that section is actually fully written code, aside from two statements:

Checking if the war is active

Checking the teams of the players

 

I'm not the author of the war addon, so therefore I cannot say for certain how it works, but if it isn't spaghetti-code, then 10 lines of code is all you're going to need.

 

Considering that each class needs to be added individually to a "nation" for war (all of the classes that are implemented but can't cap at first), I'm going to assume one of two things.

There are arrays for both RU and US that classify each individual class, example:


NationUS = {
 TEAM_ARMYSOLDIER,
 TEAM_ARMYSUPPORT,
 TEAM_GBRIFLEMAN,
 TEAM_GBFIELDMEDIC,
 ...
}

Or each class is classified in categories, example:


Nations = {
	US = {
		["army"] = {
			TEAM_ARMYSOLIDER,
			TEAM_ARMYSUPPORT,
			...
		},
		...
	},
	...
}

Essentially what you'd be able to do with these two setups is check if the players team (DarkRP job, whatever you want to call it) exists within the table.


-- Method one (assuming its in a single array):
local plymeta = FindMetaTable("Player")

function plymeta:OnUSClass()
	for _, team in pairs(NationUS) do
		if self:Team() == team then
			return true
		end
	end
	return false
end

-- Method two (assuming its an array nested inside of two tables):
function plymeta:GetNation()
	for nation, categories in pairs(Nations) do
		for category, team in pairs(categories) do
			if self:Team() == team then
				return nation, category
			end
		end
	end
	return "other"
end

I know I'm not explaining in full detail here, but I don't want people to believe something that isn't true. My original response (given changes in the pseudo-code to how the addon is actually setup) would work just fine. I'm not entirely sure on how much of a performance impact it would have, but I also want to point out that it wouldn't run every time a bullet was fired - only whenever somebody gets hit. EntityTakeDamage is only called on the server.

 

58 minutes ago, Alex Conway said:

Not to mention the immense lag of constantly checking this function, you realize, every time someone fires a bullet it would run this command/function? People already think HitReg is unreliable. 

 

Link to comment
3 minutes ago, Jackal said:

It didn't really make base factions "less retarded" it just made them learn from their mistakes repeatedly assuming they didn't have common sense which was a lot more common back then. Also, I don't understand how this would even allow for more RP since this is really only applicable during war where it essentially is just TDM with objectives mixed in.

In real life soldiers may shoot their own on accident. This could be implemented in MRP causing more of a role play scenario where you shoot your own on accident. I have my own reasons why this wouldn't be bad and I believe trying won't hurt. Thats just me though.

Edited by Valor
Link to comment
Just now, Valor said:

MRP causing more of a role play scenario where you shoot your own.

Yeah I don't know why this is the specific type of roleplay we're gunning for, and MP are certainly never making a return. 

'Hey guys, lets court-martial this Private because he couldn't tell the difference between a US ghillie and an RU ghillie at a 100 meters!' 

Realistically, nobody is going to enforce that shit, it happens way too often, and the players who do it aren't going to follow along with the RP.

Link to comment
×
×
  • Create New...

Important Information

Terms of Use | Guidelines