X4: Foundations
0 of 0

File information

Last updated

Original upload

Created by

Scuffle Kerfuffle

Uploaded by

ScuffleKerfuffle

Virus scan

Safe to use

About this mod

Two ways to defend against mines: Attack All Enemies and Missile Defence. Please see the files section for details.

Requirements
Permissions and credits
Changelogs
Donations
There are significant changes between version 401 and version 510. Please read below before updating.

Mine Defence Rebuilt

There are now two different versions of this mod available! They can even be loaded side-by-side.  To make this less likely to cause problems, version 510 and later will have a new folder structure.  When upgrading from 401 or below to 510, PLEASE UNINSTALL the original first! This will prevent duplicate mods showing in the list and remove potential conflicts and issues.

These two parallel mods are designed to make Capital or Medium Ships with turrets set to "Missile Defence", "Attack All Enemies", or potentially both target and destroy mines. It is based on the original mod MineDefence by TheLich and has been updated and re-uploaded with their permission. I decided to build this update because I couldn't get the original mod to target mines after the Split update.

The logic has been rewritten as of CoH due to significant changes in targeting and firing routines made by Egosoft. Further updates were required as of Avarice due to additional changes in event-driven turret behaviors.

Behavior:

This mod adds new routines into the existing "Attack All Enemies" and/or "Missile Defence" scripts for Capital and Medium ships.  In the "Attack All enemies" mode it uses gravidar to detect nearby mines and will add them to the existing target list. 

In "Missile Defence" mode, it uses mostly the same logic as originally written by TheLich.  The exceptions are that it now uses gravidar instead of a flat scan and the hooks have been updated to function with CoH and Avarice.

Compatibility:

Mine Defence Rebuilt should be compatible with any mods that do not change Capital or Medium Ship attack logic. The mod works fine when added to a game and is now set to be able to be removed without breaking anything, though I strongly recommend not doing it while a ship is still in a mine field. :)


Ongoing Research:

  • Attempt to find where targets added via "Missile Defence" mode are being dropped from turrets. This was an Egosoft bug they fixed in 4.1
  • Add incoming missile detection to the scan for mines and add them as targets. No longer necessary after above bug was fixed
  • Potentially add a new turret mode to the game specifically for this mod. This may be possible, but after more than a year of poking around I am no longer pursuing this option

All constructive feedback is welcome. All of my mod work is Open Source and available on GitHub, under the same user name as here.