[Starsector Mods][0.95.1a] AdvancedGunneryControl 1.7.0 – new flashy combat GUI and tag system!

  • Post category:Mods
  • Post comments:0 Comments

AdvancedGunneryControl 1.7.0
Adds additional auto-fire modes to weapon groups

(Requires

(Requires


Have you ever been frustrated with your Burst PDs firing all their charges at the enemy shield right before a salvo of Harpoons hits you?
Have you ever wondered why your Devastator Cannon deems it necessary to fire at a single Frigate at max range?
Ever got into an argument with your gunnery officer, because they insisted that they could hit a Broadsword with a Hellbore Cannon?
Then AdvancedGunneryControl is just the mod for you!

AdvancedGunneryControl is a utility mod that allows you to customize how your weapon groups behave on auto-fire mode.
Apply one or more tags per weapon group, configurable via GUI during battle or on the campaign map.

Latest changes: Scrollbar for tags, option to ignore fighter shields, several new tags (special thanks to Seanra for his contributions!)

Quick instructions:

  • Unzip the archive in your Starsector/mods folder
  • Play the game and press the “J”-Key during combat (recommended) or on the campaign map to open a GUI
  • In combat, target an ally (R-Key) beforehand to adjust their modes
  • By default, firing modes are automatically saved/loaded between combats
  • (optional) edit Starsector/mods/AdvancedGunneryControl/Settings.editme to add/remove tags, customize mod behaviour etc.
  • Can be safely added to/updated/removed from ongoing campaigns

Spoiler: click to expand
Tag Selection Guide
There’s lots of available tags, so that might feel a little bit overwhelming at first. To get started, I would recommend the following:

  • PD: This will restrict a PD weapon to only shoot missiles/fighters but not enemy ships. Use this for PD weapons that have limited charges or are ineffective against ships.
  • AvoidShields: This will make the weapon only shoot if the enemy is at high flux or you are flanking its shields. Use on HE weapons on ships that otherwise build up flux too quickly.
  • AvdArmor(33%): This will prevent the weapon from firing ineffective shots against armor while still shooting at shields and exposed hull. Useful for e.g. kinetic weapons.
  • Hold(Fx>90%): Prevents the weapon from firing when ship flux exceeds 90%. Use for flux-intensive weapons to prevent accidental overloads.
  • Ignore the other tags until you encounter a specific problem
  • Ignore ship modes

Video Showcase

Spoiler: click to expand
Spoiler
Of course the mod has many more features than shown in the video, but I wanted to keep it brief.

Mod integration for content expansion or faction mod authors

Spoiler: click to expand
Spoiler
You can blacklist weapons to prevent my mod from messing with their autofire AI.
You can add suggested tags that players can quickly apply to their weapon groups in the campaign GUI.
You can have AGC add tags to enemy ships via custom ship data entries.
You can use the AGC combatgui lib to easily create your own combat GUIs. Note: Jar-path has changed since 1.6.0
For details: Documentation

If you have any feature requests or bug reports, please let me know! If you do request a feature, please check back occasionally to provide feedback/clarification!
Also, please do let me know if you are using the mod and it works well =)

Happy modding & gaming together!


Is this only for pilots or could it be used for the AI as well? If the latter I would kiss you. If not, still, good job.

More control over ship systems and weapons is always welcomed. I bid you add one more mode: Ignore fighters. I am really tired of some ships with huge built in spinal cannon trying to hit a fighter while in middle of a battlestation siege. I am going to add this to my modlist and try it out. Thanks for sharing

First of all, thanks for your replies!
I’m currently working on a new version and will probably release it in a couple of days.
The main thing I am working on right now is introducing a setting file where you can customize the behaviour.
Mainly, I want the user to be able to customize the cycle-order of the modes (so that e.g. someone who only wants Default and PD Modes can simply remove all other modes from the cycle-order). Additionally, I am working on implementing a more customizable AI behaviour.
To give an example:
Currently, if you set a weapon group to “fighter-only”, the vanilla AI will still pick the target and if that target is not a fighter, the weapon simply won’t fire. I want to provide an option (enableCustomAI) where, if enabled, if the vanilla AI doesn’t choose a fighter as the target, my custom AI will kick in and try to see if there is a targetable fighter in range and target that instead.

More control over ship systems and weapons is always welcomed. I bid you add one more mode: Ignore fighters. I am really tired of some ships with huge built in spinal cannon trying to hit a fighter while in middle of a battlestation siege. I am going to add this to my modlist and try it out. Thanks for sharing

Awesome, glad to hear! An “Ignore Fighters” mode is a great idea and should be easy enough to implement, I will definitely include this in the next version!
If you have any feedback, please let me know!

Is this only for pilots or could it be used for the AI as well? If the latter I would kiss you. If not, still, good job.

Thanks! =)
To be honest, I’m not sure… I think it should be possible, but I’m afraid that the controls for that wouldn’t be super helpful.
I believe that controlling the fire-mode of AI-controlled ships on a per-weapon-group basis wouldn’t be very user-friendly.
What might be possible though is to simply introduce a hotkey that toggles PD-Mode for all weapons with the “PD-Only”*-Tag for a) all allied ships or b) the selected ship (in the TAB-screen in combat).
Alternatively, I could maybe include an option “Automatically set all AI-controlled PD-Only weapons to PD Mode” in the settings file.
But I’ll have to do some testing for that first, so this might take a little bit longer. I’ll definitely let you know when I made progress on this topic!
* If my understanding is correct, PD-Only refers to weapons such as PD-Lasers and Vulcans, whereas the PD-Tag also includes weapons like light machine guns. I believe that setting weapons such as light machine guns to PD-Mode for all allied ships would probably not be desirable^^


Hello DesperatePeter, this is a really cool mod you got here! But I got a request for it :)

If you could please add a blacklist system, so that other mods can throw a .json or .csv in their config folder to make this not apply to specific weapons? It would be really appreciated. 99% of the time this overwriting the weapon behavior is fine. But in a few cases? It really is not. A couple of low hanging fruit examples would be flare launcher weapons in some mods so if you could do this it would be really appreciated.


Hello DesperatePeter, this is a really cool mod you got here! But I got a request for it :)

If you could please add a blacklist system, so that other mods can throw a .json or .csv in their config folder to make this not apply to specific weapons? It would be really appreciated. 99% of the time this overwriting the weapon behavior is fine. But in a few cases? It really is not. A couple of low hanging fruit examples would be flare launcher weapons in some mods so if you could do this it would be really appreciated.

First of all, thank you! =)
About your suggestion:
That is a very valid point!
The mod should already conserve the weapon behaviour in the “Default”-fireMode.
However, it might very well break weapons such as the flare launcher in other fire modes…

I’m wondering what the best solution to this problem would be.
So far, I can see three solutions:

  • A blacklist in the folder of other mods (your suggestion)
  • A blacklist in my mod (that I will prefill with anything from popular mods I can think of and other mod creators can add stuff that I missed to via PRs)
  • Using Weapon AIHints for this (for instance, there is an AI Hint called “do not aim” that people can add to their weapons)

If possible, I think I would prefer the third option. But I’m not sure if, for instance, “do not aim” covers all weapons that would interact unfavorably with my mod^^
Please let me know what you think^^


So far, I can see three solutions:

  • A blacklist in the folder of other mods (your suggestion)
  • A blacklist in my mod (that I will prefill with anything from popular mods I can think of and other mod creators can add stuff that I missed to via PRs)
  • Using Weapon AIHints for this (for instance, there is an AI Hint called “do not aim” that people can add to their weapons)

My personal favorite solution to problems like this is to combine all three solutions. First, by creating a blacklist that is automatically generated based on tags and other information accessible through the API. Then by adding everything from blacklist files in my own mod and any other mod that wants to add to it (see Global.getSettings().getMergedSpreadsheetDataForMod)


Might I suggest using MagicSettings (from MagicLib) for this task: https://starsector.fandom.com/wiki/MagicLib#MagicSettings

Update: I just released version 0.2.0.
Most notably, that update contains:
1. Implemented NoFighters mode, as requested

More control over ship systems and weapons is always welcomed. I bid you add one more mode: Ignore fighters. I am really tired of some ships with huge built in spinal cannon trying to hit a fighter while in middle of a battlestation siege. I am going to add this to my modlist and try it out. Thanks for sharing

2. Added custom AI that picks suitable targets if the base AI doesn’t
3. Added a settings file, that allows you to choose which fire modes you want to use and to disable 2. if you don’t like it
(4. code cleanup, refactoring, testing, more polish, a more extensive readme)
Overall, the mod should be in a much better state now.

About the blacklist feature:
I will look into that next! Thank you Dark.Revenant and Sundog for the suggestions, that will definitely make this task less daunting!

Is this only for pilots or could it be used for the AI as well? If the latter I would kiss you. If not, still, good job.

I promise I will look into this in the near future too! But first I wanted to polish up the core features of the mod

And as always, thanks everyone for the feedback! I’m always happy about positive and (constructive) negative feedback, feature requests and suggestions!


Update:

Version 0.2.1 is out. This version focuses mostly on improvements to the custom AI* (for missile-only and fighter-only only; other modes use exclusively vanilla AI). While in 0.2.0 the custom AI felt pretty janky, turned around erratically and fired shots into the vast nothingness of space a lot, the current AI actually seems pretty competent. Also, you can now define in the settings how trigger-happy the custom AI should be.

I am planning to do a 0.2.2 release in the near future that will focus mainly on polish, code cleanup, further AI improvements etc.

After that I will work on a 0.3.0 release that will aim to include the requested features of a weapon-blacklist and the option to set fire modes for AI ships (in some capacity).

Might I suggest using MagicSettings (from MagicLib) for this task: https://starsector.fandom.com/wiki/MagicLib#MagicSettings

Just a quick question about this.
Do I understand correctly that I would simply call e.g.:

Code
blacklist = MagicSettings.getList("swp", "weaponBlacklist")

and then l could let people know in my readme that they can include a list of weapons they want to blacklist into their settings.json under the tag “weaponBlacklist”?
Also, is there a way to essentially do

Code
blacklist = MagicSettings.getList("*", "weaponBlacklist")

(get from all mods)? Or would I have to include something like a “modsToGetBlacklistFrom”-field in my settings?

Update: Figured the “all mods” part out: Global.getSettings().modManager.enabledModsCopy is a list that also contains the ids.


Update: Version 0.3.0 released! It includes the requested blacklist feature. It also includes some more extensive settings and adds consideration for target leading accuracy and friendly fire to the custom AI.

Update: Version 0.4.1 released! It includes the requested “modify allies’ weapon fire modes” feature and several quality of life improvements.

Wow. That was fast. I’ll test it out as I play.

This looks amazing! Is there any way to save what you set each weapon group to or do you have to reset it each time you go into combat?

This looks amazing! Is there any way to save what you set each weapon group to or do you have to reset it each time you go into combat?

Glad you like it! =)

You will like to hear that that is exactly what I’m currently working on xD
If you’d like, you can get the latest pre-release version, that already contains this feature.
However, I still have to fix a couple of bugs (most prominently: If you refit your ship things get weird^^) and do some more testing before releasing it.
But I’d estimate that it will be ready soon (always hard to say with bugs whether finding the issue will take 10 minutes or 10 hours…), maybe tomorrow.

Update: I think I fixed the bug. I released a new pre-release version. I think that version should work fine. But I’ll do some more testing tommorrow.
Anyone who wants to try it out and report back if they see anything funky would be much appreciated!

Leave a Reply