I encountered a similar issue when building
The obvious solution is to save out the exploration stats prior to loading the battle map. This includes stuff like the player’s position, enemy and item locations, any persistent stats, etc. Save all this info out to a file, and reload it once you return to exploration mode. However, the problem with this that it’s extremely time consuming. As your levels get larger and gain more detail, the load time between them will become unbearable. No one is going to want to initiate a battle, take 20+ seconds to load the battle map, and then take another 20+ seconds to load the exploration map when they’re done. If your level is large and detailed, longer wait times. It’s just not good design.
Instead, we decided to go with a more efficient route. In there is no discrepancy between a “battle map” and an “exploration map”… all of the logic is contained within in the same map. This allows us to only load the map once, at the beginning. It means we’re never forced to save information out to a file. It also means that for every level/map we build for the game, each map will use the exact same default classes (Game Mode, Game State, Player Controller, etc). It also means that there is zero transition time between exploration and battle. When you run into an enemy, you’re immediately into a battle. We actually need to program an artificial transition to allow for a delay; the immediate nature of the transition is too jarring for most players.
This design means you have to do some things differently… for example, if you have two separate maps (an exploration map and a battle map), you would then make the exploration map into a “master” map, while the battle map becomes a streaming level of the master map. You’ll place the actors of your battle map in an inconspicuous location inside your master map (for example, beneath the world where the player cannot see or reach it). Once you enter a battle, you’ll simply move the camera to the appropriate location so that your player now sees the battle map. You’ll also pause the movement and controls of the exploration player (so as to “save” his location on the exploration map) and then you’ll force the player’s controls to only work for battle stuff (like menu operation). When the battle ends, return the camera perspective to the exploration character, regain movement control, and go about your business as normal.
For us, we actually ditched the notion of creating entirely new battle maps… instead opting to hold battles directly on the exploration map. You get in a fight, the exploration-specific assets are hidden, and the battle-specific ones are unhidden (or moved to the appropriate location from a hidden location).