Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Uniquifying the Factions, Part 2 (04/30/22)

Pages: 1 2 3 [4] 5 6 ... 9

Author Topic: [0.95.1a] AdvancedGunneryControl 0.13.0  (Read 53498 times)

Hellya

  • Lieutenant
  • **
  • Posts: 90
    • View Profile
    • Email
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #45 on: May 14, 2021, 04:17:11 PM »

Could you do a config that will make the ship fire all it's missles at the nearest viable target if only a certain % of the hull remain? Could be really useful to frigates that are dying but die without firing the missles. If they are gonna explode anyway it's better to shoot the missles even at a shield than not firing it at all.

I second the Blow Your Load protocol.
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #46 on: May 14, 2021, 11:31:24 PM »

Could you do a config that will make the ship fire all it's missles at the nearest viable target if only a certain % of the hull remain? Could be really useful to frigates that are dying but die without firing the missles. If they are gonna explode anyway it's better to shoot the missles even at a shield than not firing it at all.

I second the Blow Your Load protocol.

Hey folks, thanks for the suggestion, I like the idea.
However, I can see a couple issues where I am unsure as to how a satisfactory solution for this could look like.

a) My mod only interacts with auto-fire. I think AI-controlled ships will usually not put limited-ammo missiles on auto-fire, therefore this mode would probably not accomplish much on AI-ships.
b) What should that mode do, when the ship is at full hull? Should it just not fire (i.e. only fire when manually fired)? Should it use default auto-fire behavior (which would essentially just fire the missiles at will, anyways)?
c) Maybe this would work better as a mode suffix? Maybe alongside an "Opportunistic"/"ConserveAmmo" mode, that only fires when it thinks the shot will be effective (e.g. only at overloaded targets for finisher missiles etc.). Then you could  e.g. put your flagships harpoons on "Opportunistic" with the "BombsAwayAtLowHull" suffix.

I think that if I were to dabble in ShipAI, there might be a possibility to make this work better for AI-controlled ships, but I still have to look into ShipAI Plugins and evaluate how doable that is.
Maybe, just maybe, there will be ship modes in an update at some point in the future^^

Update: I looked into ShipAI Plugins a little bit. I think that making a custom plugin that e.g. essentially just deselects all weapon groups and sets all weapon groups to autofire every frame would be doable. But I have to try it out and see if it works as intended, how much performance that would eat, whether it has any weird side effects, ...
If this works, that might open the door to more customization options.
« Last Edit: May 15, 2021, 01:36:43 AM by DesperatePeter »
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #47 on: May 17, 2021, 03:57:45 AM »

Update: 0.9.0 is out as a pre-release. It comes with ship modes, multiple mode loadouts and additional modes/suffixes. From initial testing, most stuff seems to work, but I have not yet tested all features properly.
Readme for this version

@ Farlarzia, Lprsti99, writeru, Hellya, Rararara:
This update should include all features requested by you guys (except for the fighter regroup stuff). I'd much appreciate it if you could try the pre-release version and report back whether your requested feature works as intended.

Here are the solutions:
  • To make the AI strictly adhere to firing modes, set the ship mode to ForceAutofire in the GUI
  • To use a weapon as PD when it's below max Ammo, set the fire mode to default with the PD(Ammo<90%) suffix. Same for flux threshold
  • To fire remaining missiles before dying, set the weapon group mode to Opportunist and suffix to PanicFire (enable ForceAutofire ship mode for best results)
  • To make all fighter weapons switch back to default mode, go to the GUI for the ship, switch to loadout 2, copy the last loadout and change fighter mode to default. Repeat for all ships. In combat, press the "+"-Key to cycle loadouts for all ships. Alternatively, if you don't mind putting everything to default, simply leave loadout 2 or 3 blank for all ships and use it as a "default everything" loadout.

Note: If the solution isn't exactly what you imagined, please keep in mind that I tried to a) work within the existing framework as much as possible (rather than rewriting the whole mod) and b) tried to keep solutions as generic as possible. E.g. a "switch all fighter mode groups to default mode"-feature would be very specific compared to loadouts, and inevitably lead to people requesting "can't I switch my BigShip modes to default when there are no big ships?" etc.

Note: I opted against adding prefixes, which I had previously intended, because prefixes would need to be checked every frame. I.e. the mod would have to check prefixes for every weapon (group) for every deployed ship every frame. I found that the performance cost this generates didn't outweigh the benefits.
« Last Edit: May 17, 2021, 10:47:49 PM by DesperatePeter »
Logged

Lprsti99

  • Ensign
  • *
  • Posts: 25
    • View Profile
    • Email
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #48 on: May 17, 2021, 09:19:09 AM »

Checking it out now, looks great so far! Also, update the readme to reference J instead of G for the gui  :P

E: Crash on getting in range of a pursuit target:

Code
2590849 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.IllegalStateException: weapon.spec.primaryRoleStr must not be null
java.lang.IllegalStateException: weapon.spec.primaryRoleStr must not be null
at com.dp.advancedgunnerycontrol.weaponais.AGCUitlsKt.isOpportuneType(AGCUitls.kt:82)
at com.dp.advancedgunnerycontrol.weaponais.AGCUitlsKt.isOpportuneTarget(AGCUitls.kt:64)
at com.dp.advancedgunnerycontrol.weaponais.suffixes.ConserveAmmoSuffix.shouldFire(ConserveAmmoSuffix.kt:10)
at com.dp.advancedgunnerycontrol.weaponais.AdjustableAIPlugin.shouldFire(AdjustableAIPlugin.kt:37)
at com.fs.starfarer.combat.systems.G.o00000(Unknown Source)
at com.fs.starfarer.combat.systems.G.advance(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.advance(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Other than that, works a charm!
« Last Edit: May 17, 2021, 07:35:52 PM by Lprsti99 »
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #49 on: May 17, 2021, 10:44:08 PM »

Checking it out now, looks great so far! Also, update the readme to reference J instead of G for the gui  :P

E: Crash on getting in range of a pursuit target:

Code
2590849 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.IllegalStateException: weapon.spec.primaryRoleStr must not be null
java.lang.IllegalStateException: weapon.spec.primaryRoleStr must not be null
at com.dp.advancedgunnerycontrol.weaponais.AGCUitlsKt.isOpportuneType(AGCUitls.kt:82)
at com.dp.advancedgunnerycontrol.weaponais.AGCUitlsKt.isOpportuneTarget(AGCUitls.kt:64)
at com.dp.advancedgunnerycontrol.weaponais.suffixes.ConserveAmmoSuffix.shouldFire(ConserveAmmoSuffix.kt:10)
at com.dp.advancedgunnerycontrol.weaponais.AdjustableAIPlugin.shouldFire(AdjustableAIPlugin.kt:37)
at com.fs.starfarer.combat.systems.G.o00000(Unknown Source)
at com.fs.starfarer.combat.systems.G.advance(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.advance(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Other than that, works a charm!

Hi Lprsti99,

thanks a lot for the input, much appreciated!

Ahh, yeah, looks like I forgot a nullptr check (wasn't aware that weapon.spec.primaryRoleStr could be null xD).

I fixed the readme and the nullptr issue and pushed a new pre-release (0.9.1).
Logged

Farlarzia

  • Commander
  • ***
  • Posts: 167
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #50 on: May 18, 2021, 08:59:06 PM »

@ Farlarzia, Lprsti99, writeru, Hellya, Rararara:
This update should include all features requested by you guys (except for the fighter regroup stuff). I'd much appreciate it if you could try the pre-release version and report back whether your requested feature works as intended.

Here are the solutions:
  • To make the AI strictly adhere to firing modes, set the ship mode to ForceAutofire in the GUI
  • To use a weapon as PD when it's below max Ammo, set the fire mode to default with the PD(Ammo<90%) suffix. Same for flux threshold
  • To fire remaining missiles before dying, set the weapon group mode to Opportunist and suffix to PanicFire (enable ForceAutofire ship mode for best results)
  • To make all fighter weapons switch back to default mode, go to the GUI for the ship, switch to loadout 2, copy the last loadout and change fighter mode to default. Repeat for all ships. In combat, press the "+"-Key to cycle loadouts for all ships. Alternatively, if you don't mind putting everything to default, simply leave loadout 2 or 3 blank for all ships and use it as a "default everything" loadout.

Wow, I really wasn't sure if my request was even feasible, and yet you've delivered completely on it already.
I did some testing with the new PD settings, and they're working great as far as I can tell.
Honestly incredible work  ;D ;D ;D

As a side note, if you're on discord I'd suggest dropping by the unofficial starsector discord (https://discord.gg/Sp28tYfQ) - They'll be able to give you the modder role, and you'll be able announce updates in the mod updates channel - a lot of people haven't heard of this mod yet that I'm sure would be interested.
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.8.5
« Reply #51 on: May 19, 2021, 09:17:50 PM »

Wow, I really wasn't sure if my request was even feasible, and yet you've delivered completely on it already.
I did some testing with the new PD settings, and they're working great as far as I can tell.
Honestly incredible work  ;D ;D ;D

As a side note, if you're on discord I'd suggest dropping by the unofficial starsector discord (https://discord.gg/Sp28tYfQ) - They'll be able to give you the modder role, and you'll be able announce updates in the mod updates channel - a lot of people haven't heard of this mod yet that I'm sure would be interested.

Thanks for the feedback! =) Glad to hear that it seems to work well!

I already am on the discord somewhat frequently, but I'll make sure to ask to be given the modder role =)
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.2
« Reply #52 on: May 22, 2021, 09:20:32 AM »

Update: release 0.9.2 is out!
Compared to 0.9.1, it comes with a couple fixes, additional ship modes and GUI Button tooltips.
As the ship modes are a pretty new feature, any feedback on how well they work is much appreciated!
Logged

Harpuea

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.2
« Reply #53 on: May 22, 2021, 09:40:58 AM »

Quote
ShieldsOff(Flux>50%)   Force turn off shield at ship flux > 50%   Only recommended for high armor ships with good PD

Very nice feature. I absolutely needed this for a very long time.
Logged

Lprsti99

  • Ensign
  • *
  • Posts: 25
    • View Profile
    • Email
Re: [0.95a] AdvancedGunneryControl 0.9.2
« Reply #54 on: May 22, 2021, 10:34:05 AM »

Neat! Sidenote, update the versionchecker file to point to this thread instead of the old one next time you update :)
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.2
« Reply #55 on: May 22, 2021, 10:54:35 AM »

Neat! Sidenote, update the versionchecker file to point to this thread instead of the old one next time you update :)

Oh, right, good catch, will do! =)

Quote
ShieldsOff(Flux>50%)   Force turn off shield at ship flux > 50%   Only recommended for high armor ships with good PD

Very nice feature. I absolutely needed this for a very long time.

Glad you like it =)
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.2
« Reply #56 on: May 24, 2021, 01:04:44 AM »

Update: 0.9.3 is out!
It mainly features the correct forum thread id and improved GUI tooltips, alongside some minor fixes/cleanup
Logged

BreenBB

  • Commander
  • ***
  • Posts: 117
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.3
« Reply #57 on: May 25, 2021, 11:34:30 PM »

I like what at least someone is trying ti improve AI :)

About suggestions, I have some, I think for ships with heavy armor, but not very great flux stats is good idea make force flush option, for example if its Flux reach 85% its enable vent no matter what happens, another idea is option to exclude some weapons from being considered as threat, low example weak anti fighter missiles, PD laser, and tactical and gravitron beams, so NPC will chase enemy, or vent even if its attacked by these weapons.

Also good idea for modded ships with modules, modules technically its another ship attached to the main ship, and they attack any vessels at their own discretion, I think is good idea is to make option what makes it prioritize main ship target.
Logged

DesperatePeter

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.3
« Reply #58 on: May 27, 2021, 09:07:38 AM »

I like what at least someone is trying ti improve AI :)
Thanks :)

Quote
About suggestions, I have some, I think for ships with heavy armor, but not very great flux stats is good idea make force flush option, for example if its Flux reach 85% its enable vent no matter what happens, another idea is option to exclude some weapons from being considered as threat, low example weak anti fighter missiles, PD laser, and tactical and gravitron beams, so NPC will chase enemy, or vent even if its attacked by these weapons.
There already is a ship mode called Vent(Flux>50%) that kind of does this, however it doesn't check if there's enemies with dangerous weapons nearby, it simply vents. I could absolutely see adding a "safety-check" to this mode (e.g. checking if current armor is high and if enemies nearby have weapons that deal high amounts of HE damage). So thanks for the suggestion!

Quote
Also good idea for modded ships with modules, modules technically its another ship attached to the main ship, and they attack any vessels at their own discretion, I think is good idea is to make option what makes it prioritize main ship target.

Hmm, I'm unsure how well this feature fits the scope of this mod. I was thinking about adding features for better control of how fighter wings behave (and I think ship-system based fighters would fit the theme of fighters) to this mod, but I'm afraid the mod would become too big & complicated if I did this. It's called advanced gunnery control after all^^

But once I feel like this mod is mostly finished (which should be soon-ish), if I have the time and motivation, I might consider making a second mod that focusses more on fighters (Advanced Wing Commander maybe?).
I already had ideas like being able to assign different tasks/targets/roles to different wings.

Roles would be more generalized (e.g. "Defend allies in need", "Escort Carrier", "Hunt isolated targets", "Aggressive", ...) and could be assigned for any carrier in the fleet.
Tasks/targets would allow you to (temporarily) overwrite the roles assigned to single wings for the player controlled ship only.

No promises though. That sounds like quite a bit of work^^
Logged

beyondfubar

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.95a] AdvancedGunneryControl 0.9.3
« Reply #59 on: May 27, 2021, 02:00:09 PM »

This sounds amazing. I would have downloaded it earlier but someone said "Null pointer" in a message and I ran out my door screaming in an imagined language and had to be tranquilized with a dart gun by animal control. 

I'm good now I will try this out. Can only be a good thing, aside from truly, primal, and horrific mental trauma.

Onomatophobia aside I'm excited!
Logged
Pages: 1 2 3 [4] 5 6 ... 9