Jump to content


Photo

Sahuagin bug


  • Please log in to reply
5 replies to this topic

#1 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 23 December 2011 - 04:34 AM

Sequence 3 of the file [mu]CGCWK.bam is corrupt. This is used by crossbow-wielding IWD Sahuagin when playing the walk algorithm: if an IWD sahuagin with a crossbow walks around for any extended period of time, the game crashes. This is actually a problem with the original Icewind Dale animation file, copied over to IA. (I noticed it in IWD-in-BG2). Why it doesn't crash Icewind Dale itself, I've no idea.

COPY_EXISTING [mu]CGSWK.bam override/[mu]CGCWK.bam
COPY_EXISTING [mu]CGSWKE.bam override/[mu]CGCWKE.bam

is a tolerable workaround.

#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 28 December 2011 - 09:16 PM

Odd. The original BAMs seem to check out ok with DLTCEP, though that doesn't mean they don't have an error somewhere. I wrote a BAM-checking utility but I don't think it ever made it to public release. The main thing it did was check for a frame positioned out of range. As in, instead of x=19 y=23 you may have an occasional frame of x=1019 y=23 which will cause a crash in the BG2 engine under certain circumstances. But I've no clue if that's the problem here... spot-checking a few frames didn't reveal anything out of the ordinary.

Offhand, it looks like you're proposing copying the club weapon sequence to the staff weapon sequence of the IWD sahuagin. Not necessarily "bad" if it "fixes" the problem (i.e. prevents a crash) but I couldn't find a crossbow sequence just from looking at the original files (msahcwk.bam and msahswk.bam in IWD) unless the crossbow is drawn so poorly it looks like a club.

Edit: oh and if you do get a crash (in the BG2 engine) does baldur.err report the message (assuming you have "Logging On=1" in baldur.ini)?

Edited by Miloch, 28 December 2011 - 09:18 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


#3 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 29 December 2011 - 03:35 AM

Odd. The original BAMs seem to check out ok with DLTCEP, though that doesn't mean they don't have an error somewhere. I wrote a BAM-checking utility but I don't think it ever made it to public release. The main thing it did was check for a frame positioned out of range. As in, instead of x=19 y=23 you may have an occasional frame of x=1019 y=23 which will cause a crash in the BG2 engine under certain circumstances. But I've no clue if that's the problem here... spot-checking a few frames didn't reveal anything out of the ordinary.

I eventually found it by viewing the file in Near Infinity. I think it's sequence 3; in any case, if you click through the sequences while Play is on, you'll see it fairly soon: some of the frames are a crazy size/shape. There may well be a simple hack that would fix it; I didn't really look.

Offhand, it looks like you're proposing copying the club weapon sequence to the staff weapon sequence of the IWD sahuagin. Not necessarily "bad" if it "fixes" the problem (i.e. prevents a crash) but I couldn't find a crossbow sequence just from looking at the original files (msahcwk.bam and msahswk.bam in IWD) unless the crossbow is drawn so poorly it looks like a club.

S is spear; C is crossbow. (And yes, it's not that easy to tell from the BAM sequences - though to be fair, it looks much better in-game.)

Edit: oh and if you do get a crash (in the BG2 engine) does baldur.err report the message (assuming you have "Logging On=1" in baldur.ini)?


Pass, sorry. (I'm using a computer over Christmas that isn't the same as the one I tested it on.)

#4 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 29 December 2011 - 09:48 PM

I see. Some of the frames in that sequence are as big as 400x400 pixels, which will crash BG2 (which has a maximum of 256x256 area for animation frames). I fixed it by cropping said frames down to reasonable dimensions. Very few had any real data, but that makes sense I guess - it is the west facing sequence. With the crossbow in the right hand of the creature, you will rarely see it when the creature walks west.

So this should work for a fix. For IA users, you can either drop it into the infinityanimations/content folder after extracting all packages (and before installing the mod) or you can just drop it into your override folder after installing the mod.

Attached File  µcgcwk.bam   11.73K   362 downloads

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 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 30 December 2011 - 01:04 AM

I see. Some of the frames in that sequence are as big as 400x400 pixels, which will crash BG2 (which has a maximum of 256x256 area for animation frames). I fixed it by cropping said frames down to reasonable dimensions. Very few had any real data, but that makes sense I guess - it is the west facing sequence. With the crossbow in the right hand of the creature, you will rarely see it when the creature walks west.

So this should work for a fix. For IA users, you can either drop it into the infinityanimations/content folder after extracting all packages (and before installing the mod) or you can just drop it into your override folder after installing the mod.

Attached File  µcgcwk.bam   11.73K   362 downloads

Cute, thanks. I'll drop it into Iwd-in-bg2 too, if you don't object.

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 31 December 2011 - 07:33 PM

I'll drop it into Iwd-in-bg2 too, if you don't object.

Of course, anyone can use whatever files I post here under the same terms as IA (unless you sell something, no real terms at all, as far as I'm concerned anyway).

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