OHR tilemap exporting tool
Moderators: Bob the Hamster, marionline, SDHawk
I'm guessing this is also a case of unix vs windows differences, and Sephy might not have been testing with the generated .exe file, which extracts everything in a temp directory. I think my change would fix all of that though. (But fix it however you want; this is the first Ruby code I've ever written).
I just got back, and I've added TMC's changes (both on the repo and in the zip file). I also added a few more debug messages in case this doesn't fix the problem.
The one thing that I switched back is that I added the 'exe' extension to the spawn command. Apparently ruby doesn't like it if the .exe extension isn't there.
The one thing that I switched back is that I added the 'exe' extension to the spawn command. Apparently ruby doesn't like it if the .exe extension isn't there.
- Pepsi Ranger
- Liquid Metal Slime
- Posts: 1457
- Joined: Thu Nov 22, 2007 6:25 am
- Location: South Florida
Definitely much better than before. I can actually get the thing to compile my RPGDIR folder.RMSephy wrote:I just got back, and I've added TMC's changes (both on the repo and in the zip file). I also added a few more debug messages in case this doesn't fix the problem.
Dropping the RPG right in MAPPER still doesn't work though. This time (thanks to the new error reporting, I actually know the problem now) it can't find UNLUMP.EXE, even though it's sitting right next to it in the folder.
EDIT: Oh, and can I make a request, assuming it can't do this already? Can you write an option to select multiple maps similar to how Microsoft Word lets you select multiple pages without having to pick one or all?
Example:
Code: Select all
Please enter the ID of the map you want to print (0-122)
Type "all" to print all the maps.
Type "," or "-" plus the ID to select a range of maps
Type "quit" to close the program.
>3,6,7-10,12,19,85
Drawing map 3
Drawing map 6
Drawing map 7
Drawing map 8
Drawing map 9
Drawing map 10
Drawing map 12
Drawing map 19
Drawing map 85
EDIT 2: Here's the result:
From The Adventures of Powerstick Man Extended Edition
The entire town of Primex (all four quadrants) spliced together to form a mega map:
One of the game's later areas (still unfinished), Cannonball Harbor:
I think I might want to upload a complete map pack for some of my games. Might be cool.
Also, you may want to support the selected master palette when printing. When I tried exporting Entrepreneur: The Beginning's maps, they all came out funky-colored. Same with Tightfloss Maiden.
Last edited by Pepsi Ranger on Mon Nov 24, 2014 11:51 pm, edited 3 times in total.
Place Obligatory Signature Here
- Pepsi Ranger
- Liquid Metal Slime
- Posts: 1457
- Joined: Thu Nov 22, 2007 6:25 am
- Location: South Florida
Eh, I just encountered another error, this time with two of my older games. I'm attaching a screenshot.
Also, in case you missed the stuff I edited into the post above:
1. Can you write an option to select multiple maps similar to how Microsoft Word lets you select multiple pages without having to pick one or all? (Read example in post above.)
2. You may want to support the selected master palette when printing. When I tried exporting Entrepreneur: The Beginning's maps, they all came out funky-colored.
Also, in case you missed the stuff I edited into the post above:
1. Can you write an option to select multiple maps similar to how Microsoft Word lets you select multiple pages without having to pick one or all? (Read example in post above.)
2. You may want to support the selected master palette when printing. When I tried exporting Entrepreneur: The Beginning's maps, they all came out funky-colored.
- Attachments
-
- mapper error 3.png (10.45 KiB) Viewed 3286 times
Place Obligatory Signature Here
Ah yes, I noticed that the tool always uses master palette 0 instead of using the active one, which is easy enough to pull out of .GEN.
Currently, the tool doesn't support games older than Ubersetzung (2007) because that's when the .MAP file format switched to a variable record length stored in binsize.bin. That's what the 'fixnum' error message you got is about. (To fix that by defaulting to the old length don't forget to also check whether binsize.bin exists at all.) Aside from that, I believe there is only one other aspect of the .rpg file format that has changed over the years which would prevent ohr-carthographer from working: before we had the current tileset animations the last two tiles in the tileset would animate automatically. That was replaced back in 1999 or 1998 so isn't worth supporting.
To export maps from an old game, just first run it through Custom to upgrade it to the latest format.
What was your problem about it not finding unlump.exe? Did you manage to fix that somehow?
Currently, the tool doesn't support games older than Ubersetzung (2007) because that's when the .MAP file format switched to a variable record length stored in binsize.bin. That's what the 'fixnum' error message you got is about. (To fix that by defaulting to the old length don't forget to also check whether binsize.bin exists at all.) Aside from that, I believe there is only one other aspect of the .rpg file format that has changed over the years which would prevent ohr-carthographer from working: before we had the current tileset animations the last two tiles in the tileset would animate automatically. That was replaced back in 1999 or 1998 so isn't worth supporting.
To export maps from an old game, just first run it through Custom to upgrade it to the latest format.
What was your problem about it not finding unlump.exe? Did you manage to fix that somehow?
I just uploaded an update addressing some of the issues brought up here
1. You can now use Microsoft Words-style inputs to specify a range of maps to print.
2. The game figures out a default map size for RPGs released before ubersetzung. More problems are bound to pop up the further back you go, so it's probably safest to run custom and auto-update your RPG to the most recent OHR version.
3. The mapper detects and uses the default master palette for your game.
I'm having a bit more trouble with the "unlump" issue. Basically, the program looks for unlump.exe in the directory of your RPG file, not the same directory as mapper.exe. For now, you can get around this by copying unlump.exe into your RPG directory.
1. You can now use Microsoft Words-style inputs to specify a range of maps to print.
2. The game figures out a default map size for RPGs released before ubersetzung. More problems are bound to pop up the further back you go, so it's probably safest to run custom and auto-update your RPG to the most recent OHR version.
3. The mapper detects and uses the default master palette for your game.
I'm having a bit more trouble with the "unlump" issue. Basically, the program looks for unlump.exe in the directory of your RPG file, not the same directory as mapper.exe. For now, you can get around this by copying unlump.exe into your RPG directory.
Last edited by RMSephy on Tue Nov 25, 2014 4:40 am, edited 1 time in total.
- Pepsi Ranger
- Liquid Metal Slime
- Posts: 1457
- Joined: Thu Nov 22, 2007 6:25 am
- Location: South Florida
I actually have been copying my RPG files into the same folder as MAPPER and UNLUMP. It hadn't worked before, but your latest patch fixed whatever was wrong with it. I still can't drop old RPG files into MAPPER--I do have to convert to RPGDIR for that--but for the most part everything is working out nicely. I've noticed two graphical glitches in my maps for Powerstick Man, but for the most part everything's working well now.RMSephy wrote:I'm having a bit more trouble with the "unlump" issue. Basically, the program looks for unlump.exe in the directory of your RPG file, not the same directory as mapper.exe. For now, you can get around this by copying unlump.exe into your RPG directory.
Here is the biggest glitch. It may or may not have to do with the map being numbered 101:
I've checked the tilemap in the editor and everything looks fine in there. So, MAPPER is interpreting something badly. But that's the biggest glitch that I've noticed. I've got one other map with empty tiles where my Layer 3 or Layer 4 tiles should be, but they're minor and mostly unnoticeable.
Anyway, great work on this program. As a reward for giving us something that we've probably needed for a long time, or certainly could've used, I'm gonna post the exterior and interior maps of the infamous "Anthill Canyon" from Tightfloss Maiden. (It's the one everyone gets lost in.)
Exterior Anthill Canyon:
Interior Anthill Canyon (Cave Network):
Underground Passage to the Forgotten Village:
Thanks so much for this program. It's awesome.
Place Obligatory Signature Here
Have a look at the minimap for that map in the map editor. You will see that it looks just like the image you posted. The problem is that the map has several layers which are disabled but contain garbage, but this tool doesn't know about disabled layers (and neither does the minimap screen, which is also a bug in game.exe IIRC). What I want to know is, why do those garbage layers look like they were mangled while resizing the map? Maybe it's a bug in the map resizer.Pepsi Ranger wrote:Here is the biggest glitch. It may or may not have to do with the map being numbered 101:
On the other hand the missing tiles you mentioned might be more serious. What are the map numbers? Could it be caused by a tricky tile animation with moves to another tile and then pauses permanently?
Last edited by TMC on Tue Nov 25, 2014 3:17 pm, edited 1 time in total.