DavidW Posted April 3, 2008 Share Posted April 3, 2008 Urrgh. I now know more about the structure of BAM files than I ever wanted to. (Which didn't take much, to be fair.) On the plus side, I've got a working prototype auto-converter: it takes a pair of filesets and transfers the IWD graphics into the BG2 ones. I've tested it with iron golems and they look very nice. I'll upload it once I've got it a bit more smooth. I'm sure there'll be glitches etc but I think it'll be a lot faster than hand-converting. (In fact, given that many IWD graphics are rather prettier, possibly there's a standalone mod?) Link to comment
CamDawg Posted April 3, 2008 Share Posted April 3, 2008 Urrgh. I now know more about the structure of BAM files than I ever wanted to. (Which didn't take much, to be fair.) On the plus side, I've got a working prototype auto-converter: it takes a pair of filesets and transfers the IWD graphics into the BG2 ones. I've tested it with iron golems and they look very nice. I'll upload it once I've got it a bit more smooth. I'm sure there'll be glitches etc but I think it'll be a lot faster than hand-converting. (In fact, given that many IWD graphics are rather prettier, possibly there's a standalone mod?) Kick. Ass. Link to comment
DavidW Posted April 4, 2008 Author Share Posted April 4, 2008 It's not perfect. I append the IWD data to the BG2 files, remap the references to the former, and don't worry that the latter is sitting around getting in the way. And I can't work out how to generate compressed BAMs. On the other hand, computers these days are so fast compared to IWD- (or BG2-) period ones that I'm not too worried. And the iron golems look cool. Link to comment
CamDawg Posted April 4, 2008 Share Posted April 4, 2008 OK, so here's the animation breakdown. These IWD animations are already in BG2 and can be ignored: mbeh - beholder mber - bear mcar - carrion crawler mcor - cornugon mdjl - genie w/ legs mdkn - demon knight mdog - dog meae - shambling mound metn - ettin mgic - ice golem mgla - glabrezu mgo1 - goblin w axe mgo2 - goblin w bow mgo3 - goblin elite w axe mgo4 - goblin elite w bow mler - lich, lerrel mliz - lizard man 2 hand mmin - minotaur mmum - mummy mmy2 - myconid, blue mmyc - myconid, red mno1 - neo-orog mno2 - neo-orog elite mno3 - neo-orog chief mogr - ogre mor1 - orc w axe mor2 - orc w bow mor3 - orc elite w axe mor4 - orc elite w bow mor5 - orc shaman mrak - rakshasa msa2 - salamander, frost msal - salamander mscr - scrag troll mshr - shrieker mska - skeleton, armored mskb - skeleton, boneguard mskl - little bg skeleton mskt - skeleton, tattered msli - slime mspi - spider mtan - listed as 'tanari' in IWD, but actually xyunomei, a marileth mtro - troll mwav - wailing virgin mwlf - wolf mwwe - water weird myu1 - yuan ti myu2 - yuan ti, elite myu3 - yuan ti, priest Wyverns need to be copied simply to get the color change (they're white frost wyverns in IWD): mwy2 - big wyvern mwyv - wyvern Some can be dumped directly into the override, as BG2 has IWD animation slots for them: mbbm - beetle, bombadier mbet - beetle mbfi - beetle, fire mbrh - beetle, rhino mcyc - cyclops mgh2 - ghoul mgh3 - ghoul 2 mgho - ghost mhis - mummy, histachii mli2 - lizard man 1 hand mli3 - lizard man king msh1 - shadow msh2 - shadow, buff mtic - troll, ice mtsn - troll, snow mum2 - umber hulk, vodyanoi mwi2 - wight 2 mwi3 - wight 3 mwig - wight mzo2 - zombie mzo3 - zombie 2 While the mbbr (boring beetle) animation is identical to the mbbm (bombardier beetle) one, they have different default soundsets so I've included it below as needing conversion. The mlic (lich) slot s claimed by Cuv to be a free IWD animation slot. However, mlic is the BG2 style lich--it's possible the two can co-exist (mmin is used by BG2 mind flayers and IWD minotaurs, for example) but if not then mlic needs to be converted. These need homes: man2 - animated plate 2 man3 - animated plate 3 mani - animated plate maru - arundel mba1 - barbarian warrior 1 mba2 - barbarian warrior 2 mba3 - barbarian warrior 3 mba4 - barbarian shaman 1 mba5 - barbarian shaman 2 mba6 - barbarian shaman 3 mbai - wylfdene mbbr - beetle, boring mbe1 - belhifet, demon mbe2 - belhifet, priest mcrd - creeping doom mdrd - drowned dead mele - elemental, earth melf - elemental, fire melw - elemental, water mgfi - giant, fire mgfr - giant, frost mgir - golem, iron mgve - verbeeg mhar - harpy mrem - remorhaz (polar worm) msah - sahuagin (small) msat - sahuagin (large) msee - seer msv2 - svirfneblin, no axe msvi - svirfneblin, axe mtsn - snow troll mumb - umberhulk mwdr - icasaracht dragon mwi4 - barrow wight myet - tundra yeti Link to comment
DavidW Posted April 4, 2008 Author Share Posted April 4, 2008 I've done a few more tests. Frost giants convert fine; so do fire elementals. Icasaracht doesn't: the frames are there, and you can see them in an editor, but they're not playing. At a guess, the images are just too big. (BG2 dragons appear to be split between several image files). Short of a fairly extensive manual hack I think you're stuck with reusing Adalon. IWD animations have different fall-down and get-up sequences, whereas the BG2 get-up sequence is the fall-down one played backwards. This occasionally looks odd (IWD has some nice dramatic sway-and-fall-down animations which don't work played backwards) but I assume we can live with this. (It's not as if the get-up animation is played that often.) I don't yet know if I can handle weapons. Probably. We need to make a list of unwanted BG2 animations that we don't mind overwriting, and match them to Obviously we can replace like with like a lot of the time, but not always. Link to comment
DavidW Posted April 4, 2008 Author Share Posted April 4, 2008 Another point: I'm not 100% sure what all the animations do. (And the IESDP isn't certain either). I'm currently mapping SD--> G1 WK--> G11 SC --> G12 GH --> G13 DE --> G14 TW --> G15 A1 --> G2 A2 --> G21 A3 --> G22 (reusing A1 where A3 isn't available) SP --> G25 (reusing A1 where SP isn't available) CA --> G26 (reusing A1 where CA isn't available) but I'm not sure what G23 and G24 do, so I'm not sure what to put into them. Link to comment
CamDawg Posted April 4, 2008 Share Posted April 4, 2008 I'm pretty sure the IESDP's speculation is correct, and that G23 and G24 are ranged attacks. Take a look at BG2 sahuagin (msah, msat)--their G23 and G24's are definitely their crossbow firing animations. Many of the first animation sequences are empty, though, so you'll need to skip ahead to see it. (Perhaps the empty ones are intended for bows or slings?) Link to comment
CamDawg Posted April 4, 2008 Share Posted April 4, 2008 We need to make a list of unwanted BG2 animations that we don't mind overwriting, and match them to Obviously we can replace like with like a lot of the time, but not always. Well, my first post is all IWD monster animations, so anything outside of those are fair game to be taken over for BG2. The two basilisk slots are BG2 style and open, so there's two we can use. The main thing is picking slots with the same foot circle size. This is from memory, but I believe the foot circle size shakes out like this. I've marked ones about which I'm not quite sure with asterisks. Human-size foot circles: maru - arundel --> pirate mba1 - barbarian warrior 1 --> doppleganger mba2 - barbarian warrior 2 --> doppleganger (greater) mba3 - barbarian warrior 3 --> ettercap mba4 - barbarian shaman 1 --> ghoul mba5 - barbarian shaman 2 --> revenant mba6 - barbarian shaman 3 --> ghast mbai - wylfdene --> shadow mbbr - beetle, boring --> gibberling mbe2 - belhifet, priest (aka Rev Bro Poquelin) --> troll (small) mcrd - creeping doom --> xvart mdrd - drowned dead* --> tasloi msee - seer --> zombie msv2 - svirfneblin, no axe --> imp msvi - svirfneblin, axe --> demilich mwi4 - barrow wight --> vampire (male) myet - tundra yeti --> vampire (female) Slightly larger foot circle, i.e. basilisk/skeleton warrior size: man2 - animated plate 2 --> ogre mage man3 - animated plate 3 --> basilisk mani - animated plate --> basilisk (greater) melw - elemental, water* --> elemental, air (greater) mhar - harpy --> golem, clay There may actual be one more size of foot circle in here, as I feel like the elementals are larger than the animated plates but smaller than giants. As I said, this is from memory so it may be worthwhile to actually verify these in game. Very large, i.e. fire giant size: mbe1 - belhifet, demon --> slayer mgfr - giant, frost --> melissan mgve - verbeeg* --> solar mrem - remorhaz (polar worm) --> antisolar Plus, of course, mwdr is super size but we're not converting it. If cmorgan wants some work, perhaps he can start looking at some foot circle sizes. Link to comment
DavidW Posted April 4, 2008 Author Share Posted April 4, 2008 Okay, here's the program. I haven't yet worked out how to do weapons; I'm fairly sure it's doable, but on the other hand is it possible just to use new slots for things with weapons? I've got it set up for command line interface but obviously that's easily changed for batch work - all the work is in macro.tph. You need to create a folder called IWDBG2, set up the mod in there, and put the IWD resources in IWDBG2/IWD_in. IWD_BG2_BAM_converter.zip Link to comment
CamDawg Posted April 4, 2008 Share Posted April 4, 2008 For weapons, I think the only really troublesome spots are the barrow wight (which use all melee weapons if memory serves) and the barbarian warriors, which use three each. All of the others are just animations with weapons already (frost giants) or none. It might be a problem for fire giants and sahuagin as well. Link to comment
devSin Posted April 4, 2008 Share Posted April 4, 2008 MLIC (lich,white) and MLIC (lich) can coexist. Although MLIZ exists, he's missing all his weapon types (BG2 only has the base BAMs). There is a size limit, and not all are guaranteed to fit (it's more of a width limit than a height limit IIRC). (See the TotSC tanar'ri animations for a more reasonable example of an animation split into several than the hideous dragon slots.) Note that wyverns, basilisks, ankhegs, and maybe one other animation I'm forgetting are inexplicably hardcoded to play sounds when attacking, so you don't want to use those slots unless you get rid of the sounds (otherwise, they'll still play the old sound). The carrion crawler (MCAR) is bound to MCWL for no apparent reason, so you'll need to use MCWL.2DA for the sequence sounds (yeah, needs to go in fixpack too). There's actually only one basilisk slot (the _GREATER is just a palette swap). The BG/2-style tasloi slot is free by default. Link to comment
DavidW Posted April 4, 2008 Author Share Posted April 4, 2008 We do weapons now (tested on firegiants, not that extensively otherwise). Go me. Link to comment
DavidW Posted April 5, 2008 Author Share Posted April 5, 2008 Incidentally, could someone have a go and see if this works on their system - I'd be reassured (otherwise maybe I'm building in some local weirdness). I think I can see a way to make it work without inflating the size of the BAM files now. Link to comment
DavidW Posted April 6, 2008 Author Share Posted April 6, 2008 Fun facts I didn't know about animations, #14: there's more than two sorts of animations. Some of the BG2-specific ones use an animation format like the iron golems, but some use a different one I haven't got my head around yet. The latter sort (which, e.g., doppelgangers use) has 8 facings rather than 16. My program will definitely choke on the latter sort. It's not a long term problem; I just need to build in more flexibility. Might not happen immediately though. In the meantime, Cam, if you want to incorporate the tool into the overall converter, only try it on 16-facing animations. (Quick and dirty way to identify them: are their BAM files divisible by nine?) Link to comment
DavidW Posted April 12, 2008 Author Share Posted April 12, 2008 Right... here's a hopefully-fully-functional animation converter for IWD-> BG2. Limitations: 1) I can only convert the conventional 9-facing monster animations. (So I can't convert, e.g., MDOP.) 2) I can't convert the (few) creatures whose images are all packaged together (e.g. Melissan). The package is basically a folder of stuff that can sit in the IWD_in_BG2 directory. It's got a small tpa file which you just INCLUDE where you want it, and a large macro file that the tpa in turn includes. There are some installation notes in the comments at the top of the tpa, but basically it needs to be run after Cam's installer has run, but it needs a few bits of Cam's installer to be commented out, and it needs all the animations to be collected in one directory - the override, by default. In the tables subdirectory are the control tables: -anim_code_maps.2da deals with animations already present in BG2 -anim_code_maps_2.2da deals with animations that can be directly dumped into BG2 (I think this file is slightly incomplete - it lacks wights and zombies?) - anim_mappings.2da says which IWD file gets written into each BG2 file - wpn_mappings.2da does the same for weapons - BG2_anims.2da lists BG2 animations with their names and code numbers (not every animation is listed or needs to be listed, just the ones we're going to swap). - IWD_anims.2da: as above, swapping IWD for BG2. The whole thing takes about 15 minutes to run (on a fairly fast computer). One fairly major problem which may be local: it intermittently crashes WEIDU, something I've never managed to do before. It quite rarely gets all the way through a conversion run without crashing. I work around this by coding it so that if you install again after a crash it picks up where it left off, but it's not ideal. No idea why it's happening. Failing a more elegant solution, we could try replacing the one big bit of WEIDU with a whole lot of AT_NOW calls to WEIDU with hot-generated tp2, but I'd like to check if it's just my machine (or Vista) being weird first. It generates about 100MB of animations, incidentally. At the moment they're dumped into a folder; in the long run I think we ought to be rebuilding the game's BAMs with the new animations. converter.zip Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.