Jump to content

Solving Drizzt animation crashes


pro5

Recommended Posts

I'm trying to find a way to work around the old issue - crashes happening when equipping certain weapons on Drizzt in vanilla BG2 engine.

 

More specifically, testing shows he causes a crash if equipped with weapons with SC (scimitar) or FS (flaming sword) equipped appearence type into his main hand weapon slot. Also, a crash happens when anything animated is equipped into his off-hand slot, but for now I'd like to at least focus on the main hand and scimitars. I can prevent off-hand crashes by using an undroppable offhand item, but that won't work for the main hand.

 

Drizzt does NOT seem to crash on any of the following equipped appearence types in main hand slot:

Long swords (S1), axes (AX), daggers (DD), bows (BW), crossbows (CB), short swords (SS), maces (MC), flails (FL), morningstars (MS), clubs (CL), warhammers (WH), katanas (S3), staffs (QS), 2-handed swords (S2), halberds (HB), slings (SL), spears (SP).

 

I.e. it's fine to equip pretty much anything on him, except the one weapon he has grandmastery with in Drizzt Saga. What gives?..

 

If equipped with anything from the above list, he'll be drawn wielding that weapon overlayed on top of the scimitars which are embedded into his base animation: http://s3.postimg.or...nj/Baldr000.png

 

^^^ This mace image he is wielding in the screenshot has to come from somewhere, right? ^^^

I was hoping the crashes aren't hardcoded (why the hell would Drizzt be hardcoded to crash when wielding scimitars?), but are caused by missing animation bams/cycles somewhere, in which case I could maybe substitute dummy bam files of my own during installation to prevent the crash.

 

The problem is finding out where these weapon animations are coming from, and thus how should I name my substitute bams so they'll be noticed and used by the engine when drawing Drizzt. Does anyone have any insight?

 

I've looked into the Infinity Animations docs on animation slots, but the only applicable thing there seem to be the BG1-2 character slots, described as:

CHARACTER BGII

9 Directions mirrored

A1 A2 A3 A4 A5 A6 A7 A8 A9 SA SS SX // 9 Seq.

CA // 72 Seq.

G1 (not split) // 99 Seq.

+ Armour Levels (4)

+ Arbitrary (originally WQ) Object anim.

 

Where CBGT is the animation identifier...

[CBGT][1]A1 (id + armour level 1-4)

[CBGT][1]INV

Objects are...

[bGT][s1]A1 (3 last letters of id + object id)

[bPT][s1]INV (second character is forced to P!!)

 

^ This behaviour is due to BGII animations using WQ objects with WP paperdolls. It only applies to INV files. For the character slots this P will always fall on the second unique letter (µ or ¢, with the two identifying letters remaining intact.)

 

Note that differing from other animation types equipping non-existent objects CRASHES for characters.

 

The BAM naming scheme for base animation seems to match partially: Drizzt's bams are prefixed with UDRZ1* and are split as A1, A3, A5, CA, G1, W2 + E versions of each. But I don't see any weapon animation bams in the game matching this part:

Where CBGT is the animation identifier

Objects are...

[bGT][s1]A1 (3 last letters of id + object id)

 

As far as I understand, for Drizzt this would translate into either DRZS1A1, or RZ1S1A1 (I'm not sure if the "1" in "UDRZ1" is part of the animation identifier in this case, or what it stands for otherwise). But no such bams exist.

Link to comment

Found it!

 

Adding the following files (I copied them from katana WPMS3* animations and just switched S3 to SC) seems to remove the crash when equipping a scimitar:

 

WPMSCA1.BAM

WPMSCA1E.BAM

WPMSCA3.BAM

WPMSCA3E.BAM

WPMSCA5.BAM

WPMSCA5E.BAM

WPMSCG1.BAM

WPMSCG1E.BAM

WPMSCW2.BAM

WPMSCW2E.BAM

 

Now if I just can figure out how to cheat him into using off-hand animations as well..

Link to comment

Do the katana animations display in addition to his embedded scimitars with that?

 

The offhand thing is hardcoded, I believe. The Drizzt animation is in the same category as the tutorial monks, skeletons, doom guards, Elminster, Sarevok, and for that matter, the BG1 character animations. It might be possible to overcome this (either by hacking or softcoding the m_weaponLeftHand value); in this case, it might be relatively trivial since you just want the weapon wielded, not displayed, I'm guessing.

Link to comment
Do the katana animations display in addition to his embedded scimitars with that?

 

The offhand thing is hardcoded, I believe. The Drizzt animation is in the same category as the tutorial monks, skeletons, doom guards, Elminster, Sarevok, and for that matter, the BG1 character animations. It might be possible to overcome this (either by hacking or softcoding the m_weaponLeftHand value); in this case, it might be relatively trivial since you just want the weapon wielded, not displayed, I'm guessing.

Yes for katanas, just like with any other weapon.

 

It might be possible to add the off-hand animations too, I think. Judging by this post by Andrea Colombo, it would involve adding missing udrz1a7, udrza8, udraz9 bam files for dual-wielding attack sequences, as well as filling in any missing object offhand animations (OA[789]) - probably the same scimitars and flaming swords, for one. But as mentioned in that thread, the scimitars would have to be ported from the non-WQL animation series, which use differently structured/grouped BAM files. So the frames would have to be exported and reimported into a new set of BAMs, matching the WQL series scheme.

 

I'm not sure if any other animation files - like those for walking, getting hurt, etc. - while while dual-wiedling would be needed, didn't look into it too much. It all seemed a bit too much work for little gain, so I just went with undroppable off-hand for Drizzt Saga release.

Link to comment

Now how did I manage to commit so many typos in a single post? Can't even edit it now. Corrected version:

 

Yes for katanas, just like with any other weapon.

 

It might be possible to add the off-hand animations too, I think. Judging by this post by Andrea Colombo, it would involve adding missing udrz1a7, udrza8, udrza9 bam files for dual-wielding attack sequences, as well as filling in any missing object offhand animations (OA[789]) - probably the same scimitars and flaming swords, for one. But as mentioned in that thread, the scimitars would have to be ported from the WQL animation series, which use differently structured/grouped BAM files. So the frames would have to be exported and reimported into a new set of BAMs, matching the non-WQL series scheme.

 

I'm not sure if any other animation files - like those for walking, getting hurt, etc. - while while dual-wiedling would be needed, didn't look into it too much. It all seemed a bit too much work for little gain, so I just went with undroppable off-hand for Drizzt Saga release.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...