[1.1.74] pathfinder issue

Post your bugs and problems so we can fix them.
Post Reply
ILLISIS
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Feb 09, 2022 10:49 am
Contact:

[1.1.74] pathfinder issue

Post by ILLISIS »

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.

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)
Let me know if you need any further information
Thanks!

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5097
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.74] pathfinder issue

Post by Klonan »

The information here is too general and mixed in with your own script orginisation

Can you dissect out a few lines of console command or script that will accurately and reliably reproduce the issue?
A small save have (50x50) and the command to show the problem will very much help us check and fix the problem

ILLISIS
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Feb 09, 2022 10:49 am
Contact:

Re: [1.1.74] pathfinder issue

Post by ILLISIS »

As discussed in discord.. In a minimal environment with the ability to test in real time it is obvious that the negative path cache was the issue.

/c game.map_settings.path_finder.use_path_cache = false


Thank you for your assistance!

Post Reply

Return to “Bug Reports”