Jump to content

Revenant maps

Sign in to follow this  

Recommended Posts

Hey all, I watched the Revenant video a few days ago and I didn't have much else to do (zing), so I figured I'd take a shot at generating images of the game's maps. It's got a nice art direction, so why not? The good news: I worked out the automaps! The bad news: I couldn't figure out the full-resolution maps. I'll post what I managed to piece together in case anyone else wants to give it a shot, though.

 

So here are the actual maps; sorry that they're oddly-sized, I was lazy and used what I guess is the game's coordinate system, so I wound up just copy/pasting the map parts of some giant, mostly-black bitmaps.

 

http://imgur.com/a/s77l5

 

I generated those from the .bmp files in the Ahkuilon.rvm/Automaps folder. At first I didn't see any images at all, so I tried just grepping for '[mM]ap' in that file since it was one of the biggest. It didn't have much information, but a bunch of lines started or ended in 'PK', and some googling told me that those were the initials of one of the creators of the .zip file format. So I tried unzipping it. Believe it or not, that actually worked - this game's resource files are just renamed .zip archives! I wouldn't be surprised if that's a pretty common practice - I mean, why write your own system to compress and index tens of thousands of files?

 

So the module file contained about 3,000 64x64 pixel bitmaps with names like, '5_8_34.bmp'. It turns out that those numbers represent the map number, and an X,Y grid coordinate. So you can just loop through them and fill in a big image for each level one 64px tile at a time. This is the python script I used if anyone is interested, but it's hack-y and just does the bare minimum.

 

http://pastebin.com/V6Xvz7hq

 

I think the coordinates of maps in similar areas are relative to each other, so you could probably generate more complete maps by overlaying the right ones. You should be able to easily do that just by changing the range of 'n' and moving the 'new_im' creation and saving outside of the loop.

 

Unfortunately, the automaps are really low-res. It's better than nothing, but the actual maps are stored in .DAT files under /Map which - and this is just guesswork - seem to specify coordinates for the placement of images and game elements. The 'imagery.rvi' file is also just a zip file, and it contains all of those images, but they are all in '.i2d' format. I have no idea what that is and neither does google, so it might be a proprietary format. The headers seem to always start with the same 4 bytes, 0x43 47 53 52, but that's not a lot to go on. I tried importing them as raw RGB data, but that just looked like gibberish no matter how I massaged it. The game was 16-bit though, so...well, I don't know. Image compression is black magic to me. The 3D character models are '.i3d' files which might be associated with a toolkit called Houdini, but I couldn't make heads or tails of them.

 

Anyways, it was getting late at that point and I gave up. If anyone's seen those types of files before, I'd be interested to hear what they are. And hey, at least the automaps are something.

Share this post


Link to post

Ah okay, so this is the automap data (I think I couldn't even get that working in the episode). Not as good as the full thing, but definitely cool. I actually plan on discussing the maps when I get to the followup episode.

Share this post


Link to post

Yeah, it's just the automaps. The map data is stored with the same sort of coordinate filenames as the automaps, so I think it would be pretty doable to generate images of them if the assets were jpegs or something. I couldn't find out anything at all about the i2d format, though. C'est la vie.

Share this post


Link to post

Couple of useful tools for this: https://www.moddb.com/games/revenant#downloadsbrowse
image.thumb.png.9ab8d84498a8dc901bc8c22828a000fb.png

the Map format reference is of particular interest: https://docs.google.com/document/d/1WAAecVsqAqZGLR4oOd3tpel7QC0YjrZOVuqwYt-sLnw/edit

Also ingame builtin editor is of interest (press enter in game, type "lookunderthehood" and press F12)

I don't have time to dive into all this now, but leaving my findings here for someone to pick up.

Share this post


Link to post

based on `map sector file format` doc, i was able to conjure up this Modules/Map/*.dat file format spec: https://pastebin.com/XeMvt9aw

sadly, i2d files are still a mystery to me. but thanks to this work: https://www.moddb.com/mods/the-forsaken/images/example-of-dat-images#imagebox image files with .dat extension (mostly in root game folder) are quite easy to extract, but they are not relevant for the task of stitching together a map (they mostly have game UI elements). a draft version of the file spec for images.dat files is here (its WIP, but with a bit of work it can be usable): https://pastebin.com/r52j4Wbt


so, at this moment 2/3 pieces of the map extraction pipeline are possible (first, extract all *.rvr files as zip files that you can find in your game dir and sub dirs):

  1. read Modules/Map/*.dat files and extract TILEs from it (with coordinates, rotation, etc) - DONE (use https://pastebin.com/XeMvt9aw KaiTai scheme to generate a parser for your language of choice or just use https://ide.kaitai.io/ to check it out first)
    image.thumb.png.21d0e8851bc21584f0b64c1b17e75b29.png
     
  2. Using `unique_id` of each TILE in a Modules/Map/*.dat file, get the actual tile texture path - DONE
    (open `class.def` file in game root folder and search for 0xblablabla unique_id that you got from the tile on the map in step 1)
    image.thumb.png.c6a44a30574647b17263adac260772f4.png
     
  3. Read the Imagery from the texture in path Imagery/Folder/file.i2d - NOT_DONE
    I've tried to reverse engeneer the format myself, but was not succesful in this yet. Any help of either reverse engeneering from scratch or better yet, somehow downloading this file https://web.archive.org/web/20000817185014/http://tux.telefragged.com/file.pl?filename=fileformat.zip&dir=telefragged/revenantqs/
    If you know where to find it, it would be tremendously helpful in achieving step 3 here.
    image.thumb.png.c2e45a20e6417df2fdc8183ded6c43ad.png
    it's a:
    Quote

    Document detailing the structure of I3D and I2D files to allow programmers to access the files. The file is in .doc format, and expands to about 60K.

    Anyway, I started a very drafty file spec for i2d files here (but it's mostly trash at the moment): https://pastebin.com/UqCXNLry
     

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in the community.

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


  • Who's Online   0 Members, 0 Anonymous, 86 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

This website uses cookies, as do most websites since the 90s. By using this site, you consent to cookies. We have to say this or we get in trouble. Learn more.