Fractal Softworks Forum

Starsector => Mods => Topic started by: hqz on March 15, 2016, 12:47:37 PM

Title: [0.7.2a] Autonomous Ships 0.4.1
Post by: hqz on March 15, 2016, 12:47:37 PM
Autonomous Ships
Download link (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.4.1.zip)

Description

This mod adds new hullmods that allow the player to set predefined battle commands for AI-piloted ships in their fleet.
e.g. The Auto retreat command hullmod will force the ship to retreat when below a certain hull integrity level.

The command hullmods cost 0 ordnance points.

Current features


Installation

Just download the mod and unpack the ZIP file into your mods folder. This mod requires the LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) mod.

Extra information

Spoiler

  • To customize the retreat command hull integrity thresholds, edit data/config/autonomous-ships.json.
  • The commands won't work in the simulator nor if the flagship is on autopilot.
  • The source code is packaged with each release. There is also a repository on Github (https://github.com/herve-quiroz/autonomous-ships).
  • The mod supports Version Checker (http://fractalsoftworks.com/forum/index.php?topic=8181.0).

[close]

Possible next features

Spoiler

  • Escort?
  • Capture all navigation points?

[close]

Credits

Spoiler

  • HELMUT (icons)

[close]

Version history

Spoiler

0.4.1 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.4.1.zip)
  • Fixed a crash with the "attack fighter" command.

0.4.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.4.0.zip)
  • New command: retreat when the ship has no order to follow.
  • New command: attack the nearest fighter wing when the ship has no other order to follow.
  • Changed the icons for the hullmods, using a new set of icons from HELMUT.

0.3.1 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.3.1.zip)
  • Added support for Version Checker.

0.3.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.3.0.zip)
  • New command: retreat when exceeded peak performance time.
  • New commands: retreat when below 40% or 60% CR.
  • Changed the icons for the hullmods again, this time using the ones made by HELMUT.

0.2.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.2.0.zip)
  • New command: retreat when no missiles left.
  • Changed the icons for the hullmods.

0.1.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.1.0.zip)
  • Initial release.
  • New commands: auto retreat below hull integrity level. (3 levels)

[close]

Title: Re: [0.7.2a] Autonomous Ships 0.1.0
Post by: hqz on March 15, 2016, 12:50:12 PM
This is my first mod so please let me know if there are better ways to do what I'm trying to achieve here.

The source code is embedded in the downloadable archive but I'll probably also start a repository on Github shortly in case anyone is interested in contributing.

I don't have any definite ideas for the next commands to add to the list so suggestions are welcome. :)
Title: Re: [0.7.2a] Autonomous Ships 0.1.0
Post by: HELMUT on March 15, 2016, 01:24:51 PM
That's a pretty cool feature. I tried it a bit, it doesn't works in the simulator or if the flagship is on autopilot, not really big deal though. A "retreat when CR is low or start degrading" command could be a good addition. Less importantly, retreat when no missiles left, or no fighters replacement available could possibly be interesting. It might clutter the hullmod screen a bit though.

Also it would need a new hullmod icon.

I'll definitely try to use that in my future campaigns.
Title: Re: [0.7.2a] Autonomous Ships 0.1.0
Post by: hqz on March 15, 2016, 02:57:56 PM
it doesn't works in the simulator or if the flagship is on autopilot, not really big deal though.

Thanks. I've updated the post with this information.

A "retreat when CR is low or start degrading" command could be a good addition. Less importantly, retreat when no missiles left, or no fighters replacement available could possibly be interesting. It might clutter the hullmod screen a bit though.

Good ideas. I've added these to the future feature list. It's actually easier to implement than the escort commands, so I'll probably give it a try first.

Also it would need a new hullmod icon.

Ah yes, forgot about that. I'm not very good at graphic stuff myself. But I'll try to find something that represents the command better.
Title: Re: [0.7.2a] Autonomous Ships 0.1.0
Post by: HELMUT on March 15, 2016, 04:07:46 PM
Here i kitbashed a bunch of hullmods (harder than i expected). Those are supposed to represent some kind of AI core, differently coloured for different type of command. Feel free to use those until you can get something more fitting.

(http://i.imgur.com/EKhIk2K.png) (http://i.imgur.com/V0ZRzeU.png) (http://i.imgur.com/fPU9MY0.png) (http://i.imgur.com/RzJuUA8.png) (http://i.imgur.com/hkj6PgW.png)
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: hqz on March 15, 2016, 04:12:22 PM
Quick update before I head to bed:

0.2.0

From the testing I did it seems to be okay so far. e.g. the ship does not retreat when using salamanders (I initially thought they would give me a hard time to implement).
Let me know if that works for you.
Title: Re: [0.7.2a] Autonomous Ships 0.1.0
Post by: hqz on March 15, 2016, 04:15:55 PM
Here i kitbashed a bunch of hullmods (harder than i expected). Those are supposed to represent some kind of AI core, differently coloured for different type of command. Feel free to use those until you can get something more fitting.

Very nice. Thanks for doing this.

While you were making them I was already updating the mod so I went with reusing an icon from the skills. But I really prefer your icons. And you're right, the different colors will help to differentiate between the various commands. I'll include them in the next version, most probably tomorrow evening.
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: Cyan Leader on March 15, 2016, 04:41:27 PM
I'd love a hullmod that would restrict my ships from blowing their missile loads into fighters and frigates.
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: 19_30s on March 15, 2016, 06:28:33 PM
Nice work :D
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: Weltall on March 15, 2016, 06:30:19 PM
I tried it just to see my half bashed ships FINALLY run for their life. It was so sweet to see in the chatter that my *** got hull damage and then when I checked the battle map, it was fleeing. This is so nice!  ;D
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: NightKev on March 15, 2016, 09:14:30 PM
Awesome! This is the type of thing that the base game needs (I was going to get around to posting in the suggestions forum eventually...); Alex said he didn't want the player to [have to] micro his AI-controlled ships and that's why it's the way it is now, but there aren't any sort of general fleet commands like "stick together" or "retreat when heavily damaged" etc so I still end up needing to micro my dumb AI companions anyway.

As for mod feature suggestions, I'd say work on things the command UI doesn't do very well right now (so make "cap points" a low priority for example). A "try to flank" command might be useful, the AI kind of just mashes together in the middle with a few random ships flying off into the distance right now, and doesn't do any flanking except incidentally. Also, maybe a hullmod to stop PD weapons from firing on ships larger than frigate class, it's kind of annoying when my PD weapons waste their charges on a destroyer and then I get pelted with missiles that they can no longer effectively shoot down.
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: Dudley Dickerson on March 16, 2016, 07:57:47 AM
Retreat on CR threshold would be awesome.
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: Surge on March 16, 2016, 08:42:59 AM
Agreed, you have no idea how many OP I would spend to have ships like the Mantis and Venom run away as soon as they hit malfunctions territory because they are gonna get there FAST.
Title: Re: [0.7.2a] Autonomous Ships 0.2.0
Post by: Alphascrub on March 16, 2016, 03:55:15 PM
I'd love a hullmod that would restrict my ships from blowing their missile loads into fighters and frigates.

I would second this tired of seeing my ships waste harpoons and larger missiles on fighters and such.
Title: Re: [0.7.2a] Autonomous Ships 0.3.0
Post by: hqz on March 16, 2016, 05:13:38 PM
Here is a new version, with the requested CR-related commands. :)

0.3.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.3.0.zip)

Note: if you deploy a ship with the "retreat below 60% CR" hullmod and the ship is already below 60% CR, it will only retreat after it has exceeded its peak performance time. This is explicitly called out in the hullmod description though.

Thank you HELMUT for the icons. I plan to use the various colors to differentiate the type of command as we discussed. So right now we only use the blue one since all the implemented hullmods are about retreating.
Title: Re: [0.7.2a] Autonomous Ships 0.3.0
Post by: hqz on March 16, 2016, 05:39:41 PM
I've also started to host the source code at Github in case anyone wants to contribute:
https://github.com/herve-quiroz/autonomous-ships

(nothing too fancy here, and I suspect the Makefile would only work on MacOS anyway)
Title: Re: [0.7.2a] Autonomous Ships 0.3.0
Post by: SierraTangoDelta on March 16, 2016, 11:15:53 PM
Wew I have been waiting for something like this. Reminds me a bit of Dominions 4.
Title: Re: [0.7.2a] Autonomous Ships 0.3.1
Post by: hqz on March 17, 2016, 09:59:38 AM
0.4.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.4.0.zip)

Note: I've also added support for Version Checker in an earlier release that I didn't announce (0.3.1).

Also, the mod now requires LazyLib.
Title: Re: [0.7.2a] Autonomous Ships 0.3.1
Post by: Alphascrub on March 19, 2016, 03:27:35 PM
0.4.0 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.4.0.zip)
  • New command: retreat when the ship has no order to follow.
  • New command: attack the nearest fighter wing when the ship has no other order to follow.
  • Changed the icons for the hullmods, using a new set of icons from HELMUT.

Note: I've also added support for Version Checker in an earlier release that I didn't announce (0.3.1).

Also, the mod now requires LazyLib.

Mmm ive got some gunships that can really use that "attack nearest fight wing" option.
Title: Re: [0.7.2a] Autonomous Ships 0.4.0
Post by: Blaze on March 27, 2016, 02:44:46 PM
Just got an error mid-battle:
Spoiler
java.lang.NullPointerException
   at com.fs.starfarer.combat.tasks.CombatTaskManager.giveAssignment(Unknown Source)
   at org.tc.autonomous.AutonomousCommandsPlugin.advance(AutonomousCommandsPlugin.java:135)
   at com.fs.starfarer.title.C.o0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(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$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Also, sometimes the Target Fighters command gets spammed dozens of times on the message bar; so many that they get stacked on top of each other and reaches the bottom of the screen. It seems to happen if the ship's targeted wing is destroyed; though I'm not exactly sure on the correct triggers, it only seems to happen once per battle.
Title: Re: [0.7.2a] Autonomous Ships 0.4.0
Post by: hqz on March 27, 2016, 05:53:02 PM
Sorry about this. I'll have a look at this tomorrow evening.

I think the issue with the "attack fighters" command might be happening when the command is set on a ship bigger than a frigate (because I used "intercept" while destroyers and cruisers seem like they should use "engage" or something like that).
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: hqz on March 31, 2016, 09:38:45 PM
I've just released a fix for the attack fighter command.

0.4.1 (http://download.trancecode.org.s3.amazonaws.com/starsector/autonomous-ships/autonomous-ships-0.4.1.zip)
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: DinoZavarski on July 21, 2016, 07:39:24 AM
Hi,

Can you please also add to this mod support for combat role override hullmods? Possible variants:

Assault - "melee" ships with powerful short range weapons.
Vulture - Pack-hunt same size targets, harass larger when attacked by own large ship
Sniper - Try to stay away and use long range ballistic/energy weapons even if short range ones are installed.
Artillery - Long range missile bombardment.
Spotter - Keep eye on enemy, do not engage.
Support - For field repair/shield recharge/rearm/buff ships. Keep allies in range but avoid enemy.
Logistic - For poorly armed carriers, civilians, etc. Avoid enemies.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: hqz on July 21, 2016, 03:25:40 PM
Thanks for the feedback.

Sorry but I haven't played Starsector for a while. I don't think I'll come back to it soon. But if I do, I'll have a look at these feature requests.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: majorfreak on March 26, 2017, 11:33:05 PM
Quote
The commands won't work in the simulator nor if the flagship is on autopilot.
Ahh...i wondered why it works only in a few cases.  
I enjoy letting the AI handle battles when i can get a decent matchup in campaign. it helps me get a feel for the loadout/personality choices i've made (i know there's analytics mod out there, thx)

In what situations does this mod consider that the flagship is on autopilot?
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: hqz on March 27, 2017, 01:40:55 PM
To be honest I don't really remember. it's been a while since I touched this code last.

I just had a look and it seems to be based on the isSimulation() check: https://github.com/herve-quiroz/autonomous-ships/blob/master/src/org/tc/autonomous/AutonomousCommandsPlugin.java#L105

FWIW I'm waiting for the 0.8 version to be released before I return to the game and start modding again. I have a lot of ideas in mind in terms of modding, including improvements to this mod (more commands, and possibly some advanced scripting of ships), adding some quest and bounty system based on renown (improvements to another of my already published mods), as well as a single-player, story-driven campaign based on this system (some of the kitbashed ships I've found on this forum gave me a few ideas). I even have a plan for a multiplayer-ish mode and some tournament system, but as I said, I really want to wait for 0.8 to be released so that I don't have to refactor too much of my code once I start working on these.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: Sy on June 06, 2017, 06:44:33 AM
*calls for hqz to return to the game and start modding again* :D
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: SCC on June 06, 2017, 07:13:17 AM
Yeah! Autonomous Ships was one of the best QoL mods I had, I can't wait for it to get updated. I'll be raging a little bit less!
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: Alphascrub on June 13, 2017, 06:33:26 PM
I agree. I miss this mod. The auto retreat function was really great and while the changes to fighters makes have designated fighter hunters a bit pointless I still liked some of the options.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: hqz on June 14, 2017, 03:12:01 AM
Good news, I'm back to playing Starsector. I tried 0.8 this weekend.

Less good news, I'm stuck in the tutorial (the first big battle after you get the derelict ships). I get wrecked by the AI all the time for some reason. I don't know if I forgot how to play, or if there's some new mechanics at play that I've overlooked.

Regardless, 0.8 looks pretty good so I'm going to update the mod to support it. Hopefully before the end the week.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: SCC on June 14, 2017, 03:55:29 AM
Good to hear, maybe with your mod I'll be able to field frigates again!
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: Morbo513 on June 14, 2017, 04:40:57 AM
Good news, I'm back to playing Starsector. I tried 0.8 this weekend.

Less good news, I'm stuck in the tutorial (the first big battle after you get the derelict ships). I get wrecked by the AI all the time for some reason. I don't know if I forgot how to play, or if there's some new mechanics at play that I've overlooked.

Regardless, 0.8 looks pretty good so I'm going to update the mod to support it. Hopefully before the end the week.
Awesome. This mod is a massive QoL improvement - Maintaining the CP to retreat damaged ships is one thing, but noticing they are in the first place is another.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: TaLaR on June 14, 2017, 05:34:02 AM
Less good news, I'm stuck in the tutorial (the first big battle after you get the derelict ships). I get wrecked by the AI all the time for some reason. I don't know if I forgot how to play, or if there's some new mechanics at play that I've overlooked.

This battle can be one of most difficult fights in SS if you get unlucky with weapons looted from derelicts and available in shops (no Blaster = Wolf is near useless, few/none railguns/needlers/maulers), while enemy gets good fleet composition (it is very random, both ships and their weapon selection).
Can be quite easy if neither of these things happen.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: grinningsphinx on June 19, 2017, 02:00:41 AM
Would love this mod for 8.1!!!!
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: CaptainWinky on June 19, 2017, 09:36:37 AM
Less good news, I'm stuck in the tutorial (the first big battle after you get the derelict ships). I get wrecked by the AI all the time for some reason. I don't know if I forgot how to play, or if there's some new mechanics at play that I've overlooked.

This battle can be one of most difficult fights in SS if you get unlucky with weapons looted from derelicts and available in shops (no Blaster = Wolf is near useless, few/none railguns/needlers/maulers), while enemy gets good fleet composition (it is very random, both ships and their weapon selection).
Can be quite easy if neither of these things happen.

For me the main factor in succeeding is being able to separate the two rogue miner fleets.  Individually they're easy, together they're beatable if you use every ship but it's much harder.  Weapon salvaging is helpful but I think the station commander gives you enough weapons to put together a competent fleet.

Looking forward to an update for this mod.  Being able to assign a ship to dedicated fighter-hunting or automatically retreat after missile dumping is quite nice.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: OzarMidrashim on July 17, 2017, 04:29:35 PM
Update needed...so so much. This mod was a must for me.
There was a little bug i remember, whenever we removed other (normal) hullmod this mods hullmod was removed and needed to be apply again.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: hqz on July 18, 2017, 03:07:10 AM
I've looked at this the previous weekend and it seems like the changes are not too complicated.

I need to do some testing but it should be rather straightforward. Stay tuned. :)
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: Sy on July 18, 2017, 04:48:42 PM
good to hear, i really miss being able to make my ships retreat automatically. i spend too much time clicking through every ship in tactical screen to check if they're still okay, without those hullmods. ^^
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: OzarMidrashim on July 19, 2017, 02:23:53 PM
Great!

Its so handy it should be build-in...maybe if needed implemented in some diffirent fassion on command screen, but this mod does it well enough to deserve much more attention and appreciation.

If anything other than more levels of % i would like few more options to choose from...just dont know what is possible?

* Ways to simulate and AI Officer? So even without one we could force ship to be aggresive or cowardly? Officer should/would override those and add his own buff afterall.
* Build on order/prioirty, so ship would by default move and either harras or try to take-over strategic position of certain type? If this option seems to powerfull...they would work only if an Officer would command ship with such hullmod.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: TaLaR on July 20, 2017, 01:41:12 AM
* Ways to simulate and AI Officer? So even without one we could force ship to be aggresive or cowardly? Officer should/would override those and add his own buff afterall.

Actually reverse would be more useful, with hullmod overriding default/officer behavior.
This part of vanilla I don't actually like - being committed to fixed behavior officers for whole play-through. Which makes early Aggressive officer for SO Melee Lasher obsolete by lategame (too suicidal in big fights, but Steady/Cautious can't use SO Melee Lasher at all).
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: OzarMidrashim on July 20, 2017, 03:27:02 AM
* Ways to simulate and AI Officer? So even without one we could force ship to be aggresive or cowardly? Officer should/would override those and add his own buff afterall.

Actually reverse would be more useful, with hullmod overriding default/officer behavior.
This part of vanilla I don't actually like - being committed to fixed behavior officers for whole play-through. Which makes early Aggressive officer for SO Melee Lasher obsolete by lategame (too suicidal in big fights, but Steady/Cautious can't use SO Melee Lasher at all).

True...but this would make all their quirks and RPG-like feel not important. You need to build ship around an Officer, not just override his personal behaviour. Agressive officers in my fleet used heavy armour experimental phase ships from NGO (suspended mod right now) with Chupacabra fusor "armour rebuild" guns (from ICE, not updated yet) with a lot of hullmods to rise armour and hull ...in effect they ware almost unkillable in most scenarios.

Maybe good idea would be a +/- attitude hullmod ...this would allow ONE level change. You could make aggresive into suicidal with + or neutral with - ...this way their personal character would still have an impact on a game forcing you to consider before hire, but allow you little more ajustments - after all its one of most fun parts of the game.
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: NightKev on January 02, 2018, 07:17:53 PM
I've made an update for this mod to 0.8.1a here (https://github.com/NightKev/autonomous-ships/releases), quick testing shows the hullmods working. I've got some plans to add stuff like changing ship aggressiveness, we'll see how that goes (also at that point I'll probably make a new thread).
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: Arkar1234 on January 03, 2018, 06:29:31 AM
I've made an update for this mod to 0.8.1a here (https://github.com/NightKev/autonomous-ships/releases), quick testing shows the hullmods working. I've got some plans to add stuff like changing ship aggressiveness, we'll see how that goes (also at that point I'll probably make a new thread).

Alright, I'll notify ya if I find some bugs or irregularities. :D
Title: Re: [0.7.2a] Autonomous Ships 0.4.1
Post by: NightKev on January 06, 2018, 04:24:34 AM
New thread here: http://fractalsoftworks.com/forum/index.php?topic=13199 (http://fractalsoftworks.com/forum/index.php?topic=13199)