Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with drone distance chechs in >0.18.43 #17

Closed
wants to merge 1 commit into from
Closed

Issues with drone distance chechs in >0.18.43 #17

wants to merge 1 commit into from

Conversation

oiltanker
Copy link

There are issues with drone distance evaluations. Use as reference.

Discussion thread Bots unable to repair

@paul
Copy link

paul commented Aug 6, 2020

This fixed it for me, as well. @oiltanker how did you come up with those values?

@paul
Copy link

paul commented Aug 7, 2020

Actually, there's still a couple things not working. The seem to not be able to reliably place assemblers, and are unable to mine the large rocks (the ones with both stone and coal).

@oiltanker
Copy link
Author

Ah yes, i didn't test all the things, because it was late at night. But the values were taken through testing the distances while debugging.

The thing is that the in_construction_range value was got when radius of the target was to small, and some constant was taken.

I guess i can try and comment out this constant and see the difference for myself.

@oiltanker
Copy link
Author

Alternative idea is to check whether there is a way to tell if drone completed movement order successfully , and won't move any closer without checking the distance.

If it is possible, then we won't need to do random based value guessing.

@oiltanker
Copy link
Author

oiltanker commented Aug 7, 2020

I just looked through change log fir 0.18.43 and there is this thing: Fixed that biters could attack entities beyond their attack range. Seems to be the culprit, as other things seem unrelated.

@oiltanker
Copy link
Author

oiltanker commented Aug 7, 2020

I think I know what the issue is. As mentioned in my previous comment, there was some pathing or range changes.

Through testing i figured out that disabling the oofah minimum radius leads, in now current version of 0.18.44, to about 1/2 offset in all distances to target for drones, and that fixes a lot of things, BUT there is another issue.

This 1/2 offset is relevant not for target, but for closest blocking entity, so as the result, drones can't fix turrets behind walls, as difference in distance nears 1.

Possible solutions:

  • increase construction range, by increasing drone interact distance.
  • Agree that turrets behind two layers of wall are to be inaccessible (looks silly tbh, as they just won't come an inch towards the target), but that would leave distance check running each tick, possibly causing performance drops, so some repair feasibility checks would be appropriate.
  • Don't do anything :P

@longneck
Copy link

longneck commented Aug 7, 2020

#18

@oiltanker
Copy link
Author

oiltanker commented Aug 7, 2020

I think I have a working workaround, so when there is successful completion of drone's path, I write position to drone_data, and then next time the bot is out of range i check whether drone position is different at least by 0.01. Works like a charm, for me.

Btw, are drones supposed to do this:
drone attacking the tree
It seems to be attacking the tree, because it is in it's way, like a biter would do.

@oiltanker
Copy link
Author

I force pushed alternative fix, as it is more universal imho.

@oiltanker oiltanker changed the title Issues with drone distance chechs in 0.18.43 Issues with drone distance chechs in >0.18.43 Aug 7, 2020
@oiltanker oiltanker closed this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants