- Joined
- Jan 9, 2015
- Messages
- 187
- Reaction score
- 167
- First Language
- English
- Primarily Uses
I've been looking for ways to split up large maps into segments (like the common technique of having multiple interiors for a town combined on one larger map) and while you technically don't need any script or plugin to do that, it can make the camera movement very clumsy-looking (lots of empty blank space, in order to prevent the player from seeing the other segments of the map). And you have to waste almost a screen's worth of tiles to keep everything well-hidden, too.
^ how segmented maps have to look in the editor by default (so much wasted space)
It causes even more obvious problems when having the blank space would be very ugly/conspicuous, like on outdoor maps (ie. imagine a puzzle where you have events moving "across maps"-- instead of having to use a combination of global switches and variables, you can just teleport the event to another segment of the map to give the illusion that you are moving it to another map. This works for towns as well to help make simulated NPC schedules!!
).
^ what the game camera does by default, and how it would ideally look ('locking' to the boundaries)
I've tried to work with a few camera control scripts, but it's difficult to use them because they are geared toward cutscene direction, not purposes like this.
I think the solution lies in having the Game_Map.scrollUp/Left/Down/Right functions to be based on the user-set boundaries and not the actual map width/height, but I don't have the know-how to take it a step further and actually get it to work, and I think this script would help a lot more people than just myself. The intended effect is having what would look exactly like several separate maps in-game (camera stopping at the edge of the boundary), but it's all actually in one map in the editor. The plugin detects what segment the player is active in using their x/y coords, and behaves accordingly.
I was thinking it would be best if these boundaries were defined in the map's notetags like
<boundaries>
1: x,y,width,height (example 0,0,24,17)
2: x,y,width,height (example 25,0,17,13)
</boundaries>
...because it would also be a way to identify if the map is supposed to be segmented, or just a regular scrolling map. Using regions might also be possible, but since regions are used for so many other purposes I feel like it would conflict with too many other systems... there are 256 of them though, and I doubt anyone really uses all of them in a single map so it may be a way to go about it too.
Other really useful snippets that could go along with this would be functions that check which map segment the player or an event is currently positioned in. Events could have different pages activated based on the segment they are in (again, super useful for livelier NPCs)
as far as preventing the player from walking across the "edge" of a map by leaving a segment, I figured that would have to be done manually by the developer either by setting up impassible tiles or transfer events on the edges. There are possible advantages to allowing events, for example, to move between segments on their own. Events could also be recycled, like if you had some decorative events that are used over and over (birds, butterflies, lights...), you could teleport them along with the player during the transfer event to where they need to be. That way, you can greatly reduce the number of total events you have on the map.
^ how segmented maps have to look in the editor by default (so much wasted space)
It causes even more obvious problems when having the blank space would be very ugly/conspicuous, like on outdoor maps (ie. imagine a puzzle where you have events moving "across maps"-- instead of having to use a combination of global switches and variables, you can just teleport the event to another segment of the map to give the illusion that you are moving it to another map. This works for towns as well to help make simulated NPC schedules!!
^ what the game camera does by default, and how it would ideally look ('locking' to the boundaries)
I've tried to work with a few camera control scripts, but it's difficult to use them because they are geared toward cutscene direction, not purposes like this.
I think the solution lies in having the Game_Map.scrollUp/Left/Down/Right functions to be based on the user-set boundaries and not the actual map width/height, but I don't have the know-how to take it a step further and actually get it to work, and I think this script would help a lot more people than just myself. The intended effect is having what would look exactly like several separate maps in-game (camera stopping at the edge of the boundary), but it's all actually in one map in the editor. The plugin detects what segment the player is active in using their x/y coords, and behaves accordingly.
I was thinking it would be best if these boundaries were defined in the map's notetags like
<boundaries>
1: x,y,width,height (example 0,0,24,17)
2: x,y,width,height (example 25,0,17,13)
</boundaries>
...because it would also be a way to identify if the map is supposed to be segmented, or just a regular scrolling map. Using regions might also be possible, but since regions are used for so many other purposes I feel like it would conflict with too many other systems... there are 256 of them though, and I doubt anyone really uses all of them in a single map so it may be a way to go about it too.
Other really useful snippets that could go along with this would be functions that check which map segment the player or an event is currently positioned in. Events could have different pages activated based on the segment they are in (again, super useful for livelier NPCs)
as far as preventing the player from walking across the "edge" of a map by leaving a segment, I figured that would have to be done manually by the developer either by setting up impassible tiles or transfer events on the edges. There are possible advantages to allowing events, for example, to move between segments on their own. Events could also be recycled, like if you had some decorative events that are used over and over (birds, butterflies, lights...), you could teleport them along with the player during the transfer event to where they need to be. That way, you can greatly reduce the number of total events you have on the map.

