Jump to content

MLRS uses all raid points

Pending 1.1.0

RustyB
RustyB

Posted

Using MLRS uses all the raid points in one go it seems.
Despite "CombineStackedPrivs": true

Mr01sam

Posted

I'll check it out - can you verify that this scenario is correct (so that I can reproduce it)
- Player A has a base
- Player A has full raid points
- Player B attacks Player A's base with the MLRS rockets
- This attack causes Player A to lose all their Raid Points

RustyB

Posted

Also, after the MLRS has shot the base, if I refund the raid point, attacking the base with rockets/C4 will cost a new raid point, meaning the MLRS didn't register a raid starting on that base.

For now I've done this but that's not a great solution:

void OnEntityTakeDamage(DecayEntity entity, HitInfo info)
        {
            var canTrigger = EntityCanTriggerRaid(entity);
            if (info == null || !canTrigger) { return; }

			// Check if the damage is from an MLRS rocket
			if (IsMlrsDamage(info))
			{
				// Allow MLRS damage to proceed without affecting raid limits
				return;
			}

			if (info.InitiatorPlayer == null) { return; }
            var result = CanAllowRaid(entity, info.InitiatorPlayer, info);
            if (!result.AllowRaid)
            {
                if (config.PreventEarlyDamage || !result.EarlyDamage)
                {
                    info.damageTypes.ScaleAll(0);
                }
            }
        }
		bool IsMlrsDamage(HitInfo info)
		{
			if (info == null) return false;

			// Check if the damage is from an MLRS rocket
			return info.WeaponPrefab != null && info.WeaponPrefab.ShortPrefabName.Contains("rocket_mlrs");
		}

 

RustyB

Posted (edited)

Yes I have verified this following scenario:

- Player A has a base
- Player B (not A) has full raid points
- Player B attacks Player A's base with the MLRS rockets
- This attack causes Player B (not A) to lose all their Raid Points

In the test scenario the base had an external TC, very close to the main base, as in stacked privileges. (so 2 TCs total)
 

Edited by RustyB
  • Like 1
Mr01sam

Posted

Hmm, so I just tried this and I couldn't get it to happen - it only deducted one raid point.

I had
-Player A has a base with stacked privs (two total)
-Player B uses the MLRS rocket to attack Player A's base
-The rockets hit both TCs, but after the first one was hit the raid was logged and consumed one point, the following rockets did damage but did not consume and more points since the raid was already logged

Is there perhaps more details that are important here? A couple questions that might help:
-Do you have any plugins that may affect TC ownership or MLRS rockets?
-Is the base able to be raided normally and logged properly?
-Do you have revenge raiding on?
-Are you able to reproduce this issue consistently?

RustyB

Posted (edited)

- No plugin affecting TC ownership or MLRS, except for being 2x and limiting raids, it's vanilla. I've reproduced it on 2 different servers
- Yes
- Yes
- I will try to do it again today and record a video

Edited by RustyB
  • Like 1
RustyB

Posted

Here is the video.
I've reproduced this on a vanilla server as well

 

As you can see I have all my raid points.
I place 2 TCs, I make sure to remove all privileges and check that trying to damage the wall give me the raid notification.
I then go to fire the MLRS
All my raid points are gone, trying to hit the walls doesn't even let me progress an ongoing raid but tells me I don't have enough points.
This is the latest plugin version.

Here is my config file:
 

{
  "LimitResetTimes": [
    "4:50"
  ],
  "AllowRevengeRaidForFree": true,
  "CanTwigTriggerRaid": false,
  "BroadcastReset": true,
  "LogResetInConsole": true,
  "SyncTeams": true,
  "SyncClans": true,
  "ClearBonusesOnReset": true,
  "BuildingDamageThreshold": 10.0,
  "PreventEarlyDamage": true,
  "CombineStackedPrivs": true,
  "RaidLimit": 2,
  "SaveOnServerSave": true,
  "IgnoredEntities": [
    "sleepingbag_leather_deployed",
    "barricade.cover.wood",
    "beartrap",
    "campfire",
    "drone.deployed",
    "guntrap.deployed",
    "landmine",
    "sign.huge.wood",
    "sign.large.wood",
    "sign.medium.wood",
    "sign.post.double",
    "sign.post.single",
    "sign.post.town",
    "sign.post.town.roof",
    "sign.small.wood",
    "small_stash_deployed",
    "spikes.floor",
    "survivalfishtrap.deployed",
    "autoturret_deployed",
    "beachtowel.deployed"
  ],
  "Messages": {
    "ShowChatMessages": true,
    "MessageIconSteamId": 76561198339262834
  },
  "SimpleStatus": {
    "Enabled": true,
    "BackgroundColor": "0.77255 0.23922 0.15686 1",
    "TitleColor": "1 0.82353 0.44706 1",
    "TextColor": "1 0.82353 0.44706 1",
    "IconColor": "1 0.82353 0.44706 1",
    "IconSprite": "assets/icons/explosion_sprite.png"
  },
  "UI": {
    "Enabled": false,
    "Width": 130,
    "Height": 34,
    "BackgroundColor": "0.4 0.4 0.4 0.7",
    "TextColor": "1 1 1 1",
    "TextSize": 12,
    "ShowSprite": true,
    "Sprite": "assets/icons/explosion_sprite.png",
    "SpriteColor": "1 1 1 1",
    "SpriteSize": 24,
    "OffsetX": -146,
    "OffsetY": 340,
    "AnchorX": 1.0,
    "AnchorY": 0.0
  }
}

 

Mr01sam

Posted

Thats really good detail you provided so hopefully I can reproduce it - I'll check out your video and try again later today.

Mr01sam

Posted (edited)

Alright, I loaded up your exact config and tried to reproduce what you had going on in the video - unfortunately, I still couldn't get it to consume two points, it still correctly only deducts 1 point. I provided a video, maybe you can identify what I'm doing differently?

The only thing I can think of is I noticed in your example, there is a small elevation distance between your TCs. Something you could try is upping the distance at which TCs are considered "stacked", because it may be that your 2nd TC is just barely out of range of the other one.

To do this, you can look for this part of the code, and change this "20f" value to "25f" or something like that and see if that fixes the issue.
image.png.5eef39000992c233aafe0bae3a8f2b60.png

Video

 

Edited by Mr01sam
RustyB

Posted

Hey!
That's very strange.
I'm not going to edit the distance because that wouldn't change the issue that after the MLRS hit, it would still cost one raid point more when attacking the base with C4 and rockets.
The expected scenario is that the MLRS start the raid and you don't spend additional raid points when you progress the raid with C4, you can see in my video at the end the raid is not even considered started.

For the moment I'm just going to exclude the MLRS from the raid limit with the code I posted.
The thing is I had many players reporting this issue on both my servers using the plugin, and I doubt there was elevation every time. I haven't tested with only one TC because I assumed both TC were the reason for losing both raid point, but I will try tomorrow....

I'm trying to think about what could cause that, like a conflict with another plugin but I only have admin plugins like vanish, admin radar, discord tools... nothing affecting TCs or MLRS at all.

And you've made sure your test is with the latest version of the plugin? And made with oxide, not carbon? (in case it matters somehow)

 

Mr01sam

Posted

2 hours ago, RustyB said:

Hey!
That's very strange.
I'm not going to edit the distance because that wouldn't change the issue that after the MLRS hit, it would still cost one raid point more when attacking the base with C4 and rockets.
The expected scenario is that the MLRS start the raid and you don't spend additional raid points when you progress the raid with C4, you can see in my video at the end the raid is not even considered started.

For the moment I'm just going to exclude the MLRS from the raid limit with the code I posted.
The thing is I had many players reporting this issue on both my servers using the plugin, and I doubt there was elevation every time. I haven't tested with only one TC because I assumed both TC were the reason for losing both raid point, but I will try tomorrow....

I'm trying to think about what could cause that, like a conflict with another plugin but I only have admin plugins like vanish, admin radar, discord tools... nothing affecting TCs or MLRS at all.

And you've made sure your test is with the latest version of the plugin? And made with oxide, not carbon? (in case it matters somehow)

 

You know what, my server is carbon, I haven't tried it with oxide - I can try that next

Mr01sam

Posted

Just an update - I did try it on oxide (same test as above) and I still couldn't get the issue to occur unfortunately.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.5k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.