[1.1.74] pathfinder issue
Posted: Fri Dec 30, 2022 10:55 am
Hi
If place a path request with a bounding box of something that I know will fail in the scenario that I am testing with like {{-5, -5}, {5, 5}}. When the path fails, the code changes the path request parameters including bounding box to be smaller, such as {{-0.015, -0.015}, {0.015, 0.015}}, and re-requests the path.
Even when it changes the bounding box or path resolution modifier.. it still fails on those re-attempts with known working parameters
If I set the known working parameters from the initial request... it works first time every time and there after.
Klonan mentioned in Discord to try and use this command.. whilst it changed the behavior of the pathfinder slightly it was not continuously successful and it did not change the behavior mentioned above.
video:
https://www.youtube.com/watch?v=4o6Yw9BVchE
It has had a renovation since that video.. but code:
https://github.com/ILLISIS/Constructron ... finder.lua
Whilst there is a chunk of code above there is only two functions(technically three) that I believe you need to concern yourself with;
Let me know if you need any further information
Thanks!
If place a path request with a bounding box of something that I know will fail in the scenario that I am testing with like {{-5, -5}, {5, 5}}. When the path fails, the code changes the path request parameters including bounding box to be smaller, such as {{-0.015, -0.015}, {0.015, 0.015}}, and re-requests the path.
Even when it changes the bounding box or path resolution modifier.. it still fails on those re-attempts with known working parameters
If I set the known working parameters from the initial request... it works first time every time and there after.
Klonan mentioned in Discord to try and use this command.. whilst it changed the behavior of the pathfinder slightly it was not continuously successful and it did not change the behavior mentioned above.
Code: Select all
/c game.map_settings.path_finder.use_path_cache = false
video:
https://www.youtube.com/watch?v=4o6Yw9BVchE
It has had a renovation since that video.. but code:
https://github.com/ILLISIS/Constructron ... finder.lua
Whilst there is a chunk of code above there is only two functions(technically three) that I believe you need to concern yourself with;
Code: Select all
L28: function pathfinder.init_path_request(unit, destination)
L41: function pathfinder.request_path(request_params)
L88: function pathfinder.on_script_path_request_finished(event)
Thanks!