Due to us lingering very long on one engine, with a large player influx since then, it might be wise to implement the loadsavegame wrapper function to run for alternate engines.
Here are some notes regarding this:
Each save game has an associated lua file with metadata, which contains the engine version used :
However, the way save games are loaded, they can only load on the most recent engine, due to being loaded via:
WG.Chobby.localLobby:StartGameFromString(script)
local engine = string.gsub(string.gsub(startEngineVersion, " maintenance", ""), " develop", "")
local engine = string.gsub(startEngineVersion, "BAR105", "bar") -- because this is the path we use
local params = {
StartDemoName = string.sub(startReplayFile, 7), -- TRUNCATE 'DEMOS/' FROM THE PATH!
Engine = engine,
SpringSettings = WG.SettingsWindow.GetSettingsString(),
}
WG.WrapperLoopback.StartNewSpring(params)
This wrapper is implemented by the launcher, and works fine usually, except it does not work for savegames, as the launcher hard codes the demos/ folder.
Due to us lingering very long on one engine, with a large player influx since then, it might be wise to implement the loadsavegame wrapper function to run for alternate engines. Here are some notes regarding this:
Each save game has an associated lua file with metadata, which contains the engine version used :
However, the way save games are loaded, they can only load on the most recent engine, due to being loaded via: WG.Chobby.localLobby:StartGameFromString(script)
Replays on the other hand, support being launched from older engines, as they are launched via the wrapper: https://github.com/beyond-all-reason/spring-launcher/blob/master/src/exts/start_new_spring_handler.js
This wrapper is implemented by the launcher, and works fine usually, except it does not work for savegames, as the launcher hard codes the demos/ folder.
https://github.com/beyond-all-reason/spring-launcher/blob/master/src/exts/start_new_spring_handler.js
Proposed solution: I'm going to remove the hard-coded 'demos' from this, to allow loading of save games on old engines too.