OHR tilemap exporting tool

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

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).
User avatar
RMSephy
Metal Slime
Posts: 356
Joined: Mon Dec 21, 2009 5:56 pm

Post by RMSephy »

Aha, that might fix the problem. (And good catch on the animation range bug).

I'm out of town for the weekend (and I didn't bring my laptop with me), but I'll test and commit TMC's changes once I get back on Monday.
User avatar
RMSephy
Metal Slime
Posts: 356
Joined: Mon Dec 21, 2009 5:56 pm

Post by RMSephy »

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.
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

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.
Definitely much better than before. I can actually get the thing to compile my RPGDIR folder.

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
I think that would be helpful, too.

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:

Image

One of the game's later areas (still unfinished), Cannonball Harbor:

Image

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
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

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.
Attachments
mapper error 3.png
mapper error 3.png (10.45 KiB) Viewed 3286 times
Place Obligatory Signature Here
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

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?
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

I tried it out and yay!

Image

Image

Though I must say that the maps seem a little bit empty without NPCs...
Sent from my iPhone
User avatar
RMSephy
Metal Slime
Posts: 356
Joined: Mon Dec 21, 2009 5:56 pm

Post by RMSephy »

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.
Last edited by RMSephy on Tue Nov 25, 2014 4:40 am, edited 1 time in total.
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

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.
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.

Here is the biggest glitch. It may or may not have to do with the map being numbered 101:

Image

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:

Image

Interior Anthill Canyon (Cave Network):

Image

Underground Passage to the Forgotten Village:

Image

Thanks so much for this program. It's awesome.
Place Obligatory Signature Here
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

This thread makes me wish I'd made a game with maps worth looking at. Fantastic work, Sephy.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Pepsi Ranger wrote:Here is the biggest glitch. It may or may not have to do with the map being numbered 101:
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.

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.
User avatar
Sparoku
Metal Slime
Posts: 309
Joined: Tue Jun 18, 2013 3:19 pm
Location: Dairy Queen
Contact:

Post by Sparoku »

Gizmog wrote:This thread makes me wish I'd made a game with maps worth looking at. Fantastic work, Sephy.
Ditto. :zombie:
"One can never improve enough nor should one stop trying to improve."
User avatar
Matokage
Slime Knight
Posts: 275
Joined: Sat May 26, 2012 11:48 pm
Contact:

Post by Matokage »

I got a problem. I can't find the /maps folder, where would it be located?
"I can't buy food with glory"
User avatar
RMSephy
Metal Slime
Posts: 356
Joined: Mon Dec 21, 2009 5:56 pm

Post by RMSephy »

The /maps folder should be in the same directory as your RPG file.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Really? Under Linux it gets created in the current working directory. If you drag-drop someone onto an .exe under Windows does that set the working directory to that file's location?
Post Reply