hoan111 / CS2-DamageManagement

This is a plugin that modifies damage done to teammates like Faceit
17 stars 1 forks source link

[REQ] Full control for friendly fire #1

Closed crashzk closed 4 months ago

crashzk commented 7 months ago

Can we expect option to enable and disable friendly fire from knife, zeus, guns too?

This way we can leave friendly fire activated whatever we want and deactivate it too.

hoan111 commented 7 months ago

I'll add it to the configuration file soon

juandrep commented 6 months ago

still waiting sandly

crashzk commented 5 months ago

@hoan111 news about this feature? Can it still be implemented?

hoan111 commented 5 months ago

@hoan111 news about this feature? Can it still be implemented?

@crashzk I'm done but I can't test it. The biggest problem here is the laptop that I used for testing is broken.

crashzk commented 5 months ago

@hoan111 news about this feature? Can it still be implemented?

@crashzk I'm done but I can't test it. The biggest problem here is the laptop that I used for testing is broken.

I can test anything.

hoan111 commented 5 months ago

@hoan111 news about this feature? Can it still be implemented?

@crashzk I'm done but I can't test it. The biggest problem here is the laptop that I used for testing is broken.

I can test anything.

Here's the new version of the feature that you requested. The first time you run this plugin it will generate a configuration file located at game\csgo\addons\counterstrikesharp\configs\plugins\DamageManagement\DamageManagement.json. This is an example of the configuration file:

{
    "Enable": true,
    "enable_inflictors": [
        "inferno",
        "hegrenade_projectile",
        "flashbang_projectile",
        "smokegrenade_projectile",
        "decoy_projectile",
        "planted_c4"
    ],
    "ConfigVersion": 1
}

By default, if you not specify any values in enable_inflictors, this plugin will allow molotov (inferno), gernade (hegrenade_projectile), flashbang, smoke, decoy, c4 damage to teammates.

You can download this version here (build with CounterStrikeSharp v211) or build it yourself

DamageManagement-v1.1-test.zip

hoan111 commented 5 months ago

@crashzk You can find designer name of the weapon you want to be taken damage to teammates here: https://cs2.poggu.me/dumped-data/entity-list

crashzk commented 5 months ago

Doing the tests here, for now the plugin created the new configuration file, but without a preset for which weapons dealt damage.

// This configuration was automatically generated by CounterStrikeSharp for plugin 'DamageManagement', at 2024/05/19 08:55:01
{
  "Enable": true,
  "enable_inflictors": [],
  "ConfigVersion": 1
}
}

I configured it with the example mentioned above, now testing the damage on allies.

And the plugin logs seem to be nothing special:

2024-05-19 14:36:18.959 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:22:21.952 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:31:10.141 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:55:01.889 -03:00 [INFO] plugin:Faceit teammates damage modify {@enableDmgInflictors}
2024-05-19 20:55:01.903 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin

Test the friendly fire issue now and return here. And just feedback, would it be possible to update to Net 8.0 later? CSSharp already has support for it.

hoan111 commented 5 months ago
2024-05-19 14:36:18.959 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:22:21.952 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:31:10.141 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:55:01.889 -03:00 [INFO] plugin:Faceit teammates damage modify {@enableDmgInflictors}
2024-05-19 20:55:01.903 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin

@crashzk Is friendly fire working like the default behavior that I mentioned above when the logger print like that?

And just feedback, would it be possible to update to Net 8.0 later? CSSharp already has support for it.

The version of .NET that I built already in .NET 8.0. So it is possible to update to any version of .NET that CSSharp support

crashzk commented 5 months ago
2024-05-19 14:36:18.959 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:22:21.952 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:31:10.141 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:55:01.889 -03:00 [INFO] plugin:Faceit teammates damage modify {@enableDmgInflictors}
2024-05-19 20:55:01.903 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin

@crashzk Is friendly fire working like the default behavior that I mentioned above when the logger print like that?

@hoan111 I tested it here, during the warm-up the grenade damage only works on myself, I can inflict damage on myself with the grenades, nothing happens to my teammates.

However, when the live, the competitive starts, everything is fine, the damage to the friend happens if I throw grenades at them.

Apart from this bug I mentioned, everything seems fine.

crashzk commented 5 months ago

@hoan111 News, about the bug I mentioned?

hoan111 commented 5 months ago
2024-05-19 14:36:18.959 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:22:21.952 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:31:10.141 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin
2024-05-19 20:55:01.889 -03:00 [INFO] plugin:Faceit teammates damage modify {@enableDmgInflictors}
2024-05-19 20:55:01.903 -03:00 [INFO] plugin:Faceit teammates damage modify Loading plugin

@crashzk Is friendly fire working like the default behavior that I mentioned above when the logger print like that?

@hoan111 I tested it here, during the warm-up the grenade damage only works on myself, I can inflict damage on myself with the grenades, nothing happens to my teammates.

However, when the live, the competitive starts, everything is fine, the damage to the friend happens if I throw grenades at them.

Apart from this bug I mentioned, everything seems fine.

This is not a bug. This is valve's default behavior when you're in the warm-up state.

crashzk commented 5 months ago

Strangely enough, in CSGO, even during the warm-up, if Fomo Friend was activated, it still worked. I'll check this in depth so, if it's really like this now, during warm-up, friendly fire is deactivated even though it is activated by default, everything is fine with the plugin then.

hoan111 commented 4 months ago

I'm going to close this feature request because I updated the plugin to version 1.1, which includes this feature. Thanks @crashzk