Skip to content

Are Configuration settings intentionally persisted in savegames? #1277

Description

@janosgy

Question

Several user-facing options (notably volume and mute) are stored both in the global config (open-ig-config.xml via @LoadSave) and inside each savegame (@LoadSaveGame). Loading a save overwrites the in-memory Configuration from the save XML, so older saves restore their old audio/settings.

Is this intentional?

Observed behavior

  1. Change volume/mute in options.
  2. Start a new game → current settings are kept.
  3. Load an older save → volume/mute (and other @LoadSaveGame fields) reset to whatever was stored in that save.

Mechanism

In Configuration.java, fields annotated with @LoadSaveGame are written/read as attributes on the save’s <world> element via saveProperties / loadProperties. GameWindow.restoreSettings() applies them on load (including music volume/mute).

Fields currently restored from savegames (@LoadSaveGame)

Audio / voice

  • musicVolume, muteMusic
  • effectVolume, muteEffect
  • videoVolume, muteVideo
  • classicalMusic, stargazerMusic
  • buttonSounds
  • computerVoiceScreen, computerVoiceNotify
  • satelliteDeploy
  • subtitles

Gameplay

  • reequipTanks, reequipBombs
  • autoBuildLimit, autoBuildForNewPlanets, aiAutoBuildProduction
  • autoRepair, autoRepairLimit
  • researchMoneyPercent
  • automaticBattle
  • slowOnEnemyAttack
  • timestep
  • spacewarFreeformMovement

UI / display

  • showBuildingName
  • radarUnion
  • animateInventory
  • autoDisplayObjectives
  • quickRNP
  • scaleAllScreens
  • showStarmapLists, showStarmapInfo, showStarmapMinimap, showStarmapScroll
  • buildingTextBackgrounds
  • allowWeather
  • customCursors
  • dayNightCycle

Controls

  • classicControls
  • swapMouseButtons

Global-only examples (not restored from saves)

Language, UI/movie scale, fullscreen/window geometry, tooltips, fonts, intro, tile caches, most AI debug/balance toggles, multiplayer host/join, profile name.

Possible directions

  • Keep as is
  • Keep machine/user prefs (especially audio) global-only and stop loading them from saves.
  • Load them from saves but do not overwrite the live config / apply them only as game-state where that makes sense.

Happy to help with a PR when preferred behavior is clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions