Stadium.all_seater_capacity holds the total capacity, and the seated figure is in unknown

Open
#38 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start by reading the Stadium field definitions and the parser path that exposes unknown["u17"]; check the all_seater_capacity and expansion_capacity docstrings. Then trace the existing stadium tests and add coverage for seated and total capacity, including the uncertainty around zero values. Done means the field names and documentation match the reported FM27 values, with tests covering the behavior and any compatibility decision.

Written by the indexing model from the issue text.

Description

No save files or real data
  • I have not attached or linked a save file, screenshot, or any real player data
What went wrong

Stadium.all_seater_capacity holds the total capacity, not the seated capacity. The seated figure is in the save, and fmsave returns it only as unknown["u17"].

I compared three grounds on the FM27 Facilities screen, which shows capacity as "total (seated)":

Ground Screen all_seater_capacity unknown["u17"]
Standing room, non-league Total and seated differ Matches the total Matches the seated figure
Standing room, non-league Total and seated differ Matches the total Matches the seated figure
All-seater, top flight "all-seater" Matches the total Same as the total

The capacity field does not help here. It is empty on one of the two standing grounds. On the other it equals the total.

Two smaller differences on the same screens:

  • Pitch above its maximum: on FM27, 4 grounds store a pitch_length_dm above pitch_max_length_dm, and 3 grounds do this for width. The one such ground I compared shows the maximum as its pitch length. The FM26 save has no such grounds.
  • Display: the screen truncates pitch length to whole metres, so a stored 100.5 m shows as 100 m. This is not an fmsave error, but a comparison with the screen needs to allow for it.
What you expected

all_seater_capacity holds the seated figure, as its docstring says, or the field is documented as the total.

Suggested fix

Expose u17 as a named field, such as seated_capacity, and document all_seater_capacity as the total. Renaming all_seater_capacity would be cleaner, but it is a breaking change, so that is your decision. The docstring of expansion_capacity also compares itself with "the all-seater capacity", so it needs the same correction.

What I checked, and what remains uncertain
  • u17 never exceeds all_seater_capacity on 24,009 FM27 rows or on 19,942 FM26 rows. It is zero on many rows: 10,520 on FM27 and 7,395 on FM26. I have not compared a ground where it is zero, so I do not know whether zero means "no seats" or "not stored".
  • I compared three grounds, on FM27 screens only. The row layout is the same on FM26, but I have not confirmed the FM26 screen.
  • I do not know what capacity means. It is below all_seater_capacity on 904 FM27 rows and 859 FM26 rows.
  • I said on #31 that I did not find the seated figure. That was wrong, and this report replaces it.
fmsave version

fmsave 0.8.0 (main at 418c837)

Python version

Python 3.13.13

Operating system

macOS 27.2

FM26 build

FM27 27.0.0+2486695, with row counts also from FM26 26.3.0+2286575

fmsave validate output

stadiums reports ok, so validate does not show this.

Dominant language
Python
Stars
28
Forks
8
Avg merge
42m
Merged PRs (30d)
33

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rhiever/fmsave

All issues in rhiever/fmsave

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.