Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); In-development patch notes for Starsector 0.98a (2/8/25)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Genir

Pages: 1 [2] 3
16
Bug Reports & Support / Space station does not want to fire Mjolnirs
« on: February 04, 2024, 11:37:56 AM »
I encontered an issue where a Space station is very hesitant to fire Mjolnirs, and possibly other weapons.

Video, no mods

When I run custom autofire AI, the Mjolnirs still don't fire, even when shouldFire() method returns true.

Save file, sanitized from mods

Modular ships are such a breeding ground for special cases! I make bugs when dealing with them in my mods all the time.

17
Bug Reports & Support / Friendly LP fleet triggers wormhole enemy warning
« on: January 21, 2024, 03:54:10 PM »
When entering hyperspace through a wormhole, I receive a warning about neraby enemy fleets. The warning is triggered when the only nearby fleet in hyperspace is a friendly Luddic Path Holy Armada. I have excellent reputation with LP, and other arrangements as well, so the Armada is not hostile in any manner.

Is this is a bug? Or expected?

18
As title says. Specific example: Merlons around Gilead Station are named ISS instead of CGR.

19
Suggestions / Have hulks not return ShieldAPI
« on: January 08, 2024, 10:11:09 AM »
ShipAPI.getShield() call on hulks returns ShieldAPI "inherited" from previous, alive ship. The ShieldAPI fields, like location, are not updated and retain (I think) values of when the ship died.

Could we have hulks return null ShieldAPI? The current implementation requires workaround code in mods (or at least in my mod).

20
Bug Reports & Support / CollisionGridAPI.getCheckIterator misses entities
« on: December 23, 2023, 06:29:08 PM »
I'm writing code to find close enemy ships. I wanted to use the fast CollisionGridAPI approach. When debuggin my functions, I found the iterator returned by CollisionGridAPI.getCheckIterator seems to be missing ships. This happens consistently, and is easy to reproduce in about any combat. I wrote a function (in Kotlin) that compares results of CollisionGridAPI.getCheckIterator and CombatEngineAPI.getShips. I hope it makes the problem easy to follow.

Code
fun debugGrid(location: Vector2f, range: Float) {
    val grid = Global.getCombatEngine().shipGrid
    val searchRange = range * 2.0f + 50.0f
    val gridIterator = grid.getCheckIterator(location, searchRange, searchRange)

    val gridShips: MutableSet<ShipAPI> = mutableSetOf()
    gridIterator.asSequence().forEach {
        if ((location - (it as ShipAPI).location).length() < range) gridShips.add(it)
    }

    val globalShips: MutableSet<ShipAPI> = mutableSetOf()
    Global.getCombatEngine().ships.forEach {
        if ((location - (it as ShipAPI).location).length() < range) globalShips.add(it)
    }

    val shipsMissingInGrid = globalShips.filter { !gridShips.contains(it) }
    shipsMissingInGrid.forEach {
        Global.getLogger(location.javaClass).info("DIFF $it  ${(location - it.location).length()} $range")
    }
}

It never fails to log missing ships. The missing ships (and fighters) aren't even on the fringes of search range, that can be close to search origni point.

21
I wasn't sure if I should post it here or in Suggestions. However, the behavior looks so incorrect, that maybe it's a bug after all.

Ships with omni shields seem to give Absolute priority to defending from direct energy missiles, even not aimed at them, regardless of danger in the opposite direction. I attach an image showing Legion with omni shield defending from an irrelevant DEM, at the cost of being wrecked by multiple Hellbores.

If it's not a bug, then the fear of DEMs is certainly overtuned.

22
I'm facing a serious challenge in commanding a fleet built around Legions.

AI admiral is doing its thing and orders Legions to chase frigates, as expected. Legions happily oblige and burn-drive away to map fringes. With normal capitals I manage this behavior with eliminate command - I select the misbehaving ship and order it to eliminate an enemy somewhere in the deathball.

With Legions this does not work. They happily ignore Fighter Strike order, at least in that they don't drop their frigate chase. I can order eliminate on an enemy without selecting any of my ships, and only then assign a specific Legion. But then the AI admiral assigns other of my ships to the eliminate target, which I don't want. Finally, I can order the Legion to simply Move, but it's slow as molasses to respond as it really WANTS to catch that frigate.

Could we perhaps have a way to order a single carrier to eliminate?

23
Finally I was able to "reproduce" the issue of weapon groups spontaneously changing to auto assigned when reffiting a ship with a new weapon. "Reproduce" is in quotes, as I'm not able to create a minimal example or reliably recreate the circumstances leading to the bug.

Steps to reprocuce:
  • load the attached savegame (it contains difficult to remove mods, so the mods folder is attached as well)
  • in refit screen open the "KLL Kuruma" Legion
  • remove the right Mining Laser (note the first weapon group remains empty afterwards)
  • add a weapon to one of the empty medium slots
  • weapon groups should be changed to auto-assigned

Attachments:

24
Conquest faces its front, instead of broadside, towards target when issued with escort order.

Example of the behavior shown in attached images. Left Conquest has escort order, right Conquest does not. Both have default weapon groups and aggresive officers.

Don't mind the 'debug' caption in the screenshots, it's one of my WIP mods. I disabled AI altering code for the purpose of this report.

25
Mods / [0.97a] AI Tweaks
« on: November 28, 2023, 11:53:48 AM »
AI Tweaks

Download v1.12.7

Also available on GITHUB REPO.

Description

AI Tweaks provides various improvements focused on ship AI and AI-assisted player support.

The key features of AI Tweaks are autofire AI written from scratch, custom ship AI created mostly from scratch, automatic omni shields and aim assist for the player’s ship, and various upgrades to vanilla AI. AI Tweaks also allows players to configure the personality of automated ships in their fleet. A full description of all features is available at the bottom of the post.

Showcase

PD beams with improved aiming AI:
https://vimeo.com/1026930513

Balance notes

The AI changes may disrupt the game balance to some extent, as the ship defense AI is not adjusted to counter improved weapon usage. There's a  forum thread featuring insights from Starsector developer Alex on certain aspects of AI modding and their effects on game balance.

Additionally, Vanilla AI is designed so its actions resemble those of a human. Certain AI limitations, such as reaction delays, are intentionally implemented. You can read more about this in thisforum thread. AI Tweaks does not share this design goal, so you may notice some uncanny, machine-like behavior.

Installation

Requires LazyLib and LunaLib. The mod can be safely added to existing saves.

To install AI Tweaks, just unzip the downloaded archive into Starsector mods folder.

Uninstallation

AI Tweaks can be safely uninstalled without affecting existing save games.

NOTE: Uninstalling AI Tweaks from a save that also uses Starship Legends may result in save game corruption.
Otherwise, AI Tweaks and Starship Legends are fully compatible.

Credits

I took a lot of inspiration on how to code AI Tweaks from DesperatePeter's AdvancedGunneryControl mod. Especially the method of attaching AutofireAIPlugins to existing ships and preserving the underlying vanilla logic. If you want even more customizable weapon behavior, AdvancedGunneryControl has it!



AI Improvements

Custom ship AI
A reworked ship AI, replacing a significant part of vanilla logic with custom implementation. It's still work in progress, and will probably remain so for a long time. The custom AI can be activated via a hullmod on selected ship types: non-phase, non-carrier destroyers, cruisers and capital ships.



[close]

Ships rotate to aim hardpoints and correctly handle broadside builds

With AI Tweaks, ships can finally aim hardpoints. Just imagine how powerful an LP Brawler becomes when it can consistently hit its target! This change is enabled for all ships, whether or not they are equipped with the Custom AI hullmod.

https://vimeo.com/1030111629

The upgrade also allows the AI to handle all types of broadside builds, such as the symmetrical Conquest or broadsiding
Onslaught:

https://vimeo.com/1050582068

In addition, this improvement fixes the bug mentioned in this forum thread, where broadside ships revert to front-facing behavior when issued an escort order.

The fix applies to ballistic and beam weapons, but not missiles.

[close]

Autofire AI
AI Tweaks provides weapon AI implemented from scratch. It aims at fixing various vanilla AI deficiencies. The most noticeable differences from vanilla autofire AI are:

Improved target leading algorithm
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 mechanism is respected, so ships with low combat readiness will still have difficulties with target tracking. The difference is most noticeable for ship PD weapons tracking missiles aimed at different allied ships.

Additionally, weapon fade range is taken into account when attacking shieldless targets. When a projectile passes its maximum range, it begins to fade. Fading projectiles deal only soft flux damage to shields and its attack strength rapidly diminishes. But they are still effective against hulls, and especially missiles. Accounting for fade increases effective range of some PD weapons by up to 50%, and anti armor range by about 10% to 15%.
[close]

Staggered firing mode
Ships will use autofire weapons in staggered firing mode. In this mode, all weapons of the same type fire at a constant interval. Currently, this feature is available only for ships with Custom AI.

The feature can be disabled via LunaLib settings.

https://vimeo.com/1037950693

[close]

Aggressive friendly fire behavior
Ships are finally not paralyzed by the slightest possibility of inflicting friendly fire damage. Quite the opposite, weapons will fire shots skimming the very surfaces of allied shields! AI can afford very tight ff tolerances thanks to improved math, which allows to reliably account for allies movement. But be warned, the math doesn't predict course changes. So if you have frigates that like to dance in front of big guns, they will get hit. Overall, the ratio of ff incidents will increase, but the ratio of enemy hits will increase more substantially.
[close]

Focusing fire on a single target
Vanilla AI likes to assign ship weapons to different targets, leading to situations where a ship fights all nearby enemies, but destroys none. Starsector 0.96 contained a feature-bug that allowed to fix the behavior (forum thread), but it was removed in 0.97. AI Tweaks improve the target selection algorithm, so that weapons strongly prefer to attack the target faced by the ship. Note that for autopilot controlled ships, true target is not the same as R-selected target.

At the same time, the weapons are not completely glued to ships target, as is the case with the bug referenced above. PD weapons will still prioritize missiles and normal weapons will consider other targets if ships target is outside firing arc or range. Overall, the result is much more focused fire, leading to noticeably faster kill times.
[close]

Specialized target leading algorithm for hardpoints
It is not uncommon for vanilla Autofire AI to target hardpoint weapons away from an enemy in front of the ship, wasting opportunity to inflict damage. There are two reasons for the incorrect behavior. The vanilla AI may simply chose to target an enemy off-axis, or it may target the correct enemy, but order the weapon to rotate too soon. In the latter case, when the ship rotates towards the enemy, the weapon ends up over-rotated.

Modified AI predicts the enemy location and pre-aims hardpoint weapons at the correct angle, even before the ship rotates towards the enemy. All front-facing hardpoints are affected by the change, but only on AI-piloted ships.

Example of the incorrect behavior, fixed by AI Tweaks. One of the Guardians High Intensity Lasers is aiming at the void:


[close]

Improved beam weapon target switching

In Starsector, beam weapons have a finite travel speed, which can cause delays in reaching their targets. When a beam weapon switches targets, rotating the existing beam to the new target may be faster and more efficient than stopping and re-firing once aligned. This is particularly useful for point-defense (PD) beams, which often need to rapidly engage multiple incoming missiles.

The improved AI applies only to normal beams, not burst or ammo based beams.

https://player.vimeo.com/video/1026930513?h=9c69150945
[close]

Modified anti-shield burst weapon AI
A simple modification preventing autofire AI from firing ammo-based kinetic weapons, as well as the Light Needler, Heavy Needler and Storm Needler on shieldless targets. This change greatly improves needlers anti shield capability by preventing them from wasting bursts on exposed hulls. All ships are subject to the change, no hull mod is required.

The feature can be disabled via LunaLib settings.
[close]

Additional changes
AI Tweaks autofire introduces a number of smaller changes in comparison to vanilla AI, some of which may not be intentional. In no specific order:
  • USE_LESS_VS_SHIELDS weapons (Mining Blaster and IR Autolance in vanilla) do not fire on shields when their magazines is above 80; vanilla AI does that to avoid "wasting" recharges
  • phased ships are targeted only by beams and PD weapons, but only if the weapon is not ammo- or burst-based
  • non-PD weapons attack fighters only when there are no bigger hulls in range
  • shield hits are correctly predicted even for modular ships like stations, improving behavior of weapons that are supposed to attack shields only, or avoid shields
[close]
[close]

Fleet Cohesion AI
Fleet Cohesion AI fixes one of the more frustrating aspects of vanilla AI: cruisers and capital ships leaving the main battle line and chasing lone frigates and destroyers to the edge of the map. With the fixed AI the fleet stays together and maintains high combat effectiveness.

The feature can be disabled via LunaLib settings.

Additional details:
  • Fleet Cohesion AI applies only to player fleet. Enemy fleet keeps the vanilla Admiral AI.
  • Fleet Cohesion AI is disabled during full assault and when at least one AVOID order is issued.
[close]

Fixed Invictus and Lidar Array AI
"Cuz my problem with ai invictus is it just wastes it’s system 9/10 times" - niceman121454 on Discord.

With AI Tweaks, not anymore.

Vanilla Lidar AI has several deficiencies. Most notably, switching target in the middle of Lidar burst, described in Uniquifying the Factions blog post: "For example, the lidar array AI might decide to activate it, while the “main” AI decides that it’s a good time to turn the ship away its current target and attack a different ship." The blog post describes a solution employed in vanilla, which doesn't seem to work.

Other deficiencies are backing off too far from the attacked target and loosing it from weapons range and poor flux management.

AI Tweaks fixes all of the above and turns Invictus into a truly overpowered - unbalanced even - brick of a ship.

Invictus aiming hardpoint weapons with the entire ship, note the aim is not centered at the target:



[close]

Improved High Energy Focus ship system AI
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!
[close]

Player Assist

Shield assist for player ship
Vanilla AI is notoriously good at controlling omni shields, often better than the player himself.

Now, with AI Tweaks it's possible to pilot ship manually while leaving shield in AI control. Be warned though. According to playtesters the feature may be a bit too powerful. Still, "it's not so OP that it's unusable" as playtester snark said. The assist works for both omni and front shields.

Shield assist can be toggled with `]` (right bracket) key by default. Keybinding can be configured via LunaLib settings. When AI is in control, a circular indicator is displayed around the ship. The player can override AI and force the shields to drop with right mouse button.



[close]

Aim Assist

Aim Assist helps the player by automating target leading. With Aim Assist, you can simply point the mouse at an enemy ship and fire without worrying about projectile travel time. The AI automatically offsets manually controlled weapons to account for both target and projectile velocity, significantly improving accuracy.

Aim Assist also enhances hardpoint aiming by adjusting the player ship’s rotation in "auto-turn to cursor", or STRAFE LOCK mode. This works with all non-guided weapons, even those not facing forward. And yes, Aim Assist can make the Venture Mk. II fly backwards. You can disable this ship-rotation feature in LunaLib settings.

Manually piloted Nova in STRAFE LOCK mode rotating to aim selected weapons at the enemy ship:

https://vimeo.com/1041836748

Aim Assist is toggled using the `[` (left bracket) key by default.

When active, an AIM ASSIST status icon is displayed:



[close]

AI Configuration

Changing the personality of automated ships
Vanilla AI forces reckless behavior on all automated ships in the player's fleet, with AI core captains and without, presumably to maintain game balance. This results in automated ships rushing headlong into enemy deathball and getting themselves killed in the most frustrating manner.

AI Tweaks allows to configure the personality of automated ships. The configuration is made via the LunaLib settings and is global, affecting all automated ship in the player's fleet. If no specific personality is configured, the automated ships will default to aggressive behavior, instead of the vanilla reckless.
[close]

Finisher Beam Protocol hull mod
A hull mod that changes how ship AI uses several beam weapons:



"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 weapons from firing at shields by adding USE_LESS_VS_SHIELDS tag. Additionally, the weapons are prevented from shooting at fighters.

For a weapon to be subject to Finisher Beam Protocol, it needs to have FINISHER_BEAM aiTweaksTag in
its /data/weapons/weaponId.ait file. And, of course, it needs to be a beam weapon:

Code
{
  "aiTag": [
    "FINISHER_BEAM"
  ]
}

[close]

System Shunt hull mod
System Shunt prevents AI from using the ship system:



"A set of officer instructions and software modifications that prevent the use of the ship's system unless directly ordered by the fleet's first-in-command. Note: This protocol may be activated if the system's usage is deemed detrimental to the ship's performance in combat."

[close]

26
Bug Reports & Support / Weapon groups not saved in autofit variants
« on: November 19, 2023, 01:25:55 PM »
Certain weapon groups are not preserved in autofit variants. To recreate:
  • fit Fury with weapons in all slots
  • put all weapons in first weapon group
  • save the build as autofit variant
  • strip the ship
  • refit using the recently saved variant
Weapons will be set to default weapon groups, instead of the expected single group. Using more than one group prevents the issue. This happens in some ships, but not in others.

There are other issues with weapon groups, like putting a weapon in certain slots reseting the groups to default. I'll post if I'll find a way to recreate that issue.

27
Suggestions / Have USE_LESS_VS_HULL weapon AI tag
« on: November 15, 2023, 03:31:06 PM »
I find USE_LESS_VS_SHIELDS weapon AI tag very useful to enhance weapons like High Intensity Laser or Tachyon Lance. Could we perhaps  have a vanilla counterpart tag USE_LESS_VS_HULL? It would prevent weapons firing at exposed armor or hull.

I'm not suggesting to change the behavior of any vanilla weapon (though just imagine how much better would it make Needlers!), but just have the tag ready to be used when modding.

28
Title Screen Fire

This mod is now deprecated
A simillar feature is available in AI Tweaks mod




Description

A mod making the title screen ships fire their weapons. That's it.

Installation

Just download the zip and unpack it into the mods directory. There's no configuration required.

Requires LazyLib.

29
Bug Reports & Support / Gargoyle Drones system is missing description
« on: November 10, 2023, 07:53:57 AM »
Not sure if this can be considered a bug, but Gargoyle Drones ship system in Codex entry for Star Fortress reads "No description... yet". I haven't checked other drone types.

30
General Discussion / Turret turn rate drops when firing
« on: October 28, 2023, 03:06:06 PM »
I just noticed turret turn rate drops when firing, and drops even further when the weapon is in cooldown. Is this a feature and I just missed its documentation?

Pages: 1 [2] 3