Edited by leahnkain, 02 April 2008 - 10:20 PM.
Lionheart-Extracting the Maps
#1
Posted 22 March 2008 - 05:56 PM
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#2
Posted 29 March 2008 - 07:32 AM
I hacked around some more to try to find an editor or something. I came across this suggestion there is a development .exe of the Velocity Engine (used in this game as opposed to IE) but I see no evidence for that on the disks or in the installed folder. There is also suggestion the maps are JPGs, but if so, they're all compiled in that huge data file which I can't open (too big for application memory I suspect, even though I have 4 GB).
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#3
Posted 30 March 2008 - 06:24 AM
Hummm, IIRC, you can just unzip the main data folder.
And unzipping everything into a folder by the same name, and renaming the original file, well, you can just start editing... and ehh, images...
Well, no idea what format you'll find the maps in. x]
#4
Posted 30 March 2008 - 08:28 AM
I looked at this some more. You can get data files out of data.dat, but you need a high-grade extractor - I don't think zip or rar will handle it. I managed to get the subfiles and look at them.Well, no idea what format you'll find the maps in. x]
The maps appear to be in a proprietary .frm16 format. I peered at it with a hex editor... it vaguely resembles the BMP format or maybe the MOS format the IE area graphics are in. Each area is accompanied by an "intermediate" .frm16 and a .way file. These might be the equivalent of the IE WED and ARE files, but I haven't really looked at them yet.
This is a summary of the BMP format:
Header (54 bytes) Offset Size Description 0x00 2 Signature ('BM') 0x02 8 File size in bytes 0x0a 4 Data offset (36) 0x0e 4 Info header size (40) 0x12 4 Width in pixels 0x16 4 Height in pixels 0x1a 2 Planes (1) 0x1c 2 Bit count 0x1e 4 Compression (0) 0x22 4 Data size 0x26 4 Horizontal pixels/meter 0x2a 4 Vertical pixels/meter 0x2e 4 Colors used (0) 0x32 4 Colors important (0) 0x36 x Image data (where x = data size)And this is my guesswork on the FRM16 format:
Header (28 bytes) Offset Size Description 0x00 2 Signature (1032) 0x06 2 Width in pixels (portraits = 90, areas = 779) 0x08 2 Height in pixels (portraits = 111, areas = 330) 0x0a 2 Unknown (variably 0, 1182, 1565, 2624, 3711, etc.) 0x0c 2 Unknown (64 or 68) 0x10 4 Data size (areas = 515496-514140 = 1356/54C) 0x24 4 Data size (redundant) 0x28 x Image data (where x = Data size) y z Index data? (where y = file size - (data size + 28)For frm16 areas, each element in the image data takes two bytes (same as 16-bit high-color BMP encoding). Since all areas are 779 * 330, the full data size is 257070 * 2 = 514140. If the area if physically smaller than this, blanks are padded with zeroes (black).
The index data seems to just follow a standard progression of integers that gets larger as the file size does. For example, a smaller file has 4, 10, 16, 22, 28, 36, 42, 67, 92, 98, 123, 131, 156, 181, 206, 214. Not sure what this means as it isn't even a standard progression. This is for a 12x16 icon though, so it could be related to the row data. Might also have something to do with the unknown at 0x0a - possibly some sort of palette data. I just discarded it since I didn't know what to do with it.
I wrote a little WeiDU snippet to convert the FRM16 areas to BMPs.
COPY ~sourcemap.frm16~ ~destmap.bmp~ PATCH_IF (SOURCE_SIZE > 0x7dda7) THEN BEGIN WRITE_SHORT 0x0 19778 //Signature (BM) WRITE_LONG 0x2 514854 //File size (0x7db26) INSERT_BYTES 0x6 12 WRITE_BYTE 0xa 54 //Data offset (0x36) WRITE_BYTE 0xe 40 //Info header size (0x28) INSERT_BYTES 0x14 2 INSERT_BYTES 0x18 2 WRITE_SHORT 0x1a 1 //Planes WRITE_SHORT 0x1c 16 //Bit count (0x10) INSERT_BYTES 0x20 2 WRITE_LONG 0x26 0 //Horizontal resolution WRITE_LONG 0x2a 0 //Vertical resolution DELETE_BYTES 0x36 4 READ_LONG 0x22 ds //Data size fs = ds + 0x36 //File size (data + header) rs = ds + 0x28 //Original size (data + old header) ns = SOURCE_SIZE - rs //Index size (old file size - original) DELETE_BYTES fs ns //Delete index WRITE_LONG 0x22 514800 //Data size (0x7daf0) FOR (r = 512636; r > 54; r -= 1558) BEGIN INSERT_BYTES r 2 END ENDAnyway, this is what I ended up with for the Port District:
It's supposed to look something like this (from GameBanshee):
So my conversion is obviously a bit skewed, the palette is a bit off, and I had to flip it in PSP (the FRM16 row data is obviously reversed from BMPs). But I'm surprised I got a readable BMP at all from my low-level hackery. Maybe I can refine the conversion routine, but it probably requires a techno-guru... it's a bit much for my poor orcish brain. I'm attaching the original frm16 file and my bmp if anyone wants to try to figure more about the format.
portdist.bmp 754.15K 750 downloads portdist.frm16.txt 503.41K 654 downloads
You can drop the .txt extension from the .frm16 file. It is not that readable in a text editor unless you have one that also supports hex (PSPad for example).
I know you didn't ask for the Port District, leahnkain, but it looked like one of the easier maps to try this on. If we can figure out the frm16 format, we can probably come up with a routine to convert any and all areas - maybe the animations too.
Edit: WeiDU updated (see below for results)
Edited by Miloch, 02 April 2008 - 11:27 AM.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#5
Posted 31 March 2008 - 04:34 PM
Edited by leahnkain, 31 March 2008 - 05:08 PM.
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#6
Posted 02 April 2008 - 11:25 AM
I tried one of these converters and got about 36 kinds of rubbish. Tried a few more - no luck with them either. It looks like the Fallout .frm format is more for animations, kind of like .bam files for IE so I don't think it's at all similar to frm16.Sorry to take so long to reply. Miloch do you think a frm16 to .bmp for fallout can be converted to Lionheart?
On the other hand, I updated my WeiDU snippet to insert a couple extra bytes after each row and it worked like a charm. After I flip it to reverse the rows (BMPs are upside-down I found out), I get this for the Temple District:
Which is pretty good, compared with the GameBanshee map:
Another problem with screen shots is that you'll have a lot of dark space where you can't see, like above. This is in addition to the other issues I mentioned with screen shots.
So we just need to figure out how to fix the palette and then see how the game translates the smaller maps to bigger ones. I'm not quite sure how that works, but BG seems to do the same thing for .mos files, because they aren't nearly as large in the files as they are on screen.
In the meantime, maybe a moderator can move this to IE Modding Help or perhaps Layers of Reality (though it's probably more technical than artistic). It'll probably get more serious interest there than as a Recreation Room topic, and I'm not sure I can figure this all out by myself.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#7
Posted 02 April 2008 - 12:06 PM
- Liam
Modding Projects
Complete:
Arath NPC - Nephele NPC - Xulaye NPC - Iylos NPC - Ninde NPC - Darian NPC - Yeslick NPC - Adrian NPC - Dace NPC - Valerie NPC - Isra NPC
Viconia Friendship - Mazzy Friendship - Imoen Friendship - Yoshimo Friendship - Sarevok Friendship - Neera Expansion
IEP Extended Banter
Sarevok Romance
Haer'Dalis Romance
In Progress:
Khadion NPC - Delainy NPC - Sarine NPC
#8
Posted 02 April 2008 - 03:41 PM
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#9
Posted 02 April 2008 - 10:28 PM
#10
Posted 03 April 2008 - 06:41 AM
I think I have all the source files - I need help actually with the translation formula. I'm thinking now that these .frm16 files are the mini-maps, like .mos files, and maybe the bigger areas are stored in the .way files. But even those don't really look big enough, and they don't seem to be compressed or anything. We really need a 'VESDP' (Velocity Engine Structures Description Project) like what they did for the IESDP.Well, I have the game at home now (bargain binīs best buys) and am willing to do the raw extracting and to upload it once you are happy with the translation formula if you want Miloch
Screenshots may still be an option, if you want to take some of those. I just think figuring out the format might be quicker in the long run, especially if we're going to be converting more than one of these areas.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#11
Posted 03 April 2008 - 07:21 AM
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#12
Posted 03 April 2008 - 11:18 AM
Canīt help there -I only half understand the code you wrote and I would have no idea of what to change to get it right, but once you figure it out, I will gladly help with the mindless tedium of conversion/sorting/uploadingI think I have all the source files - I need help actually with the translation formula.Well, I have the game at home now (bargain binīs best buys) and am willing to do the raw extracting and to upload it once you are happy with the translation formula if you want Miloch
...
I just think figuring out the format might be quicker in the long run, especially if we're going to be converting more than one of these areas.
#13
Posted 03 April 2008 - 05:40 PM
Well, I have the game at home now (bargain binīs best buys) and am willing to do the raw extracting and to upload it once you are happy with the translation formula if you want Miloch
Tassadar88 would it be possible for you to upload the .way files and the frm16 so the other modders and myself who don't have the game can help out?
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#14
Posted 03 April 2008 - 11:42 PM
I will get home sometime late tomorrow, then Iīll upload it. I will only give the DL access upon PM request to keep the "ZOMGWTF!!! U R PIRATZORRING TEH GAME!!" feel of it to the lowest level possible. (besides, if I leave out the rest of the game content, it will be unplayable anyway so hopefully noone will mind )Well, I have the game at home now (bargain binīs best buys) and am willing to do the raw extracting and to upload it once you are happy with the translation formula if you want Miloch
Tassadar88 would it be possible for you to upload the .way files and the frm16 so the other modders and myself who don't have the game can help out?
#15
Posted 06 April 2008 - 08:40 AM
tempdist.rar 619.2K 628 downloads
Edit: Here are some more samples, by request. Includes same four files as above. Montaillou:
montaill.rar 638.19K 590 downloads
Goblin Camp:
goblcamp.rar 349.13K 581 downloads
This includes one of the goblin house interiors for comparison of a smaller area:
Here is an archive with a few sample portraits and textures, for further comparison.
samples.rar 57.18K 563 downloads
And finally, here is my frm16>bmp converter in WeiDU mod format, along with another sample map. It works on all the minimaps, but gives garbage bitmaps for portraits etc.
lionmaps.rar 497.76K 640 downloads
Edited by Miloch, 06 April 2008 - 07:25 PM.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#16
Posted 06 April 2008 - 10:25 PM
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#17
Posted 08 April 2008 - 03:55 AM
#18
Posted 11 April 2008 - 03:46 AM
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/
#19
Posted 11 April 2008 - 06:35 AM
#20
Posted 11 April 2008 - 07:02 AM
Edited by leahnkain, 11 April 2008 - 07:02 AM.
Longing for the old pen and paper modules of the 70's and 80's. Experience AD&D's greatest adventures using the infinity engine: Visit our homepage at http://classicadventuresmod.com/