beyond-all-reason / beyond-all-reason/RecoilEngine
Weapon targeting based on unit behaviour instead of unit category
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
Currently, unit def weapons use the `onlytargetcategory` tag to determine whether a target is valid or not. This is static, so a target is either universally valid, or universally invalid, regardless of what it is doing. This results, for instance, in ground units not being able to target landed planes, while AA still can.
Instead, if the target categories were based on the unit's current behaviour, then targeting could be dynamic, and more intuitive.
The categories I can think of are `SURFACE`, `FLOATING`, `SUBMERGED`, `HOVER`, `FLYING`.
An aircraft would then have the FLYING category while flying, but when landed would have the SURFACE category. So AA could shoot it in the air, but not on the ground, and tanks could shoot it on the ground, but not in the air.
Contributor guide
Research direction
Start by tracing how the `onlytargetcategory` tag is evaluated and where a unit's current behaviour or movement state is available. Compare the proposed `SURFACE`, `FLOATING`, `SUBMERGED`, `HOVER`, and `FLYING` categories against targeting for landed aircraft, airborne aircraft, and ground units. Done means targeting changes dynamically with the target's behaviour without breaking existing weapon restrictions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100