Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.96a is out! (05/05/23); Blog post: Colony Crises (11/24/23)

Author Topic: [0.96a] AI Tweaks  (Read 286 times)

Genir

  • Lieutenant
  • **
  • Posts: 71
    • View Profile
[0.96a] AI Tweaks
« on: November 28, 2023, 11:53:48 AM »

AI Tweaks

Download

Latest version zip is attached at the bottom of this post. Also available on GITHUB REPO

Description

AI Tweaks provides various ship AI improvements, mainly centered around weapons usage.

Balance notes

The AI changes my upset the game balance to some degree, as the ship defense AI is not adjusted in response to better weapon usage. There's a forum thread with insight from the Starsector developer Alex on some of the aspects of AI modding and their impact on game balance.

Installation

Requires LazyLib. To install AI Tweaks, just download the zip and unpack it into the mods directory. There's no configuration required. The mod can be safely added to an exisiting save.

Uninstallation

AI Tweaks adds a hullmod to exisiting saves. If you want to uninstall the mod and continue playing an existing save, open the relevant campaign.xml file and delete all occurrences of <st>fnisherbeamprotocol</st> string.



Features

Improved target leading algorithm for autofire weapons

Spoiler
Vulcan cannons are finally able to reliably shoot down Salamanders!

Vanilla target leading algorithm calculates only approximate intercept point, even for ships that are supposed to have excellent autofire accuracy. AI Tweaks replaces the vanilla algorithm with an improved one. The improved algorithm calculates exact intercept point by solving quadratic equations. Accuracy bonus machanism is respected, so ships with low combat readiness will still have difficulties with tracking targets.
[close]

Improved High Energy Focus ship system AI

Spoiler
This mod changes the way AI controlled ships use their High Energy Focus system. AI will no longer be tempted to activate HEF just because there's a fighter or missile in range of PD beams or because an enemy ship can barely be reached by a Graviton Beam. The precious HEF charges will be preserved for big guns instead. Best use case is of course the mighty Executor. With two linked Gigacannons and officer with System Expertise almost every salvo will be spiced up by High Energy Focus!

The hull mod is still in development and the logic used by the new HEF AI is in no way perfect. Worst use case is when a ship relies on different energy weapons for shield damage and armor/hull damage. Currently, the modified AI struggles to prioritise the different weapon groups accordingly, as observed by CapnHector.

Details

The logic used by the modified AI is Very simple. Triggering HEF is tied directly to firing the largest energy weapon installed on a ship. This means a ship with at least one large weapon will never activate HEF when firing just medium or small weapons. Additionally:

- firing at fighters and missiles will not trigger HEF
- firing at ships in phase will not trigger HEF
- firing anti-armor weapons on shields (weapons with High Explosive damage or with USE_LESS_VS_SHIELDS tag) will not trigger HEF
[close]

Finisher Beam Protocol hull mod

Spoiler
A hull mod that changes how ship AI uses several beam wepons. In-game description:

"A set of software modifications and officer training routines designed to modify the firing behavior of certain beam weapons. Under the Protocol, the modified weapons are inhibited from firing at shields. This allows to reliably hit exposed hull surfaces the moment the shields drop and to conserve flux capacity. Affected weapons are burst beams like Tachyon Lance and Phase Lance, as well as High Explosive beams like High Intensity Laser. The Protocol is active only for weapons in autofire mode and does not affect point defense beams."

Details

The hull mod prevents selected beam wepons from firing at shields by adding USE_LESS_VS_SHIELDS tag. Additionally, the weapons are prevented from shooting at fighters.

Which weapons are affected by the hull mod is defined in weapon_data.scv file. For a weapon to be subject to Finisher Beam Protocol, it needs to have the primaryRoleStr field set to "Finisher Beam". And, of course, it needs to be a beam weapon.

[close]

Modified Heavy Needler and Light Needler autofire AI

Spoiler
A simple modification preventing autofire AI from firing Light Needler and Heavy Needler on shieldless targets. All ships are subject to the change, no hull mod is required.

Which weapons are affected by the improved Needler AI is defined in weapon_data.scv file. For a weapon to be subject to the change, it needs to have the primaryRoleStr field set to "Strictly Anti Shield".
[close]
« Last Edit: November 29, 2023, 11:15:54 AM by Genir »
Logged

Genir

  • Lieutenant
  • **
  • Posts: 71
    • View Profile
Re: [0.96a] AI Tweaks
« Reply #1 on: November 29, 2023, 11:17:55 AM »

v0.2.0 is out.

Changes:
  • Added improved target leading algorithm for autofire weapons
Logged