beyond-all-reason / Beyond-All-Reason

Main game repository for Beyond All Reason.
https://www.beyondallreason.info/
Other
1.71k stars 285 forks source link

Units firmly holding position #2622

Open Nitromachine opened 7 months ago

Nitromachine commented 7 months ago

Description

A way for units who are supposed to hold their position to stay firmly in their current location.

Why?

I often set up lines of artillery vehicles behind dragon teeth or other specific locations and it is very annoying to see friendly units bump into these vehicles and push them away from their position. This sometimes result in my units being destroyed through getting pushed away from radar jamming coverage or the fortifications they are supposed to hide behind.

What area of the game does this feature request pertain?

Gameplay

Other (optional)

No response

WatchTheFort commented 7 months ago

Unfortunately, this behaviour is hard to mitigate, as the pathfinding relies on it. One option is to have units that are bumped out of the way return to their original position, but we are not sure how feasible that is.

ChrisFloofyKitsune commented 7 months ago

Off the top of my head:

I can see a new GUARD_POSITION command being made.

It would get set when using the existing GUARD command on a position. (Technical reason: don't reuse the existing GUARD command ID to prevent breaking stuff)

Every so often, check to see if the unit's like... more than 50% of their size away from the point they were told to guard and prepend a move command to that spot.

Nitromachine commented 7 months ago

Since structures are completely immobile, perhaps a unit could be temporarily converted into a structure using the aforementioned GUARD_POSITION command? It would be visually indistinguishable from a regular unit but the game's logic would treat it as a building, which could prevent the unit from getting bumped. Another possibility would be to provide players with a cheap garrisonable structure, which would lock the unit in place.

WatchTheFort commented 5 months ago

The Game Design Team has approved that this issue needs to be addressed, though the technical solution may not be easily feasible.

marcushutchings commented 5 months ago

If the issue is about a stationary unit not being pushed, then perhaps there is something I can do around pushResistant?

marcushutchings commented 5 months ago

I'd like to thank GoogleFrog for bringing this to my attention. I am dissapointed in the GDT not reaching out to me about this given there may be ways in the engine to address this efficiently and by failing to reach out could cause avenues may not get explored.