Padwan Posted March 25, 2018 Share Posted March 25, 2018 This is a plugin for the Carrier Command Mod (see https://www.avorion.net/forum/index.php/topic,4268.0.html). This will add a new command to make your fighters collect loot for you: Installation 1. copy the contents of this zip into your Game Directory "Avorion" 2. edit the file mods/CarrierCommander/config/CarrierCommanderConfig.lua and add the folling line to the Config.carrierScripts table definition: loot = {name="lootCommand", path = "mods/CarrierCommander/scripts/entity/ai/"} 3. edit the file mods/CarrierCommander/scripts/lib/lists.lua and add the lines list.actionTostringMap[7] = "Collecting loot." list.actionToColorMap[7] = ColorRGB(0.1, 0.8, 0.1) Usage Ingame in the Settings tab of the Carrier Commander Interface make sure to choose a squad for looting in the "Looting config" section. Also use the checkboxes to configure what loot your fighters should go after. Then in the ship commands tab activate the looting command. Note that the other Carrier Commands might interfere with the looting script if your looting squad has weapons (gravitation turrets count as weapons to), mining lasers or salvaging lasers equipped, you can make dedicated looting fighters using repair turrets to prevent that. This plugin was developed using Carrier Command version 0.9 and the current default branch of the game (version 0.15.8 ), i haven't tested it with the current beta branch yet. Happy looting! :) lootCommand_0.9.zip Link to comment Share on other sites More sharing options...
Burnthalo Posted March 26, 2018 Share Posted March 26, 2018 Thank you very much. this is working great and catches a lot of loot that was being lost to the despawn timer before. now if only we could get access to looting cargo rather than loosing that to despawn lol. I almost used cargo shuttles to do this but since they are common crap I couldn't get the stats I wanted so made the repair fighters like you mentioned. btw I am using latest stable combined with command carrier 0.10 and this is fine. so its forward compatible for those using cc10! Link to comment Share on other sites More sharing options...
Sarok Posted March 29, 2018 Share Posted March 29, 2018 thx for the mod!! Link to comment Share on other sites More sharing options...
Xplod0409 Posted March 29, 2018 Share Posted March 29, 2018 Thx for the mod!! Maybe you can make an anti-torpedo hunter script? So the hunters only hunt incoming torpedoes. That would be great! Link to comment Share on other sites More sharing options...
Padwan Posted March 30, 2018 Author Share Posted March 30, 2018 Thx for the mod!! Maybe you can make an anti-torpedo hunter script? So the hunters only hunt incoming torpedoes. That would be great! I'm not sure that would work, torpedos are pretty fast. Also you can usually shoot them down pretty well with some automated turrets set to defensive mode. Link to comment Share on other sites More sharing options...
DRMSKR Posted April 4, 2018 Share Posted April 4, 2018 Ok, I think this mod keeps crashing the server. It seems to only crash when using the loot option along with multiple options. Link to comment Share on other sites More sharing options...
Padwan Posted April 5, 2018 Author Share Posted April 5, 2018 Ok, I think this mod keeps crashing the server. It seems to only crash when using the loot option along with multiple options. Thats not much info to work on.. any crash logs? Steps to reproduce? Link to comment Share on other sites More sharing options...
DRMSKR Posted April 5, 2018 Share Posted April 5, 2018 Ok, it is starting to sound like a bug with the Carrier script for Salvaging, and not the loot plug-in. Link to comment Share on other sites More sharing options...
Gantradies Posted May 15, 2018 Share Posted May 15, 2018 is there any word on the stability issues? im running a small kludged together modpack on my (underpopulated XD) server, and after we were forced to restart due to issues with the unofficial version of minecorp, ive gotten leary about throwing things in without checking >~< Link to comment Share on other sites More sharing options...
seumas Posted May 15, 2018 Share Posted May 15, 2018 New to the forum and would love to check out the mod. Where is the Zip folder to download. Can't seem to find the link. Thanks! <edit> Yep.. figured it out. I forgot to log in and didn't see the last line where the .ZIP link was. ;-) Link to comment Share on other sites More sharing options...
seumas Posted May 15, 2018 Share Posted May 15, 2018 This might be a bug. I have 6 squads but it will only allow me to go down as far as squad 4 to select. I won't allow me select squad 6. Could be a resolution thing or the fact that I'm playing on the beta version (single player). I'm playing at 2560x1440 res. See attachment for screen shot. Link to comment Share on other sites More sharing options...
Burnthalo Posted May 16, 2018 Share Posted May 16, 2018 This might be a bug. I have 6 squads but it will only allow me to go down as far as squad 4 to select. I won't allow me select squad 6. Could be a resolution thing or the fact that I'm playing on the beta version (single player). I'm playing at 2560x1440 res. See attachment for screen shot. you need to scroll the text in the window up farther before opening the drop down. then you can select those farther down without issue. Link to comment Share on other sites More sharing options...
Hebiko Posted May 24, 2018 Share Posted May 24, 2018 Noticed that when this command is active (and checked the lua code to confirm my suspicions) it generates invisible blocks of wreckage to tell the fighters what position to go. The problem is that my ship's salvage turrets pick these up and immediately destroy them, causing the fighters to do loops. While it works fine if I leave my ship out of range, it's irritating none the less. Link to comment Share on other sites More sharing options...
Elmruik Posted June 1, 2018 Share Posted June 1, 2018 hey any chance of adding to it for them to pick up cargo too? Link to comment Share on other sites More sharing options...
Anexgohan Posted August 3, 2018 Share Posted August 3, 2018 Any update to this, doesn't seem to be working on v0.18.2. Link to comment Share on other sites More sharing options...
Tigron Posted October 2, 2018 Share Posted October 2, 2018 can we get a fix for the newest update to the carrier commands. I added the lines but in the settings of the command box all I have is attack settings, it no longer scroll down to the other commands. Link to comment Share on other sites More sharing options...
Naevaris Posted October 10, 2018 Share Posted October 10, 2018 After some editing I managed to make the interface work by making the configuration UI a separate file and storing it in the CCBasicCommands folder, to bring it in line with the rest of the commands. specifically, the config part of lootCommand.lua needs to be stored in a lootCommand_config.lua (use one of the other commands for reference.) placing the two files in the CCBasicCommands folder allows them to be loaded with the other commands as per CarrierCommander.lua: " local c = require(cc.commands[prefix].path.."_config") " Edit: After some testing it appears as though clicking the button does not activate the loot script properly. Since I'm not great at programming it seems I will have to wait for an official update to this mod. Link to comment Share on other sites More sharing options...
Engine Posted October 21, 2018 Share Posted October 21, 2018 Updated this plugin for CC v1.9.0 ex. Disclaimer: I'm not a programmer, so the code is rather crappy. I had to rewrite most of the plugin. I added a new feature to it that tracks the number of loot items remaining. Install the two files under "Avorion\mods\CCBasicCommands\scripts\entity\ai" Add the the following lines to lists.lua and CarrierCommanderConfig.lua Lists.lua list.actionTostringMap[7] = "Collecting Loot, %i items remaining" list.actionToColorMap[7] = ColorRGB(0.1, 0.8, 0.1) list.actionTostringMap = {} setmetatable(list.actionTostringMap,{ __index = function(t,k) return "Invalid order received" end --fallbackfunction, getting called when indexed with an invalid key }) list.actionTostringMap["noHangar"] = "No Hangar found!" list.actionTostringMap["noFighterController"] = "No FighterController found!" list.actionTostringMap["targetButNoFighter"] = "Found a target, but no suitable fighters." list.actionTostringMap["idle"] = "Idle and waiting for targets." list.actionTostringMap[-1] = "Not doing anything." list.actionTostringMap[FighterOrders.Attack] = "Attacking ship %s" list.actionTostringMap[FighterOrders.Defend] = "Defending ship %s" list.actionTostringMap[FighterOrders.Return] = "Waiting for %i Fighter(s) in %i Squad(s) to dock at %s" list.actionTostringMap[FighterOrders.FlyToLocation] = "flying to location." --list.actionTostringMap[4] = nil reserved for new vanilla command list.actionTostringMap[5] = "Mining asteroids." list.actionTostringMap[6] = "Salvaging wrecks." list.actionTostringMap[7] = "Collecting Loot, %i items remaining" list.actionToColorMap = {} setmetatable(list.actionToColorMap,{ __index = function(t,k) return ColorRGB(0.9, 0.1, 0.1) end --fallbackfunction, getting called when indexed with an invalid key }) list.actionToColorMap["noHangar"] = ColorRGB(0.9, 0.1, 0.1) list.actionToColorMap["noFighterController"] = ColorRGB(0.9, 0.1, 0.1) list.actionToColorMap["targetButNoFighter"] = ColorRGB(0.9, 0.1, 0.1) list.actionToColorMap["idle"] = ColorRGB(0.3, 0.3, 0.9) list.actionToColorMap[-1] = ColorRGB(0.3, 0.3, 0.3) list.actionToColorMap[FighterOrders.Attack] = ColorRGB(0.1, 0.8, 0.1) list.actionToColorMap[FighterOrders.Defend] = ColorRGB(0.3, 0.3, 0.3) list.actionToColorMap[FighterOrders.Return] = ColorRGB(0.5, 0.5, 0.0) list.actionToColorMap[FighterOrders.FlyToLocation] = ColorRGB(0.0, 0.5, 0.5) --list.actionToColorMap[4] = nil reserved for new vanilla command list.actionToColorMap[5] = ColorRGB(0.1, 0.8, 0.1) list.actionToColorMap[6] = ColorRGB(0.1, 0.8, 0.1) list.actionToColorMap[7] = ColorRGB(0.1, 0.8, 0.1) list.tooltipadditions = {} return list CarrierCommanderConfig.lua loot = {name="Loot Command", path = "mods/CCBasicCommands/scripts/entity/ai/lootCommand"}, local Config = {} Config.Author = "Nexus, Dirtyredz, Hammelpilaw, Maxx4u, Laserzwei" Config.ModName = "CarrierCommander" Config.version = { major=1, minor=9, patch = 0, string = function() return Config.version.major .. '.' .. Config.version.minor .. '.' .. Config.version.patch end } --new commands go here, <namespcae used by the script> = {name = <button text>, <path> = relative path from the /mods/-folder to the command, without .lua ending } Config.carrierScripts = { dockAll = {name="Dock all Fighters", path = "mods/CarrierCommander/scripts/entity/ai/dockAllFighters"}, salvage = {name="Salvage Command", path = "mods/CCBasicCommands/scripts/entity/ai/salvageCommand"}, mine = {name="Mine Command", path = "mods/CCBasicCommands/scripts/entity/ai/mineCommand"}, attack = {name="Attack Command", path = "mods/CCBasicCommands/scripts/entity/ai/aggressiveCommand"}, loot = {name="Loot Command", path = "mods/CCBasicCommands/scripts/entity/ai/lootCommand"}, repair = {name="Repair Command", path = "mods/CCBasicCommands/scripts/entity/ai/repairCommand"}, --lootCommand = {name="Loot Command", path = "mods/CCLootPlugin/scripts/entity/ai/lootCommand"} } Config.forceUnsupervisedTargeting = false -- forces the "Unsupervised targeting"- setting for attacking fighters. Default: false Config.basePriorities = { ship = 20, guardian = 15, station = 10, fighter = 5, } Config.additionalPriorities = { --Only for modded additions. Modders: When creating a new Boss then use Entity():setValue("customBoss", someValidValue), to mark it. The Attack script will then activley search for those marked enemies and assign the priority set in the config --customBoss = 25 } return Config Loot_Command.zip Link to comment Share on other sites More sharing options...
Bocephus666 Posted February 24, 2019 Share Posted February 24, 2019 I just stumbled across this plugin. Does this still work with the current release? Link to comment Share on other sites More sharing options...
maraudir Posted July 18, 2019 Share Posted July 18, 2019 Bump on Bocephus666 question. Link to comment Share on other sites More sharing options...
Laserzwei Posted July 18, 2019 Share Posted July 18, 2019 I just stumbled across this plugin. Does this still work with the current release? Bump on Bocephus666 question. No Link to comment Share on other sites More sharing options...
DiabloPower Posted December 10, 2019 Share Posted December 10, 2019 Now it does... ;D https://steamcommunity.com/sharedfiles/filedetails/?id=1924641337 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now