Prevent Bradley APC from damaging buildings?
Hi,
our bradley is dealing damage to buildings and i want to stop that.
How is that possible?
    {
      "name": "bradley",
      "members": "BradleyAPC",
      "exclusions": ""
    },
    {
      "name": "buildings",
      "members": "BuildingBlock, SimpleBuildingBlock",
      "exclusions": ""
    },

bradley cannot hurt buildings

might work :p
Hi nivex, thanks for the fast reply but the tank still damages buildings.
I dived more into it and have seen that the "maincannonshell" has no "initiator"

"object CheckHeliInitiator(RuleSet ruleSet, HitInfo hitInfo)
        {
            // Check for heli initiator                        
            if (hitInfo.Initiator is BaseHelicopter || hitInfo.Initiator is BradleyAPC ||
               (hitInfo.Initiator != null && (
                   hitInfo.Initiator.ShortPrefabName.Equals(""oilfireballsmall"") ||
                   hitInfo.Initiator.ShortPrefabName.Equals(""napalm""))))
                return !ruleSet.HasFlag(RuleFlags.NoHeliDamage);
            else if (hitInfo.WeaponPrefab != null) // prevent null spam
            {
                if (hitInfo.WeaponPrefab.ShortPrefabName.Equals(""rocket_heli"") ||
                   hitInfo.WeaponPrefab.ShortPrefabName.Equals(""rocket_heli_napalm"") ||
                                   hitInfo.WeaponPrefab.ShortPrefabName.Equals(""maincannonshell""))
                    return !ruleSet.HasFlag(RuleFlags.NoHeliDamage);
            }
            return null;
        }"

I tried to understand how you have done it with the helicopter and i have seen that some attacks have no "hitInfo.Initiator" but have a "hitInfo.WeaponPrefab". (The minigatling has the APC as initator, but not the main cannon)
I just copied the "BradleyAPC" to the "Initiator" and the "maincannonshell" to the "WeaponPrefab" and it works.
I guess you would need to add an extra "CheckAPCInitiator" function, since this "BradleyAPC"-entity in the config does not cover the main damage from the "maincannonshell" :(

Any update on this? :)

I also have the same issue, I have an option to buy a BradleyAPC through Server Rewards and you can level the whole map with it! Can't stop it from damaging buildings or players in PVE zones.

damage from both BradleyAPC and maincannonshell is blocked by default in PVE rulesets that properly set defaultAllowDamage to false

however, the issues with ruleset evaluation are:

1) the maincannonshell does not have a network identifier for caching which causes the core method for resolving the entity group name to fail, and therefore the members or exclusions in the config cannot be found. this is fixed by resolving them each time without caching the result

2) creatorEntity is not set, and the initiator for the hit information of the cannon shell is not set when the cannon is fired, which causes the same core method to fail again. this is a game bug that must be fixed by Facepunch

the workaround here is to use the fix from the first issue, which is in the next update

this will allow you to use the following entity group:

{
  "name": "bradley",
  "members": "BradleyAPC, maincannonshell",
  "exclusions": "BasePlayer"
},​

the exception is players, and uses the the rule:

bradley cannot hurt anything

this allows damage to players, and prevents damage to everything else which includes buildings, deployables and anything else belonging to a player. this removes the need to create entity groups for buildings and deployables, which only serve to hurt performance and should be avoided whenever possible

as I said, this is possible in the NEXT update

Yeah, nice :>

I tested this out on my server, and whey you buy tank commander and drive the tank, you can ram the buildings in PVE zones at full speed and level most of the foundations, 2 or 3 rams and the building is gone. I could not prevent this from happening so I removed Tank Commander.

domleg

I tested this out on my server, and whey you buy tank commander and drive the tank, you can ram the buildings in PVE zones at full speed and level most of the foundations, 2 or 3 rams and the building is gone. I could not prevent this from happening so I removed Tank Commander.

it's not possible to prevent this because tank commander isn't dealing damage to anything. it is outright killing the npc. you must use the config for tank commander to prevent this.

ok so I was able to stop ramming building in tank commander config by setting ram values for dammage really high and also setting flags to false for can crush buildings etc, but still the cannon and machine guns can damage the bases in PVE zones. I guess this is in the next update or is it already in 2.0.4. I tried the bradley cannot hurt anything and the example above, reloaded the plugin but it still can destroy walls etc.

as I said, it is in the next update :)

hello, I have these flags:

"SelfDamage, AuthorizedDamage, CupboardOwnership, TwigDamage, NoHeliDamageQuarry, HumanNPCDamage, LockedBoxesImmortal, LockedDoorsImmortal, SamSitesIgnorePlayers, TrapsIgnorePlayers, TurretsIgnorePlayers, NoHeliDamageRidableHorses",

at the moment the helicopter only damages buildings where the attack target is authorized, can I also set it up for the tank? did facepunch add the necessary features to the game? Thanks )