Wrong replay and database data with Non-Fixed `TeamSpawn` Settings (e.g., 'balanced')
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
### Describe the issue
When the lobby setting `TeamSpawn` is set to 'balanced' (or any non-'fixed' value), several problems occur:
1. **Misleading Replay Header Army Information**
The replay header displays incorrect army details (`ArmyName`, `StartSpot`). It doesn't reflect the post-auto-balance state
2. **Incorrect Faction Recording in `game_player_stats`**
If a player selects "Random" faction in the lobby, the `game_player_stats` database table records their actual faction instead of the intended "Random" value (5) (it is recorded by the server, but the server receives it from the game)
### Expected Behavior
`ArmyName` and `StartSpots` are adjusted correctly to reflect changes made by auto-balancing, random faction remains random
### Screenshots
Example on the replay `25111746`
From parsed data:

Expected:

Actual pre-start lobby:

Scoreboard appearance:

Example of scoreboard with some random factions:

Contributor guide
Assessment
This issue has not been assessed yet.