Skip to content

Pretty-print save game XML by default #7

@ayrtondenner

Description

@ayrtondenner

Context

From Discord #coding (2026-02-25), JonnyH noted that save game XML is written as one massive line, making it difficult to inspect without local pretty-print tools. The compressed size difference would be negligible.

man I really should get the code to pretty-print the save xml by default - one massive line is a PITA if you don't have local pretty-print tools to hand
and all to save a few bytes that probably compress well anyway... meh

TheSnide also suggested that auto-splitting into multiple files can sometimes help.

Proposal

Investigate enabling pretty-printed (indented) XML output for save games by default. The minor increase in uncompressed size should compress well and the readability benefit for debugging and modding is significant.

Tasks

  • Identify where save game XML serialization happens
  • Determine how to enable indented/pretty-printed output (pugixml supports this)
  • Evaluate impact on save file size (compressed vs uncompressed)
  • Consider whether splitting into multiple files is also worth exploring

Metadata

Metadata

Assignees

Labels

codingCode changes and fixes

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions