Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/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.

Messages - Genir

Pages: 1 ... 17 18 [19] 20 21 ... 24
271
No, it's a case of multiple manually created weapon groups being droped and replaced by auto assigned ones. This case is also not related to using stored variants.

I remember that a single group is treated as "no group" in certain cases and I wouldn't bother you with this anymore  ;)

272
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:

273
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.

[attachment deleted by admin]

274
Mods / Re: [0.96a] AI Tweaks
« on: December 09, 2023, 02:00:06 PM »
v0.3.0 is out.

Changes:
  • Added specialized target leading algorithm for hardpoints

275
Mods / Re: [0.96a] AI Tweaks
« on: December 08, 2023, 09:12:26 AM »
Very cool mod, thanks for making this.

I'm glad you like it! The mod is still very much work in progress. I'm planning on adding more features and improving existing ones before publishing AI Tweaks on the mod index.

Eg. just yesterday I discovered a bug with the Needler AI. Needlers don't want to shoot at High Tech Station shields, because of how the shields are attached to separate, specialized station modules.

276
Mods / Re: [0.96a] AI Tweaks
« on: November 29, 2023, 11:17:55 AM »
v0.2.0 is out.

Changes:
  • Added improved target leading algorithm for autofire weapons

277
Clever!

I'd like to see ships cross the screen at vanilla pace (AKA enable 0 flux speed boost). Onslaught for example is really slow without it.

The shooting to the sides is missing... something. Seeing shots (like Vulcans) quickly fade out on a large monitor is meh.

Noted. Speed issue should be easy to fix. As for low range weapons, I'll try some solutions. We'll see what looks best.

I'm also thinking about making the ships attack asteroids...

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

Download v2.0.3

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]

279
Suggestions / Re: Have USE_LESS_VS_HULL weapon AI tag
« on: November 25, 2023, 01:30:16 PM »
You could definitely re-conceptualize autofire as something different, though! I'm just saying that as things stand now, it's primarily a control, and changing its role this drastically is 1) not something I want to do and 2) if done, would have some far-reaching consequences and would require other changes.

This leads to an interesting question. What is the role of weapon groups and the division between autofire and manual fire weapons on AI controlled ships? I understand the role of weapon groups and autofire on player-piloted ships. But the AI has the "presence of mind" to manually control each individual weapon. Is it just a carry over from the player focused UI, or is there a specific purpose?

I'm asking, because intuitively I don't see a reason for the division. That's what makes it easy for me to abuse Autofire plugin and put complex logic in there. I just see it as an equally good place for the logic as any other. Except the ship AI probably allows for better integration of the decision making with the rest of ship behavior.

280
Suggestions / Re: Have USE_LESS_VS_HULL weapon AI tag
« on: November 25, 2023, 01:22:24 PM »
Ah, but they are absolutely not! If it's "always fire", you can stop it from firing by turning off autofire or by using hold fire. If it's "never fire", then you're stuck with having to do it manually, which is not a good fit for many weapons, can be very inconvenient, and leaves you with no options if you have multiple groups that need manual control at the same time.

Are you certain this is feasible? What you describe is simillar to manually triggering multiple weapon groups at once. If you eg want to prevent Needlers from firing at exposed hulls, you would need to track each Needler target and disable the relevant weapon group when the Needler is aiming at a shieldless enemy. This seems very difficult.

On the other hand, if the control method you describe is feasible, doesn't it make USE_LESS_VS_SHIEDLS tag redundant as well?

281
Bug Reports & Support / Re: Weapon groups not saved in autofit variants
« on: November 19, 2023, 02:51:02 PM »
I would still expect to be able to save variants with just one weapon group.

Anyway, I was able to save a single group variant for LP Brawler and Centurion.

282
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.

283
Suggestions / Re: Have USE_LESS_VS_HULL weapon AI tag
« on: November 19, 2023, 11:17:27 AM »
Sure, but I'm speaking purely from a game design perspective here, not in-fiction justifications for it. But to go with that specific example "do not fire your weapon system on enemy shields *for the entire battle no matter what*" is the the problematic part here.

I guess this boils down to what we consider the default, hands-off behavior for a given weapon. Both options, "always fire on shields" and "never fire on shields" are equally limiting and inflexible. But that's what manual fire control is for. Player and AI both can identify and exploit opportunities when it's worth to override the weapon default logic. It's just the matter of what we should expect the weapon to do when we're not fine-tuning it manually.

You already let the genie out of the bottle with USE_LESS_VS_SHIELDS tag. Ideas like USE_LESS_VS_HULL or applying USE_LESS_VS_SHIELDS to Tachyon Lance are just natural cosequences.

Having said that, I understand the idea behind autofire groups and the simple logic they should exhibit. And why USE_LESS_VS_SHIELDS was problematic. Still, being afraid to touch the ship-wide AI and the fact putting logic into autofire plugins actually works, inspires me to ideas like described in this thread.

284
Suggestions / Re: Have USE_LESS_VS_HULL weapon AI tag
« on: November 19, 2023, 09:06:52 AM »
And, finally, putting smarts into the autofire AI goes against the general design. These kinds of high-level decisions should be in the hands of the player (or the overall ship AI), not left up to each individual weapon. Autofire is a means of *weapon control*, not decision-making, and adding decision-making there undermines its main intended function. If I put the HIL on autofire, it should damn well fire and not try to decide if it feels like it or not; design-wise it's virtually identical to the same thing happening if you press the "fire" button - it's just a control.

My interpretation of autofire weapons is that they are operated by gunnery crew, instead of being centrally managed from the bridge. And I certainly expect my gunnery officers to be capable of understanding simple orders like “do not fire your weapon system on enemy shields”.

Quote
(I totally get that the autofire AI is the easiest place to make AI changes with a mod, though. So this is absolutely not criticizing what you're doing, just explaining my thoughts about it and why it's not a direction I'm likely to take things in if it can be helped! What you're doing with this sounds like fun.)

Yes, that’s another broad topic. Touching ship AI is so intimidating! Autofire plugins and ship system plugins make it more approachable. But even the humble autofire plugin is not simple! It needs to take into account target selection, AI tags, fire leading and so much more.

I follow the approach introduced by DesperatePeter in his Advanced Gunnery Control mod. Instead of registering autofire plugins through BaseModPlugin.pickWeaponAutofireAI, I let the game spawn ships with default autofire AI. Only then I iterate over the ship weapon groups, and replace default AI with my implementation. That way I can save the default AI instance and use it as a part of my implementation. This allows me to delegate the heavy lifting to vanilla logic, and only override its decisions in selected circumstances.

Making the AI API more granular, with different behavior aspects controlled by different plugins, would certainly help with AI modding. Also, easy access to vanilla logic, so that you don’t have to reimplement the behavior from scratch, would help immensely!

285
Suggestions / Re: Have USE_LESS_VS_HULL weapon AI tag
« on: November 19, 2023, 08:46:06 AM »
Because you're buffing the offensive capabilities - situationally - in a way that the ship AI does not understand. The weapon use is "smarter" but much of why it's more effective is because the use patterns are such that it's harder for the AI to counter, in part because it's not coded to, and it part because it's a harder problem to solve. I.E. you're countering the existing AI defensive behaviors. Instead of making weapon use look "dumb", you're making the defending ship AI look "dumb". Now, there may be some exceptions/details here that I'm glossing over etc, but fundamentally I think this is the outcome of going down that path.

I see your point. The part about defense behavior being harder to solve is important. I would still go with improving the attack behavior, even if it shifts the “dumbness” towards defense. The reason being exactly that it’s easier to solve. I consider it more frustrating to experience AI doing things wrong where it’s obvious how the algorithm could be improved, vs AI doing things wrong in a situation where I personally would not fare any better.

Quote
It's also going to make weapon use look "dumb" situationally, too. "Why is the AI not firing when it should" is *much* more frustrating - and looks a lot worse, imo - than the AI firing when it probably shouldn't.

Yes, that’s in fact the point of my AI mods. Take the Tachony Lance as an example. It annoys me to no end when a ship finally manages to drop enemy shields but instead of immediately impaling it with the Lance is stuck with harmlessly bouncing kinetics of the armor! Of course you do waste some attack opportunities that way, but it’s a worthy tradeoff.

Quote
This is a large part of the reason the AI is as it is now. And, on the same note, "my ships are getting blown up because they can't defend against these attacks intelligently" is *also* more frustrating than ineffectual offense

I’m not sure about this one. And even if, does being unable to defend from a well placed Tachon Lance attack or Needler burst mean you are ineffectual in defense? How would you personally defend from such an attack? I probably wouldn’t, and if the AI defeats me by using its weapons effectively, it’s a win.

Anyway, I think we are at the stage where we discuss what’s more subjectively frustrating for each one of us. This may indicate the conversation is nearing its end  ;D

Pages: 1 ... 17 18 [19] 20 21 ... 24