[1.0.0] Scenario editor per-player settings leaking into new games
Posted: Sun Sep 13, 2020 8:37 pm
I created a scenario for one of my mods that has a pre-built map and does a small amount of scripting when players and forces are created (namely, enabling cheat mode automatically for players). When I created this scenario, I had my mod loaded, since the pre-built world includes some of the mod's entities. As such, the mod was fully loaded while creating the map, including the mod's player settings.
When you go to enter the scenario as a player, the state of the per-player mod settings as they were when the map was created carry over to the new player. I tried disabling one of them from the main menu and entered the scenario, but that setting was still active in the map.
I believe that the game isn't disposing of the editor player's per-player mod settings when that player is removed, so the new player 1 inherits those settings. For my mod, this means that you're stuck using the default settings if you enter that scenario.
I would greatly appreciate it if this could be fixed!
To reproduce:
- Download and enable Editor Extensions
- Change one of the per-player settings from the main menu
- Start a new game in EE's testing scenario
- The setting will still have its default value instead of the value you set it to
When you go to enter the scenario as a player, the state of the per-player mod settings as they were when the map was created carry over to the new player. I tried disabling one of them from the main menu and entered the scenario, but that setting was still active in the map.
I believe that the game isn't disposing of the editor player's per-player mod settings when that player is removed, so the new player 1 inherits those settings. For my mod, this means that you're stuck using the default settings if you enter that scenario.
I would greatly appreciate it if this could be fixed!

To reproduce:
- Download and enable Editor Extensions
- Change one of the per-player settings from the main menu
- Start a new game in EE's testing scenario
- The setting will still have its default value instead of the value you set it to