CombatRobot::faces_nearest_enemy or similar

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

CombatRobot::faces_nearest_enemy or similar

Post by Deadlock989 »

I feel like this one is a long shot - I don't know if bots even know what they're tracking or whether that target is only ever picked at the moment of firing - but I'll explain.

Currently combat robots behave like all flying robots do - their facing orientation is linked to their movement. This is fine for logistics/construction bots because they are pretty single-minded. Combat robots shoot at stuff though (hence the name). Because the player typically tries to avoid being in melee with biters, about half of the combat robot's nasty short life is spent flying away from biters, orbiting the player - during which time any projectiles or beams that they fire are essentially going "backwards".

You can see this oddity in effect most clearly with the vanilla defender robot model - it has a tiny gun poking out, forward facing. But in reality that gun is hardly ever pointing at any enemy. It doesn't really matter for the vanilla use case because (a) the bots are tiny and whizz about so you only really notice this kind of thing when the game is both paused and zoomed in and (b) vanilla defender bots fire the "instant hit" kind of bullet fire so you never actually see any kind of projectile being emitted. Distractors and destroyers, meanwhile, have their beam emitter completely hidden from view, presumably for this very reason.

However, if you have a modded bot that fires physical projectiles, or is larger and has a more obvious gun (see example), it's not possible to get the animations up to my specific level of OCD.

So if bots do keep track of a current target, it would ace if we could specify that the bot always faces it when moving.
scatterbot.png
scatterbot.png (257.04 KiB) Viewed 759 times
Image

raspberrypuppies
Inserter
Inserter
Posts: 44
Joined: Tue Mar 26, 2019 4:43 am
Contact:

Re: CombatRobot::faces_nearest_enemy or similar

Post by raspberrypuppies »

+1 Even the vanilla defender bot looks weird if you look at it too closely

Post Reply

Return to “Modding interface requests”