Pages: 1
Keeper |
Posted on 09-04-24, 09:49 am (rev. 1 by Keeper on 09-05-24, 12:45 am)
|
Mole
I do things sometimes Karma: 982 Posts: 352/359 Since: 08-07-17 |
When making or importing a tileset over any of the tilesets slots nsmbe suffixes with "with ice"--- those being slots 3, 17, 26, and 28 specifically--- the colours may appear messed up in game. This is because these tilesets use palette animations in order to make the some ice tiles twinkle, which means, in game, the top 4 palette lines of the tilesets 2nd palette (which nsmbe unintuitively refers to as Palette 1) are essentially replaced with the 1st, 5th, 9th, and 13th palette lines in
d_2d_Bg2_TEN_I_setsugen_ncl.bin . Each of the 4 palette lines play their animations randomly, going to the next one, the one after that, the one after that one, then back to the one before, and the one before that, and then going back to the start, until it eventually happens again. For a more specific example, for palette line 1 to animate, it'd go from the 1st palette line in d_2d_Bg2_TEN_I_setsugen_ncl.bin , to lines 2, 3, 4, 3, 2, then back to line one. I also made a gif to demonstrate it in action (in case any of this is hard to visualize)--- here, the palette animation happens on line 2.You could probably do some creative things with these palette animations, but the focus of this thread will be how to use normal tilesets in those slots and avoid interference from them. Adapting 2-Palette TilesetsAdapting 2-palette tilesets to work with these slots is pretty simple: 1. Import your 2-palette tileset over either the "Underground (with ice)" tileset, or the "Snow (with ice)" tileset 2. Locate its palette in the BG_ncl folder. itll either be called d_2d_I_M_tikei_chika_ncl.bin (if you imported your tileset over the "Underground (with ice)" one) or d_2d_I_M_tikei_setsugen_ncl.bin (if you imported it over the "Snow (with ice)" one).3. Decompress the file 4. Open it in nsmbe's hex editor, copy everything, paste it at the very end (or very beginning--- either work fine), then save 5. LZ compress the file 6. Open the tileset 7. Go to the map16 tab, select the "Change Palette" tool (the one with the colour wheel icon), and go over everything twice 8. Save If done right, the tileset should look the same--- both in game and in the editor. As for how this works, basically what you're doing is making the tileset a 4 palette tileset, but with palettes 3 and 4 being duplicates of 1 and 2, respectively. Then you change the palettes of all the tiles the tileset uses to palettes 3 and 4 instead of 1 and 2--- and since theyre duplicates, they look identical. this is done to avoid palette 2, as avoiding palette 2 is the easiest way to avoid the affects of these palette animations. If you're making all your own tilesets, you can also avoid these palette animations by making a 3 palette tileset that avoids palette 2 (or, if you're savvy enough in regards to NCGs, you could probably make a tileset that uses all palettes but avoids the first 4 palette lines of palette 2; there's no straightforward way to do this in nsmbe, however). Adapting the Palette Animations to the TilesetAn additional method would be to replace the palette animations with the 1st, 2nd, 3rd, and 4th lines of the 2nd palette of your tileset by editing the NCL. This will allow you to use a full-on 4-palette tileset--- but since the palette animations are used by both tilesets, this will only work on one. Once again, a relatively straightforward process, however, there's more room for error. 1. Import your tileset over either the "Underground (with ice)" tileset, or the "Snow (with ice)" tileset 2. Locate its palette in the BG_ncl folder. itll either be called d_2d_I_M_tikei_chika_ncl.bin (if you imported your tileset over the "Underground (with ice)" one) or d_2d_I_M_tikei_setsugen_ncl.bin (if you imported it over the "Snow (with ice)" one).3. Decompress the file 4. Open it in nsmbe's hex editor. Additionally, get a txt document open. 5. Explaination time--- in an NCL, each colour is represented by 2 bytes; this means a palette line will be 32 bytes (ie 16*2) and a 256-colour palette will be 512 bytes (ie 256*2). So, to get the first 4 lines of the second palette, youd need to go to 0x0200 and copy everything to 0x027F (ie, copy 128 bytes) and paste it in your txt document. 6. Close out of the hex editor and recompress the file. 7. Decompress d_2d_Bg2_TEN_I_setsugen_ncl.bin 8. Open it in the hex editor and delete everything 9. Pull up your txt document, cut (not copy) the first 32 bytes, then paste them into nsmbes hex editor 4 times. repeat this 3 more times; by the end, your txt document should be empty. 10. Save the changes you made to d_2d_Bg2_TEN_I_setsugen_ncl.bin . if you did things right, the file should be 512 bytes big.11. Recompress the file If I've got everything right, all this should work fine in game (granted, I haven't tested this really, but I don't see why it wouldn't work). I would also like to add this isn't the only problem that can occur with tilesets in these particular slots, as randomization can cause issue for those unfamiliar with it. However, since that applies to many tilesets beyond just these ones, I won't address it here. also. theres a typo in the gif. ignore that probably |
Pages: 1