Jump to content

[MOD] Carrier Command


Laserzwei

Recommended Posts

CarrierCommander

This mod allows you to automate your fighters in mining, salvaging, attacking enemies and repairing your ships.

 

 

How to start

Click on the fightericon top right and this UI opens up:

biVEIX7.png

Click on one of the Buttons to start a command.

Click on Dock All to stop all commands and return all Fighters back into your Carrier.

 

 

 

With extended configuration options:

yGTGUDa.png

And helpful feedback:

mcVHIRG.png

 

 

 

Installation instructions

 

1) Copy the directory `mods` contained in the CarrierCommander .zip file into the game directory `Avorion`

2) additionally place the contents of `data` in /Avorion/data/

 

From Avorion 0.23 on, this mod will be continued in the workshop

Commander (background manager):  (https://steamcommunity.com/sharedfiles/filedetails/?id=1741735681)

Commands package: (https://steamcommunity.com/sharedfiles/filedetails/?id=1741744976)

Since 0.23+ became the main gameversion, there is no download here.

 

Visit the Wiki for more in depth information!

 

 

 

Link to comment
Share on other sites

  • Replies 178
  • Created
  • Last Reply

Top Posters In This Topic

-- 1.10.1 for 0.20.x [2018-12-18]

  - Fighters will now attack stations again. oopsie

  - The threshold config slider got its original look back

 

-- 1.9.2b for 0.19.x [2018-12-18]

  - Fighters will now attack stations again. oopsie

 

 

-- 1.10.0 for 0.20.x [2018-12-04]

  - now uses vanilla "callable"

 

-- 1.9.2 for 0.19.x [2018-11-06]

  - added Slider to control re-targeting threshold distance (You don't know what that could be? Look in the Wiki!)

  - now runs on stations again

  - fixed some typos, added some more descriptions

  - readme shrinked down to the basic install instructions (advanced Install instructions? Right in the Wiki!)

 

-- 1.9.1 experimental for 0.19.x [2018-10-28]

  - Dropped requirement for ShipScriptLoader. Instead using vanilla /entity/init.lua

  - To properly work with alliance ships either overwriting claimalliance.lua or modifying shipdounder line 140 to use addScriptOnce is mandatory. See: readme/install instructions

  - Guardian gets its proper priority assigned now (Thanks to Hammelpilaw)

  - fighters will always prefer higher priority targets

  - with multiple same-priority targets fighters will prefer its current target, but only if it is 15km closer than the next closest target (effectively avoiding them to chase enemies to far off and getting into crossfire)

  - changed default priorities: fighter > ship > guardian > station

 

 

-- 1.9.0 experimental for 0.19.x [2018-10-19]

  - halved calculation times for targeting enemies by changing the order of if-statements

  - discarded the seperate Xsotan-enemy detection code and used Vanilla ShipAi. As a result Xsotan aren't seen as neutral by the ship (and only the ship CC is running on) anymore

  - added Unsupervised targeting-option to enable Vanilla-targeting behavior against enemies (which overrites Attack Civils, Attack Stations, Aggressive Targetting). It's also one magnitude faster than the beforehand mentioned speed increase.

  - added config option to enforce Unsupervised targeting serverwide

 

 

-- 1.8.5 for 0.18.x  and 0.19.x [2018-08-10]

  - fixed "stuck" looking UI with dock All

 

-- 1.7.5 for 0.17.1 (main)[2018-08-10]

  - fixed "stuck" looking UI with dock All

-- 1.8.4 for 0.18.x (beta) [2018-08-09]

-- 1.7.4 for 0.17.1 (main)

  - switched from nearest old target to nearest of squad

  - dock-all now forcefully stops carrier-commands

-- 1.8.3 for 0.18.x (beta) [2018-08-06]

-- 1.7.3 for 0.17.1 (main)

  - added repair command

  - fixed typo in mine command

  - fixed a typo in readme.md

  - added readme.txt without the formatting characters of readme.md

  - removed uneccessary data-saving in salvage command

-- 1.8.2for 0.18.x (beta) [2018-08-04]

-- 1.7.2 for 0.17.1 (main)

  - Removed the Assign All command (did nothing special anymore)

  - xsotan fighters target name fix

  - reduced time for attack fighters to switch targets, after their previous target died

  - Founding a ship as alliance ship, would break the mod. This was due to claimalliance.lua using namespace (no idea why it caused it though). I've included a namespace-less version for now

-- 1.8.1for 0.18.x (beta) [2018-08-02]

-- 1.7.1 for 0.17.1 (main)

  - fixed a crash in aggressiveCommand.lua that could halt action on that ship

  - fixed attack-fighters switching targets

  - renamed aggressive to attack command

  - Auto Assign now properly sets button actions

-- 1.8.0 for 0.18.x (beta) [2018-07-27]

  - update from 1.7.0 to 0.18

-- 1.7.0 for 0.17.1 (main)

  - rewrote code base

  - moved from (buggy) Event-based system to Busy-waiting-based system

  - mining/salvaging/attacking are now their own addons that are hold within its own modfolder (If you still have an CC installation make sure to delete it before updating from 0.10.1)

  - changed license to QPL-1.0

-- 0.10.1 for 0.16 [2018-04-05]

  - fixed server crashes related to Entity():waitUntilAsyncWorkFinished()

  - civil ships will now only be targeted, if configured to do so

  - added new onJump() and onSectorEntered() events

  - removed onSectorChanged() event

  - removed silent uninstall for old (0.14) CC commands (only required, when coming from old saves)

--0.10.0 for 0.16 [2018-02-23]

  - added GreatWhiteKong's/Cwhizard's Nearest-Neighbor-targeting implementation, which can be turned on in the ingame-config menu

  - Salvagers now actively look for new wreckages, hopefully being more reliant in player-less sectors, by Hammelpilaw

  - Xsotan fighters should now be properly targeted

  - The no Hangar message will now appear, as intented

 

--0.9.0 for 0.15

initial release

 

Link to comment
Share on other sites

  • 2 weeks later...

Hej, small request -

older version had an option to make target selection / pathfinding dependent on fighter position, rather than carrier position

 

I realized when i launch my fighters and go about my stuff, like trading or claiming stuff, my fighters cross space at 400m/s to get to a target near my position, rather then something near them.

 

Same when staying put - they zig-zag about clearing a sphere around me, instead of going after that next rock close by crossing a void of 4 km, again and again.

 

Would it at all be possible to fix?

 

Other than that its working perfectly, thank you!

Link to comment
Share on other sites

First of all, I love this mod. It makes salvaging much easier. But there is one little thing, that bugs me. When I'm in the middle of a bunch of wreckages, my fighters go from one wreckage to the next only for one piece or two then go back to the previous one or another one. So a of of forth and back again.

 

It would be nice if the ai looks nearby for more objects to salvage before targeting the next. Otherwise the fighters send too much time flying around.

Link to comment
Share on other sites

  • 2 weeks later...

Minor issue I noticed.  There appears to be some typos in the mining tooltip.

 

Mining command, Line 40:

    checkBox.tooltip = "Determines wether all asteroids in a sector (checkded), \nor only resource asteroids (unchecked) will be mined."

 

It should read:

    checkBox.tooltip = "Determines whether all asteroids in a sector (checked), \nor only resource asteroids (unchecked) will be mined."

Link to comment
Share on other sites

I've noticed an issue where giving crafts an order and leaving the Sector will cause the drones to carry out that order once, i.e. completely mine one asteroid or salvage one ship, then start to buzz around the mothership doing nothing, even if the config option is set to Dock when done. So they're not thinking they're done; something else is happening.

This behaviour also shows up while in-Sector if your captained ship has specific orders. For example, Salvage will get all the salvaging fighters to continually salvage, but any defence fighters will not attack enemies or even start. Mining works the same way. Idle will get all fighters to buzz around doing nothing, and Defend This Position sometimes works, but not always.

 

Opening up the Carrier Commands window solves this issue sometimes. So does unselecting and reselecting a specific task. So does unselecting and reselecting Auto tasking.

 

I'm not entirely sure what the specific conditions for triggering this behaviour are, but I've seen it happen more and more frequently and it's starting to bug me, so I thought I'd make a note of it here.

Link to comment
Share on other sites

I've noticed an issue where giving crafts an order and leaving the Sector will cause the drones to carry out that order once, i.e. completely mine one asteroid or salvage one ship, then start to buzz around the mothership doing nothing, even if the config option is set to Dock when done. So they're not thinking they're done; something else is happening.

This behaviour also shows up while in-Sector if your captained ship has specific orders. For example, Salvage will get all the salvaging fighters to continually salvage, but any defence fighters will not attack enemies or even start. Mining works the same way. Idle will get all fighters to buzz around doing nothing, and Defend This Position sometimes works, but not always.

 

Opening up the Carrier Commands window solves this issue sometimes. So does unselecting and reselecting a specific task. So does unselecting and reselecting Auto tasking.

 

In my experience in singleplayer, multiplayer, and dedicated server, this happens every so often with salvaging regardless of leaving sector. I'm confident it has something to do with targets/target indexing in the mod as it seems to happen more often during fights and when 1 set of fighters salvaging fully destroys a target.

 

Also, multiple ships being given Carrier Command: Salvage in the same sector causes this issue almost every time on one or all craft involved.

Link to comment
Share on other sites

I'm positive it's mod-related. In my experience, vanilla salvaging order will constantly salvage until 0 (valuable) targets remain. I don't know much about modding this game or Lua but I can tell that the mod manages its own targeting index (depending on the command). Based on this previous comment, I'm pretty sure this is the reason Carrier Command manages its own targeting rather than using vanilla salvage targeting:

older version had an option to make target selection / pathfinding dependent on fighter position, rather than carrier position
Link to comment
Share on other sites

working nice except for cargo shuttle

 

being on a station with cargo shuttles docked, entering fighter attack mode leaves cargo docked if a fight starts

however if the station has flying shuttles to deliver or fetch goods, when a fight ends cargo shuttles on fly are expected to re-dock and waited for

 

the mod should ignore cargo shuttles and not count them as fighters to recall

Link to comment
Share on other sites

I'm having a heck of a time getting this installed for some reason.  I've got shipscriptloader, and have followed the directions exactly.

 

I get the error message:  "Failed to locate script: mods/CarrierCommander/scripts/entity/CarrierCommander.lua"

 

Navigating to this directory shows me the file in question.  I've tried both single and multiplayer for the install locations, my other mods currently are only ShipScriptLoader and ScrapyardPlus.  I've run out of ideas on why it can't locate the .lua. Any tips?

Link to comment
Share on other sites

I'm curious if there is a way to get the fighters to salvage all parts of wrecks and not just the parts that drop mine-able resources? I get really annoyed seeing all those bits of ships everywhere and my OCD gets triggered playing clean up crew. Another mod that changed the default "Salvage" command from captained ships (The original script is using "getEntitiesByComponent(ComponentType.MineableMaterial)" to find wreckages. This kind of wreckages are not listed there. I've modified this line into "getEntitiesByType(EntityType.Wreckage)")  Is this somethingCarrierCommander could possibly implement or is that the method it already uses?

Link to comment
Share on other sites

I'm curious if there is a way to get the fighters to salvage all parts of wrecks and not just the parts that drop mine-able resources? I get really annoyed seeing all those bits of ships everywhere and my OCD gets triggered playing clean up crew. Another mod that changed the default "Salvage" command from captained ships (The original script is using "getEntitiesByComponent(ComponentType.MineableMaterial)" to find wreckages. This kind of wreckages are not listed there. I've modified this line into "getEntitiesByType(EntityType.Wreckage)")  Is this somethingCarrierCommander could possibly implement or is that the method it already uses?

 

I'm using (for salvaging):

Sector():getEntitiesByType(EntityType.Wreckage)

and

local resources = wreckage:getMineableResources()
if resources ~= nil and resources > 5 then
    ...

I'm using  resources > 5, specifically to avoid fighters going after small bits on purpose. Because fighters tend to miss those pieces and try and fail to salvage them, while the big chunks slowly despawn.

Link to comment
Share on other sites

I have seen an armada of fighters trying to chase down one tiny block that had gotten so much momentum from being fired at, that they were having a hard time catching up to it. I saw this only once in my 100+ hours of having this installed, so no biggy. And it's easily fixed by giving them a Dock and then Salvage order again, as they will seek different targets for their efforts.

 

But if they were to more actively go after these tiny pieces, I think bad things might happen to the efficiency of your salvaging fighters.

Link to comment
Share on other sites

I'm curious if there is a way to get the fighters to salvage all parts of wrecks and not just the parts that drop mine-able resources? I get really annoyed seeing all those bits of ships everywhere and my OCD gets triggered playing clean up crew. Another mod that changed the default "Salvage" command from captained ships (The original script is using "getEntitiesByComponent(ComponentType.MineableMaterial)" to find wreckages. This kind of wreckages are not listed there. I've modified this line into "getEntitiesByType(EntityType.Wreckage)")  Is this somethingCarrierCommander could possibly implement or is that the method it already uses?

 

I'm using (for salvaging):

Sector():getEntitiesByType(EntityType.Wreckage)

and

local resources = wreckage:getMineableResources()
if resources ~= nil and resources > 5 then
    ...

I'm using  resources > 5, specifically to avoid fighters going after small bits on purpose. Because fighters tend to miss those pieces and try and fail to salvage them, while the big chunks slowly despawn.

 

This is the reason, if I'm recalling correctly, I had two separate mining/salvaging options. One mined/salvaged everything while the other followed basically the rules your using, aka salvage/mine only what is valuable/big enough.

 

(On a side note thanks for continuing this, life and work picked up to the point where I had to vanish.)

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...