User talk:Trogdor

From ModdingWiki
Jump to navigation Jump to search

Treasure Mountain Level Format

Welcome to the modding wiki! I've been looking over your edits, and I was wondering... is the "Treasure Mountain Level Format" actually a level format with an embedded tileset, or is it just a tileset format? From the image, it seems to just be a tileset, but from the explanation I'm not too sure. If it's not a level format, then the page should probably be moved to "Treasure Mountain Tileset Format". If it is a level format, then the showcase image should be changed to an actual constructed level image, not a dump of the tile data. (Oh, as a side note, please avoid using html; most html tags have corresponding wiki formatting.) -Nyerguds (talk) 09:43, 24 January 2024 (GMT)

Hi Nyerguds, thanks for the welcome. Basically this file contains the image tilesets and also what I call chunks and each room/level is made up chunks, the only room that doesn't have multiple chunks is the the main menu which has just one chunk of 320x200 which is the main title screen. The page to create was already called Treasure Mountain Level Format so I just went with it, but perhaps it should just be "Treasure Mountain Tileset Format" as it doesn't hold any level data, just how to display chunks in the game with it's associated tileset images in the one file.
Thanks for the heads up for the no html, I'm new to the site so just will look more into the WIKI and how you're meant to do everything.Trogdor (talk) 12:55, 24 January 2024 (GMT)
So the actual end result is a set of one or more full images built up from these tiles, then? That's actually quite like the Sierra/Dynamix BMP Matrix images used as scrolling background in their adventure games; they "compressed" long panning images by chopping them into tiny blocks so repeating wall patterns would be reusable. Actually, I should really document those on the wiki... I figured out that format and added support for it in my conversion tool, but never added it here :-\
On the subject of Treasure Mountain, these seem to be quite similar; the .PAN extension in fact hints at the fact it is a "panning" image. So I guess "Treasure Mountain Panning Image Set Format" would probably be a better name. In fact, I see that indeed, the page already uses the template for tileset information, not the game map one.
As for wiki formatting, well, I didn't actually know how to do numbered lists in wiki formatting either, but a quick online search landed me on the example page on wikipedia right away. And for specific templates and tables used on the wiki here, you can just open the source of some other pages and see how it's done. -Nyerguds (talk) 22:11, 24 January 2024 (GMT)
Right, I managed to decode the images. I expected the end result to be one large panning image, but it seems they're generally 128x128 pixel chunks used to build up a full level. I'm going to edit some stuff in the article to clarify some points, and I'll move the page to a more appropriate name. Maybe just "Treasure Mountain PAN Format" is more succint.
One more note, though: if you upload images, please, if possible, upload them in original pixel format. The palette in these images is also useful information for mod makers, and your tiles dump did not contain it. Of course, on some formats this isn't entirely possible; for example, CGA images are 2 bit per pixel, and I don't know many applications that support saving in that format, but in general, if an image is indexed, it's nice if the palette is preserved in the showcase image here on the wiki. -Nyerguds (talk) 09:27, 25 January 2024 (GMT)
Thanks for all that. With the image and colour palette, I have the colour palette on PAK Format (The Learning Company) page, do I need to include it in the actual image or have it on the page as table as I've done in this page? Since it's a EGA palette just in a different order than the default. Yes all these chunks are for the level data. I've found where it's stored, it's the in SST.exe file and begins at position 0x15F65 for the first chunk beginning at chunk 0,0 most top left of the room. I believe the main game is just a massive room that is about 16x18 chunks from what I can tell at the moment. It's a bit hard to make the level from what I can tell at the moment because since it's all in the same room you have to know which .PAN file tileset to use in which part of the room. Trogdor (talk) 11:04, 25 January 2024 (GMT)
No worries, I'll upload a full decoded image later to replace the tileset dump that's there now, and my conversion tool retains the original palette when exporting to png, so then that's all taken care of. -Nyerguds (talk) 15:34, 25 January 2024 (GMT)
Done. The page is now at Treasure Mountain Panning Image Format. Just gotta implement saving for the file format, and then I can release the new version of my converter tool and add it to the page. -Nyerguds (talk) 19:56, 25 January 2024 (GMT)
Awesome it looks really good, well done with the page! Thanks for all your efforts, hopefully I'll get to a point one day when I am able understand, explain and articulate as well as you do. I'll keep working on Treasure Mountain and trying to reverse engineer it. Trogdor (talk) 00:50, 26 January 2024 (GMT)
Nyerguds Industries Proudly Presents: Treason Mountain! And yes, that's an in-game screenshot using an actual re-saved OPENING.PAN file :) -Nyerguds (talk) 14:15, 1 February 2024 (GMT)
I managed to do some optimising by shuffling around the order of the tiles in the image data so pairs of tiles that have repeating ranges of the same byte at the first tile's end and the second tile's start are put together. It's an extremely rough logic (it doesn't even check if the resulting repetition indeed exceeds 3 bytes to make it viable for compression), but still, all of the original files become slightly smaller when resaved that way. And the game accepts them just fine. I added the tool to the Panning Image format page. -Nyerguds (talk) 21:33, 1 February 2024 (GMT)
Okay, changed to a logic that actually detects and chains together tiles with the most repeats of the same byte on their beginnings and ends. Resaving now manages to take a full kilobyte off the largest file in the game. I guess that's good enough :) -Nyerguds (talk) 10:35, 2 February 2024 (GMT)
Very nice! Good work with the panning image optimisation and the program, I downloaded it and it's pretty impressive work. Also thanks for working on the PAK Format (The Learning Company) I was really stuck on that for a few months scratching my head trying to figure out how it worked. Guess I was going about the wrong way reading it. I think we've got most of it done now, just need to figure out how the level data works in the sst.exe file and how the last area where you climb the ladder is stored in the save file. Haven't been able to figure that out. Trogdor (talk) 11:18, 6 February 2024 (GMT)
Well, my main area of expertise is graphics formats and RLE-like compression schemes, so this was right up my alley. In fact, I just managed to write the saving code for the PAK format. I'll be posting the updated tool with that soon. Not that experienced with pulling apart level formats, though, and my disassembly experience is mostly limited to 32-bit, so, good luck with that. -Nyerguds (talk) 11:42, 6 February 2024 (GMT)