Unit Group pathing failures

Place to get help with not working mods / modding interface.
cliff_build
Inserter
Inserter
Posts: 20
Joined: Thu Dec 03, 2020 4:52 pm
Contact:

Unit Group pathing failures

Post by cliff_build »

I work on the Biter Battles scenario. This uses custom scenario code to spawn biter attack waves, have the waves travel to a waypoint, and then attack the player after going to that waypoint.

We somewhat frequently have biter attack groups encounter a pathfinding error (defines.behavior_result.fail) when the location of the unit group happens to be on a water tile (my understanding is that the position of the unit group is the average of the members of the unit group, and so when biters path near water, it is not uncommon for the center of the unit group to overlap some water tiles. It is very much the case that each biter itself in these situations does have a valid path to the target (like, there are no islands involved or anything)

The most confusing this for me is that in this case, I am unable to get the unit group to do ~anything. I have tried doing set_command(type=wander), or giving it commands to route to other locations, and they seem to just not do anything (they just stay still where they were). Calling set_autonomous() on the unit group does work (the biters seem to disperse and go back to nearby spawners), but that is not what I want.

I'm excited because I did not realize that the center-of-group-is-on-the-water was part of this behavior until very recently (when I finally added some more debug messages when this happens). This issue has been around in Biter Battles for a long long time (sometimes, groups of biters just become stranded).

I'm open to any sort of suggestions/feedback about how I could make progress (if there is more debugging info that would be helpful). Perhaps our algorithm for choosing waypoints could try harder to find a location farther away from water, for instance.

I guess maybe an option would be to destroy the unit group, and just give the command to each unit individually.
cliff_build
Inserter
Inserter
Posts: 20
Joined: Thu Dec 03, 2020 4:52 pm
Contact:

Re: Unit Group pathing failures

Post by cliff_build »

oh, I intended to post this into Bug Reports instead of Modding help... my bad
Loewchen
Global Moderator
Global Moderator
Posts: 9269
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Unit Group pathing failures

Post by Loewchen »

For a bug report follow 3638.
cliff_build
Inserter
Inserter
Posts: 20
Joined: Thu Dec 03, 2020 4:52 pm
Contact:

Re: Unit Group pathing failures

Post by cliff_build »

Post Reply

Return to “Modding help”