Page 1 of 1

[MOD 0.16.x] Auto Deploy Destroyers 0.1.6

Posted: Wed Apr 27, 2016 1:24 pm
by slindenau
Note: any changes after 0.1.6 are only processed on mods.factorio.com or ingame. This opening post is obsolete now.

Type: Mod
Name: Auto Deploy Destroyers
Description: Automatically deploys destroyer drones based on enemies around the player
License: GPLv3
Version: 0.1.6
Release: 2017-12-13
Tested-With-Factorio-Version: 0.16.0
Category: Helper, Convenience
Tags: Warfare
Download-Url: https://github.com/s-lindenau/AutoDeplo ... _0.1.6.zip
Website: https://github.com/s-lindenau/AutoDeployDestroyers or on the mod portal.

Long description
This mod is for people who love fighting biters with destroyer drones, but hate having to manually throw destroyer capsules.
This mod will automatically deploy the right amount of destroyer capsules based on how many enemies are in visibility range.
Now you can completely focus on the battle!

Triggers
This mod will activate when:
  • You have the "Destroyer Launcher" equipment in your power armor
  • You have enough destroyer capsules in your inventory (20+)
  • There are biters within visiblity range (30 tiles)
  • Your current follower count is running below the target
Features
Features include:
  • New technology & power armor equipment
  • Automatic and instantaneous deployment of destroyer drones
  • Target amount of destroyers based on simple biter weight function
  • Will keep your follower count at the desired target, with minimal wastage of capsules
  • Will consume capsules from the following inventories: vehicle trunk, main inventory and quickbar (in that order, if available)
  • Will warn you if it used your last capsules (up to a lower limit). This gives you time to retreat and restock.
  • Custom deploy patterns, just for fun.
Pictures
Version history
Technical Details
Known issues & Additions
  • Will aggro neutral biters on 'enemies never attack first' (but can be avoided by removing equipment from power armor)
  • Balancing question: cost and function of technology & power armor equipment?
  • Graphics: a bit ugly, if you are a better artist you can suggest images!
Please let me know what you think of this mod, suggestions and other constructive feedback welcome!

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Sat Sep 10, 2016 1:23 am
by jonatkins
Been using this mod recently - I like it.

Any chance of an update for 0.14? I upgraded for core game bugfixes and really miss it now. Core game changes (allowing grids on vehicles?) unfortunately need more than a simple version number change.

I do find it deploys far more destroyers than I'd like when attacking smaller bases. I'm playing the late-late game, evolution > 0.99, behemoths everywhere.

As for feedback on gameplay balance - maybe it shouldn't be able to deploy all the destroyers in one go? Perhaps one or two capsules at a time, with a second or two delay between them. The number deployed at a time could be increased by using multiple modules in the power armor.

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Sat Sep 10, 2016 3:18 am
by aubergine18
Does not work as expected in multiplayer; counts current followers for all players in same force (see: viewtopic.php?f=25&t=24675)
@slindenau: I posted in that topic a potential way to fix this issue.

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Sat Sep 10, 2016 3:43 am
by Taehl
I was planning on making something like this (including needing a modular armor gadget), but it looks like you beat me to it. ;)

How about making it throw surplus lower-grade combat capsules if you're out of Destroyers?

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Wed Sep 14, 2016 7:40 pm
by slindenau
Wow, i did not expect anybody to actually use the mod :D. Thanks for the feedback!
I will look into releasing an updated version (at least a basic version for 0.14, after that with functional changes), but it might be a few weeks since i'm quite busy.
jonatkins wrote:Been using this mod recently - I like it.

Any chance of an update for 0.14? I upgraded for core game bugfixes and really miss it now. Core game changes (allowing grids on vehicles?) unfortunately need more than a simple version number change.

I do find it deploys far more destroyers than I'd like when attacking smaller bases. I'm playing the late-late game, evolution > 0.99, behemoths everywhere.

As for feedback on gameplay balance - maybe it shouldn't be able to deploy all the destroyers in one go? Perhaps one or two capsules at a time, with a second or two delay between them. The number deployed at a time could be increased by using multiple modules in the power armor.
- For 0.14, do you mean the item should be usable in vehicle grids just like it now works from the power armor? I think i can do that yes.

- Did you try to tweak the deployment numbers? I kinda ballparked them in the current config, so they definately could use some tweaking.

- I thought about deploying them slower, but that would involve quite a large change in the setup of the mod. I personally like the fast deployment, since all the slow deploy does gameplay wise is keep you standing just outside range and build up a bot force. I wanted to skip that slow part.

aubergine18 wrote:
Does not work as expected in multiplayer; counts current followers for all players in same force (see: viewtopic.php?f=25&t=24675)
@slindenau: I posted in that topic a potential way to fix this issue.
I will have a look at it, thanks :)
Taehl wrote:I was planning on making something like this (including needing a modular armor gadget), but it looks like you beat me to it. ;)

How about making it throw surplus lower-grade combat capsules if you're out of Destroyers?
I will look into how much trouble it would be to add this. I kinda set it up in a way that makes it easy to deploy different entities, so i'll see.

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Wed Sep 14, 2016 9:00 pm
by jonatkins
slindenau wrote:- For 0.14, do you mean the item should be usable in vehicle grids just like it now works from the power armor? I think i can do that yes.
I'm not sure about vehicle grids. Would destroyers launched from them stick with the vehicle or the player? Could be interesting if a train could defend itself with an appropriately configured cargo wagon...

Anyway, get a player-only fix first before worrying about vehicles...
slindenau wrote:- Did you try to tweak the deployment numbers? I kinda ballparked them in the current config, so they definately could use some tweaking.
I didn't look at the code until after it broke, so no :)

As for launch rate limiting - I feel that one module in the armour should be a similar rate to the player can launch.

- the player can manually launch as well, to increase the rate
- multiple instances could be installed to increase the rate

Given the current code checks once every 90 ticks, deploying 6 capsules max at a time would be close to the player rate, I think.

Perhaps add a config option for max capsules per pass, but set it high by default - gives us the option to experiment?

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Sat Sep 17, 2016 3:15 pm
by jonatkins
FYI, as part of this bug report there was a version of this mod patched for 0.14

viewtopic.php?f=7&t=32740

Not looked at the changes made, but a quick test and it seems to work fine.

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Sat Sep 17, 2016 3:32 pm
by slindenau
I've kept up with the API changes of each 0.14.x release notes, and as far as i know only 1 change affected my mod. That is the removal of LuaItemStack::has_grid. Now instead LuaItemStack::grid returns nil if there is no grid on the item.

I'll release a basic official fix tonight or tomorrow.

Edit: release is up, should be working ok now.

About the deployment rate: i could add a limit, but it would kinda mess up the deployment pattern. Not that it would make sense anyway, since you and the bots are probably moving between deployment ticks.
About the grids in vehicles: i don't think that makes sense, since this mod is player oriented. For automatic defense on trains there are other mods if i'm not mistaken.

Re: [MOD 0.13.x] Auto Deploy Destroyers 0.1.3

Posted: Fri Sep 23, 2016 6:00 pm
by slindenau
jonatkins wrote:As for launch rate limiting - I feel that one module in the armour should be a similar rate to the player can launch.

- the player can manually launch as well, to increase the rate
- multiple instances could be installed to increase the rate

Given the current code checks once every 90 ticks, deploying 6 capsules max at a time would be close to the player rate, I think.

Perhaps add a config option for max capsules per pass, but set it high by default - gives us the option to experiment?
Added this for the upcoming release (i plan to release this when 0.15 becomes experimental).

You can use this feature by downloading the sources directly from github.
See the following config option: https://github.com/s-lindenau/AutoDeplo ... ig.lua#L22

Re: [MOD 0.15.x] Auto Deploy Destroyers 0.1.5

Posted: Thu Aug 03, 2017 2:24 pm
by slindenau
As of version 0.15.32, i can finally access the current follower count for a player (http://lua-api.factorio.com/latest/LuaC ... ing_robots).
This should make it so the mod will work in multiplayer, hooray :).

I've updated the sourcecode on github (mod version 0.1.6), so if you're dying to try this in MP you can download the latest version there.
I'm planning to make 0.1.6 an official release once 0.16 becomes experimental.

I also still want to include "mod settings" for all the configuration stuff in deployconfig.lua.

Re: [MOD 0.16.x] Auto Deploy Destroyers 0.1.6

Posted: Mon Mar 11, 2019 9:19 am
by slindenau
I finally got around to adding the mod settings and changelog directly in the mod. This means all relevant information for the mod will be visible on mods.factorio.com and ingame; making this thread obsolete. So i won't be updating the starting post anymore :).

These changes will be applied to the mod in the next version, probably when Factorio updates to 0.18/1.0.