Map with ForceCharacter can be opened in a save slot of diferent character other than the one set in ForceCharacter, overwriting it

Ezer'Arch

ArchPack 2.5 is on the way
Say you create a map for a level pack with the following:

Level A1
LevelName = Name
TypeOfLevel = Singleplayer
ForceCharacter = Sonic
SaveGame = true
LevelSelect = 1

With the level pack loaded, create a Tails save slot. The map A1 will be available to Tails through the level select nonetheless. Enter the map, as intended Tails "become" Sonic. Finish the map; now the save slot is Sonic's.

EDIT:

Let me describe exactly what happened when I was testing my level pack, before releasing it:
  1. Create a level pack whose maps are A, B, C and D. A, B and C are the normal SP campaign that can be played by any character. Only D is Sonic-only and an unlockable that will be available in SP level select if you meet the required ConditionSet (e.g. collect X emblems, GameClear etc.).
  2. Load the level pack and start a Tails save slot.
  3. Play normally until you meet the ConditionSet to unlock D. Finish the normal SP campaign.
  4. Go back to title screen. Now: 1 Player -> Start Game -> Select a save slot in which both the level select and map D are unlocked.
  5. Now in level select, select the map D.
  6. Despite the save slot you are playing now is a Tails slot, your character is Sonic. Ok, it's intended.
  7. Beat the map. Go back to title screen. The Tails save slot is now Sonic's (per SaveGame = true in level header).
  8. Open the Tails save slot. You play as Sonic on map A.
In short, once you complete a map with ForceCharacter, the game will override the character that save slot was originally created with. That's the bug.

The level select part is not required for the bug to happen, just complete a map that changes the character. The game just changes the default character of a slot as you play, but doesn't assign separately the main character of the slot and the current character you are playing. Therefore, the game can't recover the main character originally created with once you leave the map that changed the character.

My workaround to avoid this in my level pack was replacing LevelSelect = 1 with LevelSelect = 0. The map with ForceCharacter can be safely played via Extras Menu.

Gitlab issue: https://git.do.srb2.org/STJr/SRB2/-/issues/816
 
Last edited:
I thought this is how ForceCharacter is supposed to work?
Though yeah, losing the original character entirely on the save file sucks.
 
I thought this is how ForceCharacter is supposed to work?
Yes, it is supposed to turn any player who enters such map in Sonic, but I'm not talking about the behavior on MP. The unintended behaviors happen on SP, and there are two:
1) A Sonic-only map is available to any non-Sonic player via level select. Maybe this should be disabled.
2) It turns a non-Sonic savegame into Sonic's once you complete the map.
 
Last edited:
1) A Sonic-only map is available to any non-Sonic player via level select. Maybe this should be disabled.
That's what I meant, I thought that was intentional. ForceCharacter isn't there to restrict you from playing the map, it just sets your character to a specific one when the level loads. I haven't heard of ForceCharacter preventing a level from being loaded if you're the "wrong" character.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top