Logistic Gun Turret

by Robokat

This mod adds a Logistic Interface that attaches to gun turrets, to keep them stocked with ammo. New: - Support for modded turrets and artillery turrets. - Startup setting that allows to automatically broadcast interface request slots changes to other interfaces inside the same logistic network. - New item: Turret Buffer to work as proxy for Turret Interfaces. Can broadcast his setup through logistic network and auto-configure when laid out. - Multiplayer compatible.

Content
3 years ago
0.17 - 1.1
13.4K
Combat

a Rework

4 years ago

I have reworked the mod a fair bit on my machine, changing the mod to use a 'logistic-interface' that is now a separate item to the turret. This can be added to any existing turret, and with the research unlocked (with the relevant setting on) all new and existing turrets will automatically get such an interface blueprinted for them.

This new interface will (hopefully) work on any ammo turret or artillery cannon added by any mods, regardless of ammo type, and still allows for ammo prioritization. The new interface also allows for blueprinting of turrets with their interfaces and their current settings creating more flexibility than the current auto request setting.

This rework seems to be in working condition to me, but I still need to do migrations (which might be somewhat breaking) before I release it, and since it is ~1am here, I will do that tomorrow, so cya then.

4 years ago

Ok. Seems interesting, I am curious to see how it works.
I just publish support for Bob's Warfare Mod in 0.3.0. Was hard work and change many things in mod but finally I think it's ok.

4 years ago

Oh wow that’s great.
Just stumbled on this by accident. I love it :). It has been a long time since i thought about this mod.

4 years ago

@Robokat:
I made some combat testing with vanilla turrets and it seems that reload priority management is not working as expected for now. Turret keeps picking the same ammo despite better is available. Don't have found why.

Anyway I think that this system is not very easy as user has to change lua file if he want to customize priorities. Principle I had setup in 0.3.0 was based on request slot position in chest, right slot beeing highest priority. That way user can configure turrets as he like and therefore copy/paste or blueprint it where he want.
Up to you.

4 years ago
(updated 4 years ago)

Hey guys,

I noticed something, I don't know if it is reproducible without my mods. When you blueprint one turret with its interface and place it down, the logistic chest appears in front, instead of being partially hidden by the turret's gun.
Also, with mods, the chest always appears and might be unatractive, though completely playable.
Picture : https://imgur.com/a/PanhVQk

Would it be possible to make the chest "invisible" to the eye but still selectable?

Edit: I also noticed that turrets won't use the "best" ammo, instead use the normal ammo.

Thanks!

4 years ago
(updated 4 years ago)

@CaptainWHot Yeah, that is probably a better way to do it in the 0.3.0 version. When I was making my rework, I was building it off of the 0.2.4 version or something and although I did look at the 0.3.0 version for changes, I guess I missed that change. I think it the 0.3.0 version priority system is preferable to what I did and the 0.2.X version.

4 years ago

@Robokat: ok, will try to include it inside your new interface system asap.

4 years ago

Oh, I've already started work on that, although I got a bit side tracked working on optimization.

4 years ago

ok

4 years ago
(updated 4 years ago)

In InitTurret:
or #turret.surface.find_entities_filtered{ name = { "turret-interface", "entity-ghost" }, area = area } ~= 0

filter should include "entity-ghost" to avoid creating new interfaces each time game started.

4 years ago

Oh yeah, I fixed that in the version I just uploaded, although I didn't realize that syntax was possible, I'm still new to factorio modding and lua. Sorry for the delay on the new version, I got distracted by family for a while.

4 years ago

I just realized that the UPS is garbage for some reason (On my test world with ~6000 interfaces). It wasn't this bad before when I was testing it, I'm gonna investigate it more.

4 years ago

Right, it's because I reverted those optimizations I was working on, which seem to improve UPS ~5x, but I'm still checking that for bugs. I might push that out later tonight.

4 years ago
(updated 4 years ago)

Hi,
Interface is a great idea!
I made some changes and fixes after playing the mod extensively yesterday evening.
0.5.1 available.

4 years ago

Had some bugs :p
Anyway, I think it could be better to recreate a "fresh" interface/turret table at each map startup in place to store it in "global".
Therefore autosave could be quicker on big map despite some seconds taken one time at map load. In addition performance should be improved by using local table in place of global one.
Cheers.

This thread has been locked.