AI uses better rally point placement#21475
Conversation
|
Actually I don't think set rally point is useful for AI:
|
I think this PR is a sensible patch that keeps the existing rally point behaviour, but other PRs to investigate different behaviours entirly for the AI rally points could be a good idea - however those could be tackled independantly of this work. |
My thought is: we put the rally operation to SquadManager in protection team logic.
|
PunkPun
left a comment
There was a problem hiding this comment.
I recon AI should change rally points once in a while. The previous behaviour although buggy, did that. The current only changes if the rally is hard blocked
- AI places rally points at pathable locations. A pathable location isn't strictly required, but avoids the AI setting rally points at seemingly dumb locations. This is an addtional check on top of the existing buildability check. - AI now evaluates rally points every AssignRallyPointsInterval (default 100 ticks). Invalid rally points aren't that harmful, so no need to check them every tick. Additionally we do a rolling update so rally points for multiple locations are spread across multiple ticks to reduce any potential lag spikes.
d20d7be to
8df6be0
Compare
|
Ok, I have kept the previous check. Once a unit enters the rally point location, the AI will now move the rally point. Same as it was doing before. I kept the other changes the PR has added. That means it won't choose an unreachable location. And since it doesn't check as often, it won't spam new rally points constantly, instead it changes them at a reasonable pace now. |
AI places rally points at pathable locations. This replaces the previous logic which required the location to be buildable. This doesn't make much sense, as soon as the first unit arrives at the rally point, the location became unbuildable and the AI would move the rally point! A pathable location isn't strictly required, but avoids the AI setting rally points at seemingly dumb locations.AI places rally points at pathable locations. A pathable location isn't strictly required, but avoids the AI setting rally points at seemingly dumb locations. This is an addtional check on top of the existing buildability check.
AI now evaluates rally points every AssignRallyPointsInterval (default 100 ticks). Invalid rally points aren't that harmful, so no need to check them every tick. Additionally we do a rolling update so rally points for multiple locations are spread across multiple ticks to reduce any potential lag spikes.
Fixes #11938 Fixes #13289