Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 6 7 [8]

Author Topic: [0.95.1a] AdvancedGunneryControl 0.11.0  (Read 39802 times)

DesperatePeter

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #105 on: January 16, 2022, 12:46:46 PM »

TL;DR-Version: Target/AvoidShields now consider shield facing, bugs with aiming, respecting selected target (R-Key) and friendly fire considerations.

Hi everyone!

Sorry for the long period without updates, but my interest for Starsector finally got rekindled by the 0.95.1a release =)

After playing 2-3 campaigns with forced custom AI, debugging whenever I noticed something wird, I feel like I was finally able to iron out many of the issues that the custom AI still hard. I also finally managed to get the geometrical shield facing considerations for the target/avoid shield modes to work properly.

This ofc doesn't mean that there aren't any bugs left, but overall it feels a lot smoother now.

Here's the list of bugs I fixed:
  • Weapons should now properly respect the selected ship target. I originally had a line like "if (target == shipTarget){priority *= 0.1}". Unfortunately, target was the name for the target coordinates, not the target entity, which meant that that if was always false... Should work now. Weapons might still fire at other targets if the selected target doesn't match the weapon mode, but overall seem to respect the selected target much more.
  • Weapons will now properly consider the firing ships velocity when calculating which point to aim at, i.e. especially fast ships should have considerably better aim. This also applies for friendly fire calculations.
  • Weapons will now prioritize shooting ships over other stuff (e.g. fighters or station spurs)
  • Fixed some issues with target priority calculation. For instance, before, if there was a target directly in front of the weapon, that could lead to the priority of that target getting multiplied by 0, which made the weapon not consider other targets at all. Similarly, a target without shield capability (for instance...a station spur) could make a weapon set to AvoidShields not consider other targets.
  • Due to some unfortunate math quirks, my friendly fire calculations bugged out in some sectors of the map. Now everything is calculated relative to the weapon, i.e. friendly fire calculations should work everywhere on the map =)
  • Fixed an issue in TimeToTravel calculations for projectiles (mainly relevant for slow projectiles)
  • Tuned some internal parameters, mainly linked to target priority calculations
  • Weapons will not stop firing anymore when there is an ally within range BEHIND the enemy

Any chance of adding a thing for the ship to act like it has a specific type of missile on board? Like you know how ships get real aggressive when they have annihilator pods, or when they get annoyingly timid when they have strike range missiles like pilums? Probably not that big of a problem in vanilla but in modded I've often felt annoyed at how some ships just don't wanna get in range of their main weapons as much.

This is an interesting suggestion, but to be honest I kind of feel like this should be solvable via officer aggression level. Also, to be perfectly honest, I don't really want to add more features to the mod. When I was playing I realized that I only used about half the features (I rarely used ship modes, the GUI and most suffixes) and adding more features might just make the mod more confusing to use. So sorry, probably not gonna happen =/

Hiya sir!!! Any update to the mod yet?:) Thank you very much in advance!

Yup, just released 0.11.0 =)

Hey, logged in to post my thanks for this mod! But I was also wondering whether there could be an option to, say, target shields AND ignore fighters? When I target an enemy ship often times my anti-shield guns ignore my targeting orders and instead shoot at the various annoying fighters flying around. The guns on my ship also spread fire a lot, again ignoring my R targeting orders and instead fire and whatever ship they want to.

Thank you! =)
This is a great suggestion, I believe someone else already posted this idea a while ago. While playing, I also often times wanted to set a weapon to that exact combination xD
Unfortunately, the way I originally implemented weapon modes doesn't really support that. I.e. adding this functionality would require me to rewrite large parts of the mod, which I am currently unwilling to do xD I already explored the concept with ship modes (where you can select multiple).
This is something I definitely want to do at some point, but probably not in the near future. Ideally, I would like to replace weapon modes and suffixes with a list of options where you can select multiple. What makes this more challenging than ship modes is that some weapon options would be incompatible (e.g. IgnoreFighters and TargetFighters) and I'd have to find some way to ensure that only compatible options are selected. Also, I'd have to find a control scheme that works for changing options during combat...

I've also been noticing issues with AI targeting choice. The AI seems to wholly ignore when I R select a target and, instead of concentrating fire on it, will instead pick whatever targets it believes is "best" for the chosen firing mode.

For example, I just had a Conquest rushing me down. I turn to face it, use R to select it, but my anti-shield guns instead turn to fire at other ships around me. It was really starting to trigger me something fierce until I just put every single gun back to its default state. THEN the autofire AI finally obeyed my target selection.

Yeah, I noticed that issue too. Should hopefully be fixed now =)
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #106 on: January 23, 2022, 06:34:09 AM »

New pre-release (version 0.12.0, https://github.com/DesperatePeter/starsector-advanced-weapon-control/releases/tag/0.12.0) is out. Note that it has not yet been tested properly, so I appreciate any feedback on whether stuff works as intended or not.

Main features are some improvements to the GUI and suggested weapon modes: The GUI now offers an option to load suggested weapon modes for weapons, defined in data/config/modSettings.json. Other mods may also include suggested weapon modes, if their authors so desire. The actual suggestions are just a first draft, feedback on the suggestions is also appreciated!

Other than that, I converted the PD(Flux>X) and PD(Ammo<X) (disabled by default, re-enable in settings.editme) suffixes into weapon modes, as these suffixes really only worked well when combined with the Default-fire-mode.

EDIT: I just noticed that the big and small ships options needed to be enabled manually. It looks very cool but I was hoping it would allow targeting of all ships and just prioritise based on size. Would it be possible to add this as an alternative mode that is disabled by default?
While I didn't want to add more modes, I did include an option in the settings (at the bottom, called strictBigSmallShipMode). If set to false, those modes will essentially do what you described^^

Looking forward to any kind of feedback =) Do note that "I've played a couple hours and everything seems to work fine" is also valuable feedback!
Logged

Dal

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #107 on: January 23, 2022, 07:04:24 AM »

In the interest of persistent setting, configuration for allies, etc, have you considered creating a hullmod set for applying your settings? If they were sorted to the end of the alphabet I think the menu bloat would be manageable and it would allow much more convenient use. You could even have AGC settings saved in custom variants. Apologies if it's been discussed before.
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #108 on: January 24, 2022, 12:24:34 AM »

In the interest of persistent setting, configuration for allies, etc, have you considered creating a hullmod set for applying your settings? If they were sorted to the end of the alphabet I think the menu bloat would be manageable and it would allow much more convenient use. You could even have AGC settings saved in custom variants. Apologies if it's been discussed before.

Hiya and thanks for the suggestion!
I believe someone already suggested that way back and I actually had already built a working prototype of that idea before, but decided to scrap it.
The way I tried to implement it was: For each weapon group, there would have been a hullmod for each suffix and for each firing mode.
Imho, there's a couple issues with that idea, though (which is why I decided to scrap it):
  • There's a total of 12 fire modes and 5 suffixes (total: 17) and there's 7 weapon groups. That would mean a total of 119 hullmods. That's not only a ton of copy-paste-code to implement, but I kind of doubt anyone would really want to scroll through that list regularly to set up weapon modes. Even if I were to only add hullmods for half of the modes/suffixes, that would still be ~60.
  • Setting up modes like that felt really unintuitive and I believe would take quite long. Just imagine that you want to swap around a couple weapons for a variant and want to adjust the firing modes. You remove the according hullmods and want to add new ones. While you are scrolling through that list, you might have forgotten which group was supposed to get which mode, so you have to close the list, look at weapon groups again and re-open the list etc. I don't know about you, but I'm pretty certain that I would get annoyed by that pretty quickly
  • As this is flagged as a utility-mod, it should be possible to safely update/add to/remove from an ongoing campaign. As soon as I add hullmods, this would not be the case anymore. Something trivial like converting a suffix to a mode (as I did this update) would suddenly break updates.

My next idea was to instead have a couple of "templates". Essentially, you'd have a hullmod called something like "AGC_SetAsTemplate1" and "AGC_ApplyTemplate1". So you would outfit your ship and set up weapon groups, go into the GUI to set up firing modes, go back into the refit screen, add the AGC_SetAsTemplate1 hullmod, remove it again and add AGC_ApplyTemplate1. Now you could save it as an autofit template and apply it to other ships. Unfortunately, that idea didn't really seem to work intuitively either (not being able to see what a template does without switching to the GUI, how many templates should be available? Changing that number might break saves...).

But if you have a good idea of how to implement this in a way that is both intuitive and works well, I might be willing to bite the "save-compatibility"-bullet (I might split it into a secondary mod AGC_Hullmods, that requires AGC, though).

There might be other ways to do this that don't use hullmods, though.
If I'm not mistaken, your main concern is that you want to be able to autofit multiple ships of the same type and have them all have the same ship/firing-modes and suffixes (without having to manually set up each individual ship), right?

Maybe an option in the GUI called something like "Apply modes set for current ship to all ships with the same type and variant name" would be an option?
Or maybe simply a single hullmod called something like "AGC_CopyModesFromSameVariant" that, when applied to a ship, searches your fleet for ships with the same type and variant name and, if it finds one with non-null modes, applies them to the ship, would be possible.

One cool thing about the very first option (having ~120 different hullmods) would be, that - in theory at least - it could be used for tournament play. But until I know that the tournament folk would be interested in that, I don't really consider that a valid argument.

I'm interested to hear what your thoughts on this matter are and if you maybe have some better ideas! Is there maybe some obvious solution that I simply haven't thought of?

Edit: I just re-read your comment and noticed that you mentioned saving AGC settings in custom variants. That might indeed be a cool idea. Unfortunately, as far as I can tell, there is no "AutofitListener", but I could simply check when a new ship is deployed, if its modes are null, if there are modes stored in the variant.
« Last Edit: January 24, 2022, 12:58:02 AM by DesperatePeter »
Logged

lyravega

  • Lieutenant
  • **
  • Posts: 57
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #109 on: January 24, 2022, 01:38:12 AM »

I'm not that educated on the subject, but some mods utilize dynamic hullmods. As each ship has an individual ID, the mod stores relevant information somewhere (I believe), and apply the effects based on this thing.

In the firing mode GUI, there can be 3 save options: per-ship, per-variant, per-hull. You open the GUI, select a ship, and change your stuff, then you save it in one of the ways. And on the ship refit screen, just one hullmod can control them all. If the hullmod is installed, your mod will check for the ship ID, if it doesn't find anything for that ID, it can check the variant, if it cannot find anything for the variant, it can check the hull type.

Of course, as you've said, the GUI can also have an option to apply the firing mode selections for the similar types; it already does it per-ship, the other options could be per-variant and per-hull like the hullmod suggestion above.

Anyhow, just spit-balling here. Thank you for the mod =)
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #110 on: January 24, 2022, 11:10:23 AM »

TL;DR: Given that adding hullmods would break the utility-mod status of the mod and that a "apply to all ships of the same variant" button in the GUI seems to accomplish the goal almost as well, I'm currently favoring that approach. Feel free to try to convince me otherwise.

I'm not that educated on the subject, but some mods utilize dynamic hullmods. As each ship has an individual ID, the mod stores relevant information somewhere (I believe), and apply the effects based on this thing.
If I understand your suggestion correctly, that's pretty much what I meant by:
Quote
Or maybe simply a single hullmod called something like "AGC_CopyModesFromSameVariant" that, when applied to a ship, searches your fleet for ships with the same type and variant name and, if it finds one with non-null modes, applies them to the ship, would be possible.
If you meant something different, would you mind elaborating further?

Quote
In the firing mode GUI, there can be 3 save options: per-ship, per-variant, per-hull. You open the GUI, select a ship, and change your stuff, then you save it in one of the ways. And on the ship refit screen, just one hullmod can control them all. If the hullmod is installed, your mod will check for the ship ID, if it doesn't find anything for that ID, it can check the variant, if it cannot find anything for the variant, it can check the hull type.
That's an interesting idea, however, I feel like, for non-autofitting use this would just be an additional required step. If you, let's say, have a single Hammerhead in your fleet it seems like an unnecessary step to first have to go to the GUI to set the weapon modes up and then go back to the refitting screen to apply them by adding the hullmod. Additionally, saving per-hull seems kind of risky, since different variants are likely to have different weapons. So if you e.g. have 2 hammerheads, one is an SO hammerhead with reapers in group 1 (and assault chainguns in group 2) and the other is a long range Hammerhead with 2 HVDs in group 1, it seems unlikely that you would want the same modes per weapon group for both. Correct me if I'm wrong, but I feel like this idea wouldn't work all too well in practice =/

Quote
Of course, as you've said, the GUI can also have an option to apply the firing mode selections for the similar types; it already does it per-ship, the other options could be per-variant and per-hull like the hullmod suggestion above.
I think this is currently my preferred option. I don't really see enough benefit in a hullmod-based approach to justify breaking mid-campaign updatability and removability. But I think I'll just implement the per-variant option, as I don't see much use in a per-hull variant. Doing a per-hull variant would probably be super easy to implement once a per-variant version is finished, so if you can give me a convincing argument why a per-hull option would be beneficial, I'm open to change my mind, though =)

Quote
Anyhow, just spit-balling here. Thank you for the mod =)
You're very welcome and thanks for the suggestions!
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #111 on: January 25, 2022, 11:58:14 PM »

New pre-release (https://github.com/DesperatePeter/starsector-advanced-weapon-control/releases/tag/0.12.1) is out.

It includes the "copy modes to all ships of the same variant" feature in the GUI as well as adding a help hotkey (?-key by default) that will print current key bindings when pressed in combat.

In the interest of persistent setting, configuration for allies, etc, have you considered creating a hullmod set for applying your settings? If they were sorted to the end of the alphabet I think the menu bloat would be manageable and it would allow much more convenient use. You could even have AGC settings saved in custom variants. Apologies if it's been discussed before.
Please let me know if this works for you. As mentioned before, it's a tiny bit more work than having modes directly applied when autofitting, but imho should still do the trick and be a lot easier than having to manually set up modes for every ship.
Logged

grinningsphinx

  • Captain
  • ****
  • Posts: 321
    • View Profile
    • Email
Re: [0.95.1a] AdvancedGunneryControl 0.11.0
« Reply #112 on: January 26, 2022, 08:15:44 AM »

ty for the update!

When i press J, im only seeing six groups in the interface, however there are seven weapon groups when i assigned via the refit fleet interface. Am i missing something here?
« Last Edit: January 26, 2022, 02:03:03 PM by grinningsphinx »
Logged
Pages: 1 ... 6 7 [8]