AI Defensive Block does not update in EC after initial target lock

UfoL BeerSeeker shared this bug 3 years ago
Solved

After playing with AI blocks it turns out Defensive Block only updates its state only once when locking target.

For example: After locking target at 2500m, it will still show 2500m to other blocks, even when distance is changing. One have to restart the block, or make it switch targets for the block to update its state.

This is especially visible when trying to pair this block with event controller, as the latter can't trigger any actions if Defensive Block always appear the same to it. Feedback from EC does say the same distance all the time, but for comparison, if one locks target with Cockpit RMB actiom, target distance to target would update as expected and actions depending on distance would trigger properly.

508516d5a0967d3706704108dca1e46e

(Comparison of AI block and Cockpit Distance output to same target)


To reproduce:

- Create any mobile grid with AI Defence Block, Event Controller and Light Block

- Set Defence block to On, Defend against Enemies, Subsystem Defualt, Lock Target On, Flee Never

- Set Event Controller to On, Event Distance to Locked Target, Equal or Less Than, Distance = 200m, Selected Blocks - AI Defensive Block

- Set EC action 1 to switch Light block on, 2 to off

- Spawn any grid belonging to enemy faction

- Check Feedback provided by EC in control panel, note distance to targeted grid

- Move to different position outside set 200m threshold

- Distance to target shown in EC would remain the same

- Move towards target within, closer than 200m treshold

- Check EC feedback - would still say same thing

- Switch AI Block Off and On - this should force re-lock target and update the block

- EC should see new state and trigger action 1

- Move outside treshold again - nothing happens again

To make the AI Block usable, and properly react to changing distance one have to place Timer Block which keep Triggering itself and toggle AI Block On/Off all the time, which forces AI Block to restart and refresh its state frequently. Such a workaround would likely have performance impact and shouldn't be necessary in the first place.


Here is workshop link to sg ship i used for testing: https://steamcommunity.com/sharedfiles/filedetails/?id=2967041722

When within 200m from enemy grid, green light should go on, off when beyond 200m. See the difference with Timer Block AI Restart Off and On.

Replies (8)

photo
1

Paying close attention to the EC while using the workaround you described and drifting away from a target, it looks like the defensive AI is updating correctly for about a second before it freezes.

photo
1

Hello. engineer!

Thank you for letting us know.

The issue has been reported to our internal system.

Kind Regards,

Keen Software House: QA Department

photo
3

The same issue is present with the offensive block. I noticed it while trying to make a 2 stage missile

photo
1

This issue is still present. In addition, even when the distance updates, the actions in event controller aren't being triggered.

photo
2

Coming up on two years on this ticket, EC-related tickets keep piling up. Feels bad.

photo
1

This isn't even an EC related issue as far as I can tell. I also thought it was the case as well until I realized this is an issue with both Offensive and Defensive AI Blocks not properly updating when they lose target. You can get this exact behavior by removing the EC and simply using the action slots on the Defensive AI Block and you will notice the actions on the false slot almost never trigger properly because once the block detects an enemy it remains stuck on true status.

photo
1

Interesting! I think there's another ticket somewhere around here relating to that description of the issue, I have a vague memory of it.

photo
photo
1

Still an issue. For missiles tehre are many things I'd like to do when getting in proximity to enemy. But EC seems to not get any updates for the distance to locket target.

photo
1

Hello Engineer,

We’ve tested the issue you described and can confirm that it now works correctly.

As of version 1.207, the Event Controller correctly displays the current distance in its detailed info, and it can switch between Action 1 and Action 2 while the grid is controlled by an AI block.

Based on this verification, we’ll proceed to close the ticket as Solved.


Kind Regards,

Ludmila Danilchenko

Head of Space Engineers QA Department

photo
1

This is still not working right. I have seen this with defensive and offensive and event controllers.

I posted about it here https://support.keenswh.com/spaceengineers/pc/topic/54337

The UI may show info on what's locked at what distance etc but it doesn't trigger actions, especially on grids that already exist. If you're printing missiles after the enemy is in range they just won't take action. The UI will show it's locked, the range, what action slot is supposed to be triggered, but it does nothing. And the event controller relying on it also doesn't work.

These AI blocks need so much work and way more quality assurance passes it's kinda shameful.

This week I tried a simple drone on a server with no mods. Just wanted to have spotlights on it and have it follow me with a button and go back to a connector with another button. The thing just gets confused and flies in circles and crashes. Super laggy and unresponsive and random behaviors. Also the button doesn't make it follow me. It only shows it's following me with my name in UI if I go through control panel and hit the button there. Using a physical button or connect to the terminal remotely it doesn't work and just sits there.. Please fix the AI stuff. Make it what it could be. Right now it's an infuriating waste of time.

Leave a Comment
 
Attach a file