beyond-all-reason / beyond-all-reason/RecoilEngine
Consider shuffling unitDefIDs
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
unitDefIDs happen to be assigned to unit defs in an alphabetical order according to their name, so many unit defs tend to receive the same unitDefID within a game even if the set of units changes between matches, e.g. `armaak` in BAR or `amphaa` in ZK are basically always ID 1 regardless of modoptions or updates. Newbie devs often notice this, and with most engine interfaces providing and expecting the numerical ID they often end up hardcoding numbers in wupgets instead of going via the name. Then later the ID changes after all and they get screwed.
Consider shuffling the IDs per-match to avoid this.
Contributor guide
Research direction
No source file or test is named. Start by tracing where unitDefIDs are assigned and how engine interfaces expose them, then determine how per-match shuffling should interact with lookups and changing unit sets. Done means the behavior is specified and verified across matches without breaking those interfaces.
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