I found the original AI lacking in many respects. Turrets could take up to a minute to acquire targets, ships with both missiles and lasers would very rarely launch a missile, drone carriers were worthless since they could not use drones out of sector, mines/lasertowers were basically for player use only, and stations ignored anything smaller than a destroyer.7ate9tin11s wrote: ↑Wed, 23. Jan 19, 22:01 So all of my stumbling about has found a lot of information about the structure and design of the vanilla Egosoft AI, at this point I am finding that the core design of the combat AI itself does not meet my vision and needs. Therefore, I am going to cease updating this mod which tries to address and extend capabilities in the vanilla AI. This means that when 1.6 comes out the mod will no longer work due to Egosoft making heavy changes to their own AI scripts rendering any diff files invalid.
I have began a complete bottom up rewrite of the AI from the interrupt level on up to the attack orders and may release it at some point. For now though I hope Egosoft's AI updates in 1.6 are decent and make for a playable game.
If someone would like to take over updating and altering this script please PM me and I can assign control of the Nexus page over. If I do not hear back by the time 1.6 is released I will delete the Nexus page.
Thank you,
-7ate
This fixes it.
Modules
Aggressive AI is now broken into several modules that can be managed via the in-game extensions menu. This allows you to adjust features as needed for your vision of the universe and computers processing power.
- Core - This module must be enabled and contains massive AI fixes and minor activity adjustments for more engaging combat. See the core adjustments below for more information.
- Dangerous Stations - Stations will preemptively attack most enemy ship types instead of only worrying about capital ships.
- Dangerous Player Stations - Defaults to Off. Player stations should also preemptively attack most enemy ship types instead of only worrying about capital ships.
- Deployables - Deployables like lasertowers and mines will be deployed by non-player-owned ships in regular combat. NPCs have less deployables on new ships and those that they do have only last a few minutes to compensate for their active use.
- Escort - Escorts will stay much closer to whatever they are protecting, preferring to have overlapping fields of fire when possible. This effects all escorts, even the players.
- Minesweeping - Turrets will recognize mines as a threat and try to handle them. Missile defense treats them as a missile, defense worries about any mines targeting you, attack all will just shoot at them along with everything else.
- OOS Drones - Ships and stations now actively use their drones when not in the player's sector instead of just being granted magical extra damage.
- Smart Targeting - NPC enemy target selection now also takes into account loadouts, sizes, classes, and purpose when choosing targets to attack.
- Smart Player Targeting - Defaults to Off. Player ship enemy target selection now also takes into account loadouts, sizes, classes, and purpose when choosing targets to attack. This will cause ships to choose their own targets and occasionally ignore your orders for what they feel are better targets, not a module for control freaks .
- Debug Cleanup - Defaults to Off. Will fix old smart targeting and dangerous player station settings, leave it on with those modules off for at least a combat and hour to ensure everything is cleaned up.
- Debug Combat - Defaults to Off. On a new game start this module creates a large combat around the player, what I use for testing.
- Debug Scripts - Defaults to Off. Switches all AAI scripts into full debug mode, creates a very large log file if you have logging enabled!
Unless stated otherwise, all changes affect player ships too!
- Up to 90% reduced target acquisition time for Turrets
- Ships will not boost unless they have enough shields in reserve (depending on piloting skill and morale) and capships will favor using travel drive when possible
- Reduced drone launch times
- Fighters will use missiles earlier and more often when they have both guns and missiles. They can also use them consistently against components of big ships.
- Expanded firing aperture for turrets, guns, and missiles so NPCs can shoot more often.
- Reduced strafing run predilection. If your not shooting them why should they run away?
- Missile defense turrets should defend against fighters if there are no missiles about
- Increased targeting range to at least the best equipped weapons range, fixes some issues with rebalance mods that increase range on guns.
- Unlike vanilla, AI ships should no longer waste time automatically attacking invulnerable objects like build storage and Kha'ak installations. You can still order them to attack them though if you like the pretty light show.
- May have fixed escorts wandering off to other sectors when they should not (vanilla bug)...let me know.
I've successfully tested with FOCW and Improved Kha'ak. There should be no compatibility issues with anything outside of full combat AI overhauls like this (and 2.0 is even more compatible with small changes!).
Not compatible with the 1.51 beta - Egosoft is overhauling the combat scripts and I will wait till they have finalized changes before updating this mod.
Frequently Asked Questions
1. How do I turn modules on and off?
2. Can these modules be used all together or are there any restrictions?7ate9tin11s wrote:The easiest way is through the 'Extensions' menu in-game, that way you can see a full description of the module. The more difficult, and permanent way, is to delete the module folder from your extensions directory. Please note that the two debug modules are pre-set to disabled and have to be manually enabled in game...plus you really do not want to do that unless you know what you are doing or have been asked to do it by me!
3. What modules do you recommend for FOCW?7ate9tin11s wrote:All modules work together fine and compliment each other, the only restriction is that the core module must be enabled. Specifically, the targeting and escort modules require fixes made in the core module while other modules have less reliance.
Installation7ate9tin11s wrote:
- Core - On, of course
- Deployables - Off, the larger fleets/combats and increased firepower mean the extra (and comparatively wimpy) deployables are not needed.
- Escort - This makes the fleets stay closer and turns them into spheres of extra-deadly fun! On! Sanity is for the weak!
- Minesweeping - Without deployables on there is no real reason to use minesweeping, off for a little less overhead.
- OOS Drones - With the increased amounts of combat around the universe, and the relative wimpyness of drones, I suggest off for less ships being calculated OOS.
- Dangerous Player Stations - I'd probably leave it Off in hopes my stations do not attract an enemy fleet or patrol by shooting at them preemptively.
- Dangerous Stations - On, unless you need to survive EMP bombing stations without taking down their turrets first...
- Smarter Targeting - On, if your system can handle it. This really helps fighters destroy capships/stations and makes your fighter screens very very important.
- Debugs - Don't turn these on as they either mess with universe relations or generate massive log files. They default to off for a reason!
Place into your steamapps\common\X4 Foundations\extensions folder and not into your documents folder for best results.
Much kinder to an existing games...it should just start affecting ships as they get into combat.
Download
https://www.nexusmods.com/x4foundations/mods/206/
Please make sure and remove all old loose AAI mod files before upgrading.
Please let me know if you run into bugs or find other issues with this!
Changelog
2.4 - Split targeting into player and non-player modules. Small fixes in medium ship smart targeting.
2.3 - Hotfix for targeting loops caused by smart targeting module.
2.2 - Hotfix for missing files, updated another edge case for escorts wandering off to enemy sectors.
2.1 - May have fixed escorts wandering off to other sectors when they should not (vanilla bug). Fighters have remembered how to move when attacking stations, medium ships realized they have main guns again, several other fixes. Dangerous player stations module added (defaults off). CAT/DAT version now default and only download.
2.0 - Lots of bugfixes and modular construction.
1.5 - Lots of bugfixes (especially for capital ships) and speed improvements. Loosened up patrol/escort ranges a bit to prevent loops...may need to undo this. Make sure and remove all old loose AAI mod files before upgrading!
1.4 - Improved escort/patrol behavior (finally!), better targeting priorities, less deployables on big ships so capping is not so much of a pain. Fixed another chance to target invulnerable objects.
1.3 - Mines cleared by turrets/fighters, npc lasertowers can now destruct in-sector, boost usage limited, smarter component targeting with missiles, some OOS optimization to reduce lag.
1.2 - Contents file updated for compatibility with non-English installs. NPC ships may now only deploy a lasertower/mine once every 2-7 minutes (depending on pilots skill). This should really help framerates.
1.1 - AI should no longer automatically target invincible objects like build storage and Kha'ak stations. Deployables now category-based in case a future modder adds in new deployables. Reduced deployable usage. Minor bug fixes.