Sep 25, 2019 at 7:55 PM
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 802
Age: 26
Pronouns: 菓子
I'm a bit out of touch with the modding communities so I can't confirm but as far as I know this is a little useful quirk that isn't too well known, and I felt like it might as well be documented in a post like this.
Basically this is gonna be a post on the behavior of tilesets regarding the use of out of bounds tiles. I'm gonna assume that you have at least a bit about tileset modding.
As you may or may not know, tilesets can be 256×64 to 256×256 in resolution, if your tileset is smaller is smaller than the max size, then the tile space you're missing out on is considered out of bounds.
There's a couple ways to put an out of bounds tile in your map, as you can't just directly select one in Booster's Lab:
1. <CMP can set a tile directly to any tile you want, and if you <SMP beyond tile #0, it'll roll back to tile #255, regardless of tileset size (The same thing happens with <CMP, so don't bother trying to go beyond 255 because #256 will just be #0).
2. Editing your map with a larger tileset before switching over to whatever smaller tileset you intended to use.
3. Using the copy tool in BL by selecting tiles with an out of bounds ID in another map, and then using your selection in the map you want to put these in (This may not work in older versions as tile selections may not be global in them and i've no idea in what version this was changed).
Now that we know how to ruin our map with tiles that dont even exist in their tilesets, we must know why we actually want to do this.
Simply put, these out of bounds tiles will look like the tiles of previously loaded tilesets. Now putting it that way might not be so very clear, so lets go it over step by step.
There's various ways to make use of this, but what you basically want to do is load a map from a map whose tileset has parts that you want to use in the new map. A cool side effect from this is that you practically can have variable tiles by using multiple maps, not only growing the amount of tiles you can technically use for one map, but also possibly greatly reducing the need of many <CMP commands or entrance events.
You can even make a map change time or season (though this sadly doesn't work on backgrounds so you gotta find a solution for that yourself) by just entering a door that fades out before fading in on a changed variant of the same map, hiding the fact that you actually loaded a different map and went back.
I recommend trying things out and see what you can come up with, there could be some pretty neat things that can be done with this that would otherwise require large amounts of TSC or even assembly.
I hope I covered everything surrounding this subject and well enough at that since I'm tired and not very confident about my writing as someone who doesn't speak native Englishand I've a tendency to mess something up when I make a thread anyway.
If there's anything I missed, made any mistakes or left some things unclear please mention that.
I'm posting this mostly so others can try this out and maybe find cool ways to make their mod's maps, and also so it's a bit better documented than just a profile post or random concept posts I may have made in Discord servers.
So yeah, thanks for reading this massive wall of text and I hope it comes to some use for someone.
Basically this is gonna be a post on the behavior of tilesets regarding the use of out of bounds tiles. I'm gonna assume that you have at least a bit about tileset modding.
As you may or may not know, tilesets can be 256×64 to 256×256 in resolution, if your tileset is smaller is smaller than the max size, then the tile space you're missing out on is considered out of bounds.
There's a couple ways to put an out of bounds tile in your map, as you can't just directly select one in Booster's Lab:
1. <CMP can set a tile directly to any tile you want, and if you <SMP beyond tile #0, it'll roll back to tile #255, regardless of tileset size (The same thing happens with <CMP, so don't bother trying to go beyond 255 because #256 will just be #0).
2. Editing your map with a larger tileset before switching over to whatever smaller tileset you intended to use.
3. Using the copy tool in BL by selecting tiles with an out of bounds ID in another map, and then using your selection in the map you want to put these in (This may not work in older versions as tile selections may not be global in them and i've no idea in what version this was changed).
Now that we know how to ruin our map with tiles that dont even exist in their tilesets, we must know why we actually want to do this.
Simply put, these out of bounds tiles will look like the tiles of previously loaded tilesets. Now putting it that way might not be so very clear, so lets go it over step by step.
First, we make this map using the vanilla White tileset (the one for the Balcony). If you don't remember how that looks like refer to the PrtWhite.bmp file in the data/stages folder.
This is a simple map, with a single pot entity. But say we want to make a version of the same map using the Outer Wall tileset (PrtOside), so we copy the tiles, fill in a new map, and change the ground a bit and add the pot. In the editor it should look like this;
However, if we use the pot to go from the first map to the second, it will look like this:
Now, as you may know, the Outer Wall tileset does not have grass, so how did it get into this map?!
Imagine the 'tileset memory' as a 256x256 image, if we load a map, it's tileset is loaded into this image right at the top, for example with Balcony's tileset it will be loaded like this (And my bad for the poor man's representation but I am too tired to worry about copyright issues and if they even apply in this case if I post the full tilesets):
The tileset (including all the empty black space the tileset has) is 256×240 in size, which means it almost fills up this entire 'tileset memory'.
Now you may normally expect the Outer Wall tileset to just replace the tileset already in the memory, but it will actually load on top of the current like this:
The previous tileset is still there! The new 256×64 tileset only has replaced a small portion of the previous one, which actually still leaves it perfectly usable. If White had any spikes in the non-overwritten area, we could've placed these in our map even if Oside didn't have them.
If we load another tileset, it'll be pasted on top of these two just like how Oside went onto White. Of course, these tilesets are loaded when Cave Story loads a map.
Note that by default, White will always be loaded because of the intro cutscene using this tileset.
And also very important: THIS DOES NOT SAVE.
Because of this, I severely discourage allowing the player to save in a map that makes use of this technique unless you know what you're doing. Nobody likes incorrectly loaded maps after all.
While writing this post I've also had a case of the 'tileset memory' being refreshed for whatever reason after tabbing in after a while, though I haven't managed to do this a second time so make of that what you will.
This is a simple map, with a single pot entity. But say we want to make a version of the same map using the Outer Wall tileset (PrtOside), so we copy the tiles, fill in a new map, and change the ground a bit and add the pot. In the editor it should look like this;
However, if we use the pot to go from the first map to the second, it will look like this:
Now, as you may know, the Outer Wall tileset does not have grass, so how did it get into this map?!
Imagine the 'tileset memory' as a 256x256 image, if we load a map, it's tileset is loaded into this image right at the top, for example with Balcony's tileset it will be loaded like this (
The tileset (including all the empty black space the tileset has) is 256×240 in size, which means it almost fills up this entire 'tileset memory'.
Now you may normally expect the Outer Wall tileset to just replace the tileset already in the memory, but it will actually load on top of the current like this:
The previous tileset is still there! The new 256×64 tileset only has replaced a small portion of the previous one, which actually still leaves it perfectly usable. If White had any spikes in the non-overwritten area, we could've placed these in our map even if Oside didn't have them.
If we load another tileset, it'll be pasted on top of these two just like how Oside went onto White. Of course, these tilesets are loaded when Cave Story loads a map.
Note that by default, White will always be loaded because of the intro cutscene using this tileset.
And also very important: THIS DOES NOT SAVE.
Because of this, I severely discourage allowing the player to save in a map that makes use of this technique unless you know what you're doing. Nobody likes incorrectly loaded maps after all.
While writing this post I've also had a case of the 'tileset memory' being refreshed for whatever reason after tabbing in after a while, though I haven't managed to do this a second time so make of that what you will.
There's various ways to make use of this, but what you basically want to do is load a map from a map whose tileset has parts that you want to use in the new map. A cool side effect from this is that you practically can have variable tiles by using multiple maps, not only growing the amount of tiles you can technically use for one map, but also possibly greatly reducing the need of many <CMP commands or entrance events.
You can even make a map change time or season (though this sadly doesn't work on backgrounds so you gotta find a solution for that yourself) by just entering a door that fades out before fading in on a changed variant of the same map, hiding the fact that you actually loaded a different map and went back.
I recommend trying things out and see what you can come up with, there could be some pretty neat things that can be done with this that would otherwise require large amounts of TSC or even assembly.
I hope I covered everything surrounding this subject and well enough at that since I'm tired and not very confident about my writing as someone who doesn't speak native English
If there's anything I missed, made any mistakes or left some things unclear please mention that.
I'm posting this mostly so others can try this out and maybe find cool ways to make their mod's maps, and also so it's a bit better documented than just a profile post or random concept posts I may have made in Discord servers.
So yeah, thanks for reading this massive wall of text and I hope it comes to some use for someone.