FAForever / FAForever/fa

Wrong replay and database data with Non-Fixed `TeamSpawn` Settings (e.g., 'balanced')

Open
#6,878 5 comments 0 reactions 0 assignees View on GitHub
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:

![Image](https://github.com/user-attachments/assets/7940cbd2-a56b-41de-8dba-0eb0f7d4fe83)

Expected:

![Image](https://github.com/user-attachments/assets/420ae833-8936-42f2-8b47-567d5f567d09)

Actual pre-start lobby:

![Image](https://github.com/user-attachments/assets/f48752d5-cc90-4360-8e78-2314ec5b3b34)

Scoreboard appearance:

![Image](https://github.com/user-attachments/assets/1fa5c94f-a8fe-418c-bad9-8411b7ef8b4c)

Example of scoreboard with some random factions:

![Image](https://github.com/user-attachments/assets/617bcaae-a8ed-4203-90b5-eabaf5dd8293)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.