Repository navigation
Friendly Fire
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
}
}
}
}
}| 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.
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.
Configuration reference for the customized TACZ NPCs Alive build, baseline 2.2.1-hiki.c2me.1. Home · Troubleshooting
- TACZ NPCs Alive : Configuration Wiki
- Getting started
- Configuration map and inheritance
- Configuration recipes
- Behavior and perception
- Offline loot by biome
- Resting, campfires and social space
- Combat: reaction, accuracy and firing patterns
- Administrator commands
- Recruitment and companion orders
- Dialogue profiles and selection rules
- Factions, relations and player reputation
- Friendly-fire prevention and damage protection
- Greetings and contextual replies
- Inventory, interests and item replacement
- Levels, health and accuracy progression
- Loadouts and equipment
- Offline activity and the time wallet
- Autonomous NPC quests
- Player supply requests
- Spawning and structure replacement
- Trading, prices and currency denominations
- Experimental offline travel
- Troubleshooting and migration
- Weapon-specific percentage modifiers