X4: Foundations

X4: Foundations

Not enough ratings
Gibbon Friendly Fire Tweaks
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
1.040 KB
1 Aug @ 2:49pm
1 Change Note ( view )

Subscribe to download
Gibbon Friendly Fire Tweaks

Description
Compatible with Kuertee FFT. Fixes logic errors that allow friendly fire incidents to escalate.

For now, this mod fixes exactly one issue in high attention.


Originally posted by egosoft's crazy design:
A player owned ship, assigned to defend another player owned ship, will retaliate to ALL attacks on either itself or the ship it is escorting, without checking relations with the attacker. This means accidental fire from friendly ships will always result in your ships reacting negatively.

The fix ensures that a player owned ship assigned to defend another player owned ship will only return fire on a ship or station that it is allowed to attack (based on the default rules of fire by relations or decided by any fire authorisation overrides you have applied).

It does not matter if your defending ship or the leading ship was targeted in the attack. It does not matter how much damage was dealt. If your ship is not normally allowed to fire upon the ship that hit yours, it will not.

So now it should be possible to assist a friendly faction in battle without fear of your ships going nuts and attacking friendlies when a stray shot hits a member of your fleet.

Big thanks to Kuertee and Friendly fire tweaks, whose extensive debug logging helped me isolate the problem and test the fix. Also please install their mod for the full friendly fire fixes experience. Solves so many gamebreaking problems and many headaches.
5 Comments
Gibbon  [author] 16 Aug @ 11:15am 
Yep. Had been bugging me for ages wondering why I kept getting friendly fire incidents even though I had KFFT on.
thesuperjman 13 Aug @ 12:21pm 
Legend. Thanks for making this. Just had to reload after a big battle because one of my ships went berserk on my allies in the middle of a big firefight.
Gibbon  [author] 4 Aug @ 6:40pm 
Please be aware that any damage received from a ship that is currently red will have the appropriate response. A red ship is a dead ship.
Gibbon  [author] 4 Aug @ 6:36pm 
It ONLY applies to a player ship that is assigned to defend another player ship, and only when the defending or defended ship is hit by something they should not be allowed to attack. For some reason the vanilla code decides that player owned ships don't respect relations or fire authorisation settings.

If you sent a fleet into a battle where allied factions are involved, and one of those allied factions accidentally hit one of your ships that is either defending or being defended in the fleet, they would all go nuts and start firing on the friendly faction.

Now they will respect the rules and not shoot back at friendly ships/stations if they are accidentally hit.

If you want a more complete set of friendly fire fixes, go look at Kuertee Friendly Fire Tweaks on nexusmods, which covers most other cases.

Neither mod allows the player to cheat in any way. Deliberate attack orders still cause targets to turn hostile, and so will clearly deliberate attacks or boarding actions.
luisogardu 4 Aug @ 12:38pm 
Hello, I just subscribed to this mod because in the vanilla version it is unplayable due to friendly fire, but I have doubts about how exactly it works. The thing is, I don't want to cheat in the game or have the option to steal ships or attack stations without fear of the consequences. The only thing that worries me is that the escort of my freighters starts conflicts at every moment and causes the destruction of those freighters. If you could explain better how it works I would greatly appreciate it. Greetings and thanks for your effort.