Sorry for coming off so annoyed, but this seemed pretty self-explanatory to me, but on further inspection I can see how someone could be confused. I'll break this section down bit by bit for you.
The top part says:
Sets battle_scene to change if called from specified map, otherwise it is self
Below it is part of the script.
This part of the config is for having a battle on a different map than the one that you run the Battle Processing event from. This means that if you don't change ANYTHING in this section, your battles will only take place on the map that you call them from. Random battles, forced battles, etc. If this map's ID # is 1, then it will take place on map ID #1.
If you wanted to have it different from that, though, then you would change the following section:
def self.battle_map(map_id)
case map_id
when 1; map = 1
when 22; map = 25
when 41; map = 30
when 44; map = 45
when 46; map = 47
when 49; map = 51
else; map = map_id
end
return map
end
I took this from my own project so you can see what's going on here and what needs to be changed. As you can see, the only thing that you change here is
ADDING NEW WHEN STATEMENTS. On my map ID #49, I have the battles take place on map ID #51, and so on and so forth.
Now, for the problem that you're having, it deals entirely with the bottom half of that script, "EXIT BATTLE INFORMATION." This means that
any cases listed in the section below will teleport you to another map after the battle takes place on the given map. You'll understand better once I explain what the settings mean.
The settings that have you confused are in reference to the WHEN statements that you need to add or change in the script area below it. GubiD lists them in the order that they must be entered in the WHEN statement. Again, here's an example from my project:
def self.battle_exit_info(map_id)
case map_id
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 22; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 29; return [false, 34, [1,11], 8]
when 31; return [false, 32, [14,6], 2]
when 30; return [false, 33, [10,4], 2]
when 41; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 44; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 49; return [false, 52, [16,9], 4]
else; return [true, 1, [1,1], 2]
end
end
To add a new situation, you have to create a new WHEN statement here, as I have done in my project. Let's break down the numbers so you understand this better.
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 1:
This means, when the map ID is 1. Replace this with a different map ID # if you want to have a battle that takes place on that map to transport you somewhere else after it's done.
Now here comes the things that GubiD lists that you should be inputting:
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
This refers to what Gubid listed as "Return to calling map and position(True, False)"
Simply, if you want to go back to the same map and the same location that you got sent to the battle from, leave it marked as true. If you plan on marking this as True, then you shouldn't bother making a when statement for that map ID, as the default is set to True unless you change it.
If you mark it as False, however, that means that you DO want to be transported to a different map after a battle on the map ID # from earlier.
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
This is what Gubid refers to as "Goto Map_ID(only used if first if false)." Simply put, if you chose true in the first variable, then it doesn't do anything. If you chose false, however, change this number to be teleported to whatever map ID you want to go to after the fight.
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
This is what Gubid refers to as "Return to [X, Y] on specified map," or the coordinates you want to be teleported to on the new map (if you chose false). It looks a little complex because it uses scripting commands, but if you leave it like that ($game_player.x,$game_player.y) that will mean it will return you to the same coordinates as when you first called the battle. If you were at [5,6] before the battle began, then you will be transferred to [5,6] on the new map.
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
Again, this is simply the direction you'll be facing once you are sent to the new map. Use that command if you want to face the same direction you were before the battle started; otherwise, change it to either 2 (down), 4 (left), 6 (right), or 8 (up). I'm not sure if those numbers match the directions, but those are the four numbers used for directional coding.
So in a simpler format,
when calling_map_id_#; return [is_this_a_new_map?_t/f, new_map_id_#, [new_x_coordinate,new_y_coordinate], direction
Just replace the text with the appropriate value. When in doubt, refer to the sample that GubiD gives you to match up formats.
So now that you know how that script area works, you should be able to identify your problem by now. If not, then I'll spell it out plain and simple here:
when 3; return [false, 4, [5,14], 8]
Let's pick this apart with the new understanding of the script.
The calling map ID is 3. That's the number directly after the "when."
It's marked false, which means that a battle on this map WILL send you to another map, which is the number that follows directly after.
4.
Your problem first came in the format of you not having a map ID #4. You got this error because the script was trying to send you to map #4 because of the conditions listed above. Now that you have a map id #4, the script is trying to send you there because the config tells it to in the above statement. How do you remedy this problem? Delete this line of code. NOT THE WHOLE THING. Just:
when 3; return [false, 4, [5,14], 8]
Elsely, if you want to leave it there as an example, just change the false to a true and it'll disregard the sending to another map completely.