Skip to content

Improve subterranean harvester pathfinding #1535

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Starkku
Copy link
Contributor

@Starkku Starkku commented Feb 14, 2025

This PR should allow MovementZone=Subterannean harvesters to access docks that are in areas closed off from normal pathfinding such as cliffs and islands. Whether or not it fixes all issues with such harvesters is another thing.

@Starkku Starkku force-pushed the feature/subterranean-harv branch from c41d279 to c17ceb4 Compare February 14, 2025 19:43
Copy link

github-actions bot commented Feb 14, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Metadorius Metadorius assigned Metadorius and unassigned Metadorius Feb 14, 2025
@Metadorius Metadorius requested a review from a team February 14, 2025 21:16
@Metadorius Metadorius added the ⚙️T1 T1 maintainer review is sufficient label Feb 14, 2025
Copy link
Contributor

@CrimRecya CrimRecya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good. And I need to test whether it will be affected by the refinery on water surface.

@Metadorius Metadorius added ❓Phobos bug Something isn't working properly ❓Vanilla bug Vanilla game bugs that are requested to be fixed and removed ❓Phobos bug Something isn't working properly labels Feb 21, 2025
@Coronia
Copy link
Contributor

Coronia commented Feb 24, 2025

used Project Phantom as a test, but there're still some subterrenean miners getting stuck for unknown reason, mostly happened when they're trying to get to an ore field which is being harvested when they're on their ways

1 - stuck at ore field
_QS) U~)Q%M2B(1@O@Z(9_tmb

2 - stuck at slope
HJ5HNFJP@H7 YSSFZMJW{QB_tmb
DVLLX %AYCK31GSUH`YC8Q_tmb

@mevitar
Copy link

mevitar commented Mar 1, 2025

Did some games against the AI with this, and at some random point the game dropped to like 1 fps. This happened several times, but lasted only few seconds (except for one game, which didn't seem to fix itself so i had to quit). I also haven't encountered this in any build other than this one.

All these games where it happened were me and AI playing as sides with subterranean harvesters. I'll try investigating further if they are indeed the cause.

@mevitar
Copy link

mevitar commented Mar 2, 2025

No fps drops this time, but game crashed with this build, can't tell the reason from except.txt
https://drive.google.com/file/d/1xd3PoLCVYi60-u0V2jbiQue97VGWkg5t

EDIT: can be ignored, it happens because of airstrike flare, and AirstrikeTarget not being cleared up properly

@mevitar
Copy link

mevitar commented Mar 7, 2025

Haven't had fps drops anymore, but these games were played at like 40-45 fps. The fps drops happened only in games with 60 fps, so that might have been related to how fast the game was processing, or the drawer that was used.

Had only sporadic cases of miners getting stuck, only in the lategame when the resources are mined out on most of the map. If Ollerus didn't point them out i wouldn't even be paying attention.
I'm not sure how much of that was due to them being subterranean miners and some bug making them forget to mine, or simply stopping mining because they can't find anyting to mine anymore.

@Starkku
Copy link
Contributor Author

Starkku commented Mar 28, 2025

Attempted to further improve the behaviour but I suspect it won't fix every issue particularly with harvesters getting stuck if there's too many on single ore patch or refinery.

  • Further improvements to rally point handling, should now reliably travel to rally point first if one is set instead of jumping to a ore patch if there's one nearby.
  • Applied similar idle mode exceptions to subterranean harvesters as teleporting ones have.

@Starkku Starkku force-pushed the feature/subterranean-harv branch from 2737d26 to 46a2c1f Compare April 11, 2025 21:10
@Starkku Starkku force-pushed the feature/subterranean-harv branch 3 times, most recently from 15588ed to 74acf4a Compare May 2, 2025 09:43
@Starkku Starkku force-pushed the feature/subterranean-harv branch 2 times, most recently from e826c0a to 6ffd7c5 Compare June 10, 2025 17:47
@Starkku Starkku force-pushed the feature/subterranean-harv branch from 6ffd7c5 to 44370ca Compare June 13, 2025 12:04
@Coronia
Copy link
Contributor

Coronia commented Jun 16, 2025

when we were testing it in PP it gave us this, probably due to the recent include change
image

and it still didn't work quite well in MO after making miners move subterraneanly. They would stuck like this
image

@Starkku Starkku force-pushed the develop branch 2 times, most recently from b429215 to 280b1c8 Compare June 29, 2025 19:13
@KuroNoSeiHai
Copy link

KuroNoSeiHai commented Jul 4, 2025

Hello. Excuse me, I found some other issues in subterranean harvester.

  1. Phobos b47: If the subterranean harvester is ordered to move immediately after completing unloading (changing to the unload class), it may freeze indefinitely (visually stuck in the unload vxl). A workaround is to press the S key or issue multiple movement commands to resolve the freeze.
  2. Vanilla Behavior: When manually ordering a subterranean harvester to return to the Ore Refinery, it unnecessarily circles around once and then finally stop. However, if using this nightly fix, the harvester returns to the refinery but does not stop completely—it resumes mining instead.

@mevitar
Copy link

mevitar commented Jul 4, 2025

But did you check the behavior in this build?
How harvesters behave in b44 is not indicative of how they behave here.

@KuroNoSeiHai
Copy link

But did you check the behavior in this build? How harvesters behave in b44 is not indicative of how they behave here.

I'm sorry, It's B47. I misspelled.

@CrimRecya
Copy link
Contributor

Hello. Excuse me, I found some other issues in subterranean harvester.

  1. Phobos b47: If the subterranean harvester is ordered to move immediately after completing unloading (changing to the unload class), it may freeze indefinitely (visually stuck in the unload vxl). A workaround is to press the S key or issue multiple movement commands to resolve the freeze.
  2. Vanilla Behavior: When manually ordering a subterranean harvester to return to the Ore Refinery, it unnecessarily circles around once and then finally stop. However, if using this nightly fix, the harvester returns to the refinery but does not stop completely—it resumes mining instead.

The first issue starts to occur after b44, and b43 does not have this issue.
The second issue only occurs at close range (when the unit does not enter underground).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs testing ⚙️T1 T1 maintainer review is sufficient ❓Vanilla bug Vanilla game bugs that are requested to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants