Techguns

Techguns

9M Downloads

Turrets shooting at targets behind obstacles

ConfusedMerlin opened this issue ยท 3 comments

commented

What Version:
Minecraft 1.12.2
Techguns: techguns-1.12.2-2.0.1.2_1
Forge: forge-1.12.2-14.23.5.2831-installer-win
CTM; CTM-MC1.12.2-0.3.3.22
JEI: jei_1.12.2-4.15.0.268
FTBU: FTBUtilities-5.4.0.92

Logs:
Latest.log does not contain any entries of interest (really; only world-edit messages and auto-saves)
Debug.log does only contain messages about leaking worlds (dafuq?)

What happens:
Enemy mob spawns / walks up to a location, that is behind an obstacle. Not just some kind of half height cover (like fences), no, whole mountains.
Example picture added, Pulse-Rife (right) is trying to shoot nether-skelton (black dude behind the hole in the wall left), and hits wall while doing so (middle, little blue sparkles):

2019-04-13_23 36 44

That behavior does keep on going even when there isn't such a hole in the wall (has been dug out to demonstrate the case on one picture).
Everything, from the casing of its "turret" (which is actually a fence from open modular defense) to single block walls to whole mountains will be shot in a vain attempt to hit that one enemy there.
Happens to all guns I apply there. It can get pretty annoying when that happens to two gatling guns, which are emptying all of their magazines for a single zombie behind a door.

Expected behavior:

Turrets wont try to shoot anything they cannot see, or do switch target if current one is not taking any damage from own shots.

Steps to reproduce:

  1. Use any energy source (its a mekanism creative cube in my build, but that does affect the outcome).
  2. apply a turret base on top of it
  3. install any gun and hand over some ammo
  4. place a solid obstacle between that turret and its targets
  5. have an enemy spawn behind it.
commented

This problem is caused when you use another mod that changes mob AI to see through walls. Since turrets are mobs too they will also try to attack targets they can't see. Disable X-Ray features, it does not work well with ranged NPCs.

commented

Ah, well in that case I have to take a look into either "epic siege mod" or... "weeping angels".
I'll report back if that did fix that error; in any case,

Would you mind offering that hint somewhere new users of that mod can see? Or, if it is already... I have to ask where I missed it.

EDiT: Okay, Epic siege mod did have a xray-mobs parameter set to 64. After resetting it to 0 that issue seems to begone.
Actually, its a bit sad that the turrets got influenced by this in that way.

Anyway, thanks for the clarification.

commented

Turrets use part of vanilla mob AI, if a mod changes that AI they get influenced too