[1.1.74] pathfinder issue

This subforum contains all the issues which we already resolved.
ILLISIS
Inserter
Inserter
Posts: 25
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: 5304
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
Inserter
Inserter
Posts: 25
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!
StrangePan
Factorio Staff
Factorio Staff
Posts: 136
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: [1.1.74] pathfinder issue

Post by StrangePan »

Taking a look at this
StrangePan
Factorio Staff
Factorio Staff
Posts: 136
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: [1.1.74] pathfinder issue

Post by StrangePan »

Ok, this should be fixed in 1.1.79. I verified that the fix works using a unit test and the Lua commands you included in this post, but if your use case isn't fixed with that release, please let me know.
Post Reply

Return to “Resolved Problems and Bugs”