Skip to content

Friendly Fire

HIKI edited this page Oct 26, 2026 · 2 revisions

Friendly-fire prevention and damage protection

File: tacznpc_behavior.json → combat.friendlyFire. Partial per-loadout overrides are supported. Defaults also apply to older files without this section.

{
  "combat":{
    "friendlyFire":{
      "shotCheck": {
        "enabled":true,
        "corridorRadius":0.35,
        "retryTicks":4
      },
      "damageReduction": {
        "enabled":true,
        "allies": {
          "enabled":true,
          "damagePercent":50
        },
        "nearbyAllies": {
          "enabled":true,
          "withinBlocks":6,
          "damagePercent":25
        },
        "companionGroup": {
          "enabled":true,
          "damagePercent":10
        }
      }
    }
  }
}

Before the shot

Field under shotCheck Default Bounds
enabled true Independent prevention switch
corridorRadius 0.35 Body/corridor safety margin in blocks; 0–2
retryTicks 4 Delay after a blocked attempt; 1–200, integer

The firing goal checks loaded living bodies along its intended target line and current shot direction before calling TaCZ shoot. If an ally intersects, it holds the shot without spending a burst shot and waits before checking again.

It does not continuously search while idle. Nearby allies outside the corridor, or beyond its endpoint, do not block merely by being close. It uses existing entity indexing and exact body clipping; cost with very large groups has not been benchmarked.

Native spread, penetration and allies moving after a shot can still cause accidents. This is not a guarantee of zero friendly hits and does not add tactical flanking.

If an accident still happens

Damage settings belong to the shooter, not the victim:

Rule Default damage Independent switch
allies 50% allies.enabled
nearbyAllies, withinBlocks=6 25% nearbyAllies.enabled
companionGroup 10% companionGroup.enabled

Each rule has damagePercent from 0–100. Nearby distance is 0–64 blocks. Use the lowest applicable enabled percentage, not a product: a nearby squadmate receives 10%, not 1.25%.

damageReduction.enabled=false disables all reductions while leaving prevention available. shotCheck.enabled=false disables prevention while leaving reductions available. Each reduction rule can also be disabled independently.

The handler reduces NPC-attributed TaCZ bullet/kinetic-projectile damage, including armor-piercing sources, before armor and other normal mitigation. Player-origin shots and ordinary melee are unchanged.

Allies use current relationships/effective reputation. A following NPC's leader and other NPCs sharing that leader also count as a protected group. That group cannot be selected as an intentional companion combat target while the ownership relationship exists.

Turning off the group reduction may still leave the nearby/general rule active. To keep full accidental damage, disable the damage master switch or all applicable rules.


Home · Configuration map · Troubleshooting

Clone this wiki locally