Jump to content


Photo

Issues with Creature and Animation Soundsets


  • Please log in to reply
94 replies to this topic

#21 skellytz

skellytz
  • Staff
  • 578 posts

Posted 19 March 2016 - 05:58 PM

If you remove the sounds from the CRE file, do any of the 2das you listed get used?  Or is the engine ignoring the 2das anyway?

 

It's not a matter of soundset priority, here. The following are simply not coded in the executable and won't ever work without patching it:

 

MCAR (it's coded as MCWL and BG2 Fixpack has a simple fix for this)

MBER2

MBER3

MBER4

MDOG2

MDOP2

MGHL2

MGH2 (it's coded in but the animation itself isn't)

MBAS2

 

... and maybe some others.

 

OK, look -- long story short: I'm already coding stuff for the new release and I only have ambients and soundsets left to do. I'm at the crossroads with soundsets.

 

I can add about 10 BG1 Simple Monster codes to Infinity Animations to resolve those issues (the number's grown up to 10 now and that's a lot to ask for). Or I can safely code everything so that it's just like in the original BG1, which means disabled alternative attack sounds for the few aforementioned monsters. Regardless of the decision, all the other BG1 and BG2 monsters will feature updated 2DA soundsets and restored alternative attack sounds. How cool is that?

 

Naturally, I'm leaning towards the second option; it's only a handful of sound effects. Maybe one day somebody will be able to patch the EXE for the original games.

 

Let's see Beamdog's response for BGEE.

 



#22 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 20 March 2016 - 12:58 AM

It's not a matter of soundset priority, here. The following are simply not coded in the executable and won't ever work without patching it:
 
MCAR
Are those sound files or .2da references ... aka what are they ? If it were a sound file, you would use the extension....
It's likely that the .2da reference is there just for fun. In the original game that is...
It's easier just to just patch the needed .cre files and do it with good sound file.

Now, the Infinity Animations won't likely be updated... until Miloch gets back or something similar. As the Infinity Animations .exe patching and files need to be renamed anyways to fix the non-ANSI codec(aka Latin) character usage... for more compatibility with non-American Windows systems.

Edited by The Imp, 20 March 2016 - 12:59 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#23 skellytz

skellytz
  • Staff
  • 578 posts

Posted 20 March 2016 - 05:58 AM

Are those sound files or .2da references ... aka what are they ?

 

That's a good question and I apologize; I haven't really explained it before.

 

Imagine that it works like a table which assigns 2DA soundset codes to animation codes (including palette variants). Here's a representation of what a proper table looks like:

 

MSPI
MSPI_GI --> MSPI.2DA
MSPI_HU --> MSPI2.2DA
MSPI_PH --> MSPI3.2DA
MSPI_SW --> MSPI4.2DA
MSPI_WR --> MSPI5.2DA

 

These are all the spider palette variants and they all have unique 2DA codes assigned to them in the EXE.

 

Note that the first animation entry, "MSPI" isn't actually available as an animation in-game. Only the palette-swap variants listed underneath it are coded in as animation resources.

 

BG1 slime variants also have individual codes and their table looks similar.

 

Now look at the table with wolf animation variants. It's been coded like this:

 

MWLF
MWLF_WO
MWLF_DI
MWLF_WI --> MWLF2.2DA
MWLF_VA --> MWLF4.2DA
MWLF_DR --> MWLF3.2DA

 

Here's a very important point: if there is no unique 2DA code assigned to an animation code, the game engine defaults to the exact same code for the (base) animation and it's 2DA soundset.

 

The regular gray wolf animation, "MWLF," doesn't have any unique code assigned to it, so it defaults to "MWLF.2DA."

 

The worg palette variant, "MWLF_WO," doesn't have any code assigned to it, either, so it defaults to base animation code, "MWLF.2DA."

 

The dire wolf palette variant, "MWLF_DI," doesn't have any code assigned to it so it defaults to base animation code, "MWLF.2DA."

 

Now I think you understand why they share the same 2DA soundset.

 

Take a look at the bear table:

 

MBER
MBER_BL
MBER_CA
MBER_PO

 

Yeah, that's right. They all default to "MBER.2DA."  :doh: And it's the same issue with ghouls/ghasts, dopplegangers, basilisks, dogs and wyverns.

 

This is the Carrion Crawler table:

 

MCAR --> MCWL.2DA

 

Here they simply mixed up the names or they had plans to have a different palette variant for the Crypt Walker. In any case, the default "MCAR.2DA" has been overridden with "MCWL.2DA."

 

I believe they initially wanted to assign unique codes to all the BG1 monster palette variants.


Edited by skellytz, 02 April 2016 - 03:43 PM.


#24 skellytz

skellytz
  • Staff
  • 578 posts

Posted 02 April 2016 - 05:18 AM

Here are some additional notes on attack sounds:

 

CRE vs. 2DA

 

Listen closely to any creature's attack sound audio files and take a look at the creature's attack animation cycles. It's clear that the majority of attack sounds match specific animation cycles frame-by-frame. For example, the wolf animations distinguish between bites and leaps. There are audio files which match each attack type perfectly.

 

First of all, as I mentioned before, the in-CRE soundset doesn't recognize any attack sound slots other than the first one (ATTACK_1); however, even if the engine recognized and played these sound effects back, they wouldn't match the animations they had been created for. The sounds would be simply played back at random unless somebody patched the executable to do otherwise.

 

This is why the in-CRE soundset is vastly inferior to the in-2DA one. The latter allows you to set attack sounds for the three attack animation types individually (slash, backslash, jab). Naturally, as I described in my first post, the animation-specific attack slots are bugged on every single platform. The only way to fully utilize the in-2DA soundset is to play the original BG2 (or BGT) with TobEx, which fixes these engine bugs.

 

Unfortunately, TobEx isn't available for the Enhanced Editions and Beamdog seems reluctant to include more of its features.

 

I've just finished patching every single BG1 monster 2DA soundset to use alternative attack sounds and I have to say this is the first time I've heard the respective audio files make any sense in relation to attack animations.

 

I also have some good news and some bad news about the recent 2.0 patch for the Enhanced Editions:

 

EE 2.0 patch

 

Good news is that the new INI-file soundset system recognizes BG1 monster palette variants. This means that, potentially, all the monsters can have unique soundsets.

 

Bad news is that none of the other bugs have been addressed. What does it mean?

 

- the in-CRE soundset still allows for only the first attack sound slot to be played back.

- the in-INI attack sounds still overlap the in-CRE ones.

- the in-INI middle-column sounds are completely ignored (eg, sound1 ignored sound3 or sound1 ignored ignored sound4).

- the in-INI animation-specific attack sounds don't work, so audio files never match their respective attack animations.


Edited by skellytz, 03 April 2016 - 04:39 PM.


#25 skellytz

skellytz
  • Staff
  • 578 posts

Posted 21 January 2017 - 06:59 AM

More notes and why it's taking so long

 

If you've read the previous posts, you probably get the idea behind the 2DA soundset tweaks I'm working on:

 

1. Remove battle cries from ATTACK slots (unless they actually make sense -- 99% don't).

2. Add/change sound effects in SLASH, BACKSLASH, JAB slots so that they fit their respective animations.

3. Synchronize sound effects with animation frames.

4. Remove redundant NOSOUND slots (unless the creature attacks too fast to play the full attack sound effect).

5. Add missing SELECT2 slot to pretty much every single 2DA monster soundset.

6. ...

 

So it's a system. Unfortunately, there are more issues when it comes to attack animations/sound effects.

 

Monster weapon ITMs and their importance in relation to soundsets

 

Attack animations can be adjusted by tweaking values in abilities of weapon ITMs. These are:

 

Overhand swing: [%] (SLASH animation/sound effect)

Backhand swing: [%] (BACKSLASH animation/sound effect)

Thrust: [%] (JAB animation/sound effect)

 

The values are percentages; they represent the chance for each animation to be played along with the sound effect assigned to it in the 2DA soundset.

 

For example, a creature wielding a Short Sword (SW1H07) has a 10% chance to use SLASH animation, 25% to BACKSLASH and 65% to JAB.

 

A monster with a Bastard Sword (SW1H01) has 50% to SLASH, 50% to BACKSLASH and 0% to JAB.

 

So what does it mean?

 

If a monster is wielding a weapon with disabled animations, it won't use the frames and sound effects that had been previously designed specifically for it.

 

Take a look at the Dancing Sword animation (Code: MDSW; e.g., Ras or Spectral Blade). It has frames for slashes, backslashes and jabs. They all look very cool, right? Somebody spent a lot of time working on those. Now look inside SWORD02.cre (Ras) and SWORD68.cre (Spectral Blade). They both use weapon ITMs with disabled JAB animations. The player never gets to see the JAB animation or hear it's accompanying attack sound effect. Wasted resources.

 

And unfortunately, there are quite a few creatures suffering from the exact same issue. It's typically because the devs re-used exisiting item templates or assigned generic weapons to special-case creatures. For example, Githyanki wield two handed swords in one hand. The Githyanki animation (MGIT) has all the attack frames (SLASH, BACKSLASH and JAB), but the majority of CREs using the animation have generic Bastard or Two Handed swords assigned to primary weapons. These weapon ITMs are usually 50% SLASH and 50% BACKSLASH -- again, no JAB animation/sound effect. What an oversight.

 

Wait, but there's more

 

Let's reverse the above. A creature animation has only SLASH and BACKSLASH attack frames (most BG1 and IWD-ported monsters). That is, it also doesn't have attack sound effects designed for JABs.

 

- BG1 animation format usually has duplicate BACKSLASH frames in place of JAB frames. If JAB frames aren't present, SLASH frames are played instead.

 

- BG2/IWD format will do the following: if the weapon calls for non-existing JAB frames, use either SLASH or BACKSLASH at random.

 

Let's take a look at the Wolf animation (MWLF). It has only unique SLASH (bites) and BACKSLASH (leaps) frames -- the JAB frames are duplicates of BACKSLASH.

 

Go inside any Wolf CRE file. What weapon ITMs do these creatures usually have? Generic P1-x.itm with 34% to SLASH, 33% to BACKSLASH and 33% to JAB.

 

Now you understand why Wolves leap at you much more often than they bite. Bears paw you much more often than they bite. Basically, many BG1 creatures unnecessarily use certain attack animations more often. By extension, you get to hear the accompanying sound effects much more often than anything else.

 

While BG1 monsters aren't that much of a big deal, consider BG2 and IWD animations.

 

Look at the Ice Golem animation (MGIC). It has unique SLASH (two-arm-smash) and BACKSLASH (punch) frames with accompanying attack sound effects. No JAB frames/sound effects, right? But check out what weapon ITMs this animation typically has: a generic B2-xxMx.itm with 34% to SLASH, 33% to BACKSLASH and 33% to JAB. So now when the weapon calls for JAB frames, the animation will use SLASH or BACKSLASH frames at random but play JAB attack sound effect from the 2DA soundset. This causes inconsistency -- some smashes will sound like punches.

 

It's all because the devs used generic weapon items/templates for creatures that need special treatment when it comes to attack animations and sound effects.

 

I'm slowly working on all the affected monsters to make sure they utilize their resources properly. That means checking all the CREs for ITMs with invalid attack percentages, tweaking 2DAs, modyfing or copying->renaming->assigning ITMs, then going in-game and checking each animation individually to see if it all makes sense. Tedious. Worth it :)


Edited by skellytz, 29 January 2017 - 02:28 PM.


#26 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 21 January 2017 - 08:38 PM

Very worthwhile effort, imo.  Looking forward to its release.



#27 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 22 January 2017 - 04:41 AM

Yeah... looks like worthwhile .. but could you skellytz show a little bit code you have ?

I ask cause I know it's usually hard to make new things, and there is likely a lot of help around... IF you ask. But you have to ask first.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#28 skellytz

skellytz
  • Staff
  • 578 posts

Posted 26 January 2017 - 09:27 AM

Very worthwhile effort, imo.  Looking forward to its release.

 

I'm not playing the game until I get it done :P Basically, what you've been listening to all these years are monster battle cries instead of proper attack sounds effects. If you use TobEx, it's a messy combination of the two. I'm cleaning up this mess.

 

Here's a cool find. You know how Ankhegs pop in and out of the ground? There are audio files present for these animations (ANKHG11.wav and ANKHG12.wav), but they aren't used properly in any version of the game. Instead, the devs assigned them to idle sound effects, which doesn't make much sense.

 

Now this is the beauty of 2DA soundsets. See those EMERGE and HIDE entries that nobody ever bothered to use? Yup, you know what to do. Works like a charm.

 

There are some other problems when it comes to Ankhegs, but let's just say I got around them.



#29 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 26 January 2017 - 10:21 PM

I am really looking forward to your release, skellytz!

 

I so wish Ascension64 was still with us though. He could be able to contribute so much...



#30 K4thos

K4thos
  • Modder
  • 315 posts

Posted 27 January 2017 - 03:18 AM

Now this is the beauty of 2DA soundsets. See those EMERGE and HIDE entries that nobody ever bothered to use? Yup, you know what to do. Works like a charm.

these sounds can be also assigned in EE 2.x games by modifing INI files.

 

- the in-INI middle-column sounds are completely ignored (eg, sound1 ignored sound3 or sound1 ignored ignored sound4).

not sure what you meant by this.

battle_cry=solarf01,solarf02,blank
battle_cry_frame=0,0,0

in this example solarf02 sound would be ignored? (I thought it would be 33% chance for solarf01, solarf02 or no sound played at first frame)

 

edit: I've re-read first post and this seems to be the case based on your tests. Could you please write about it on Beamdog's redmine? Topics created in Beamdog forum seems to be ignored these days. That engine bug with attack_slash, attack_backslash, attack_jab not working at all also seems like a major oversight that could be fixed by Beamdog if they will be aware of it.

in your reports on Beamdog forum you mentioned 2da files - considering every single animation on patch 2.x games has unique INI file with sound entry are 2da sound files even in use by the engine anymore? I didn't test it but if that would be the case then we would probably hear lots of duplicated sounds. I think it's worth checking it out before making a redmine report.

 

 

I've uncovered yet another method used for the playback of attack sounds. Seems like a good place to record this find.

 

Previously, there'd been an assumption floating around that a few animation slots have hardcoded attack sounds. Diving into the executable reveals that these attack sounds aren't linked to animations at all; they are tied to specific items used by several weapon-changing monsters.

 

From what I see some of these sounds are also referenced in INI files (which are likely just exported data directly from EXE file) under shoot sound slot. Not sure if it's related to it.


Edited by K4thos, 27 January 2017 - 04:35 AM.


#31 hook71

hook71
  • Member
  • 280 posts

Posted 27 January 2017 - 09:55 AM

Some issues from the Beamdog forum have already been transfered to the public bugtracker. Please take a look if anything need to be updated or if you discover any additional issues.

 

http://support.baldu...om/issues/26795 - Middle-column sounds should be enabled for playback (2DA Soundset)
http://support.baldu...om/issues/26796 - Animation-specific attack sounds should be enabled for playback (2DA Soundset)
http://support.baldu...om/issues/26797 - Creatures should use unique 2DA soundset codes
http://support.baldu...om/issues/26798 - Creatures should use alternative attack sounds (CRE Soundset)
http://support.baldu...om/issues/26799 - Creature attack sounds from 2DA files should not overlap attack sounds stored in CRE files


#32 K4thos

K4thos
  • Modder
  • 315 posts

Posted 27 January 2017 - 10:10 AM

hook71, nice to see them added to tracker. If these are your reports than they may need to be updated with INI sound section mention rather than 2da files (but only if skellytz can confirm that the same problems affects INI files and if my assumption that 2da files are no longer used by 2.x patched games is correct).

 

http://support.baldu...om/issues/26797 - Creatures should use unique 2DA soundset codes

this one seems to be already fixed considering each animation and palette variant has unique INI file and from what I see Bears mentioned in the report have comletly different INI soundsets assigned.



#33 skellytz

skellytz
  • Staff
  • 578 posts

Posted 27 January 2017 - 01:38 PM

I so wish Ascension64 was still with us though. He could be able to contribute so much...

Yeah, well, I wish I'd found all this a few years earlier :P

 

in your reports on Beamdog forum you mentioned 2da files - considering every single animation on patch 2.x games has unique INI file with sound entry are 2da sound files even in use by the engine anymore?

That's right; 2DA soundsets aren't used in BGEE v2.x. I put those reports up there when it was still v1.x. To be honest, back then I got a little bit discouraged by the lack of response to what seems to be a huge oversight. I gave up on the INI system when I realized that it's just as messed up.

 

From what I see some of these sounds are also referenced in INI files (which are likely just exported data directly from EXE file) under shoot sound slot. Not sure if it's related to it.

They're under SHOOT slot, alright, but:

 

- Looks like they forgot to dehardcode the item-sound relationships I mentioned here. This means duplicate attack sound effects for any monsters wielding those weapons.

 

- There are unnecessary blanks (or what used to be nosounds in 2DA soundsets). So even if they'd dehardcoded the item-sounds, the sound effects wouldn't be properly played every attack.

 

(but only if skellytz can confirm that the same problems affects INI files and if my assumption that 2da files are no longer used by 2.x patched games is correct).

Sadly, everything I said about a year ago still applies:

 

- The in-CRE soundset still allows for only the first attack sound slot to be played back.

 

- The in-INI attack sounds still overlap the in-CRE ones.

This is important for modders who want to use the existing animations with custom attack sound effects. For example, the BG1 Skeleton Warriors (e.g., Icharyd) use the Skeleton animation, but have separate audio files, which are wasted.

 

- The in-INI middle-column sounds are completely ignored (eg, sound1 ignored sound3 or sound1 ignored ignored sound4).

Yup. You can have as many columns in there as you want, but only the first and the last will be used. For example:

 

// MGIB gibberling

(...)

[sounds]
attack=giber03,ignored,giber04
attack_frame=0,0,0

 

- The in-INI animation-specific attack sounds don't work, so audio files never match their respective attack animations.

Not only they don't work, they're often messed up and/or have unnecessary blanks.

 

this one seems to be already fixed considering each animation and palette variant has unique INI file and from what I see Bears mentioned in the report have comletly different INI soundsets assigned.

This does show promise; however, it looks like they forgot to assign proper sound effects to the palette variants. For example, Greater Basilisks have separate audio files from Basilisks.

 

Some issues from the Beamdog forum have already been transfered to the public bugtracker. Please take a look if anything need to be updated or if you discover any additional issues.

Thanks, I've already been informed by Andrea. He's been a big help getting these through. I'm going to update the reports to reflect the new system and I hope they will get more attention this time.



#34 K4thos

K4thos
  • Modder
  • 315 posts

Posted 28 January 2017 - 06:06 AM

skellytz, thanks for explanation.

 

I don't really expect that Beamdog will go and fix all "blank" sound problems or incorrectly assigned sounds themselves (unless some list of issues is provided to them) but from what I understand in order to make the mod work on EE games following things needs to be reported on redmine:

1. disable INI file sound slots if the In-CRE soundsets slots are already occupied to prevent duplicated sounds (this one could have less priority since we can disable sounds from CRE files via mods)

2. deleting ITM and WAV references from executable and use INI file shoot or other slots instead - again less priority since we can easily fix it ourselves with this code:

COPY ~Baldur.exe~ ~Baldur.exe~
    PATCH_FOR_EACH str IN ANKHEG1 ANKHG06 ANKHEG2 ANKHG05 BASIL1 BASIL06 BASIL2 BASIL05 BASILG1 GBASI05 BASILG2 GBASI06 BASILG3 GBASI07 ETTERC1 ETTER05 ETTERC2 ETTER06 WYVERN1 WYVER05 WYVERN2 WYVER06 WOLFWI1 WWOLF07 WOLFWI2 WWOLF06 BEGIN
        SET length = STRING_LENGTH ~%str%~
        REPLACE_TEXTUALLY ~%str%~ ~~ (length)
    END

3. fixing ATTACK_2, ATTACK_3 and ATTACK_4 in-CRE soundsets slots and SLASH, BACKSLASH, JAB INI sound slots

4. fixing middle INI sound slot that doesn't work at all.

 

So 3rd and 4th bugs are essential here. And both have been already fixed by tobex in vanilla engine. Please don't forget to mention it in your updated report (preferably on redmine since that's where they look for bug reports these days) - maybe that will convince them to give these fixes priority considering EE is still inferior compared to patched vanilla engine when it comes to sounds (even though animation INI support is sweet feature).

 

edit: btw. "CLUAConsole:" console command that you used in your reports doesn't work on EE games anymore. It's just "C:" now.


Edited by K4thos, 28 January 2017 - 06:14 AM.


#35 skellytz

skellytz
  • Staff
  • 578 posts

Posted 28 January 2017 - 07:58 AM

Please don't forget to mention it in your updated report (preferably on redmine since that's where they look for bug reports these days) - maybe that will convince them to give these fixes priority considering EE is still inferior compared to patched vanilla engine when it comes to sounds (even though animation INI support is sweet feature).

Alright, I'll do that  ;)

 

You know, I could just post the initial drafts right here, and if anybody feels like adding or otherwise improving them, they're more than welcome.

 

I don't really expect that Beamdog will go and fix all "blank" sound problems or incorrectly assigned sounds themselves (unless some list of issues is provided to them)

Leave 'em to me. I love fixing those.



#36 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 28 January 2017 - 11:24 PM

skellytz,

 

do you plan to look for a fix to the sounds issue (if possible) also for non-EE Baldur's Gate?

 

Reading the opening post, I would say Solution 1 would work pretty well. It is true we'd end up losing some attack sounds variants but the end result will be a fair improvement over the current situation and I'd think the workload would not be too heavy.

 

And from what I can understand, an added bonus over Solution 2 would be BGT attacks sound continuity for those creatures that are present in both BG1 and BG2.

 

Godspeed! :)


Edited by Salk, 28 January 2017 - 11:41 PM.


#37 skellytz

skellytz
  • Staff
  • 578 posts

Posted 29 January 2017 - 07:02 AM

do you plan to look for a fix to the sounds issue (if possible) also for non-EE Baldur's Gate?

Why, the new incarnation of the mod is targeted at the original BG2 and BGT. That's what I play myself and that's where I've been finding all the issues, so those are my priorities.

 

In fact, BGEE is still a question mark, as it depends on whether Beamdog are willing to include more TobEx fixes.

 

I've already finished some of the new components for BG2/BGT, for example:

 

- Restored BG1 Base Sound Volume

- Restored BG1 Rare Right-Click Selection Sounds

- Restored BG1 Ambient Sound Effects

- Restored & Tweaked BG1 Idle Sound Effects

- Tweaked & Restored Creature Soundsets

 

I'm working on 2DA soundsets. It's just taking a lot of time, because I tend to meticulously check every single animation in-game to make sure audio is synced with frames and all that jazz.



#38 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 29 January 2017 - 09:24 PM

Please let me know if you need help with the testing.

 

And thanks again for your hard work!



#39 skellytz

skellytz
  • Staff
  • 578 posts

Posted 04 February 2017 - 12:54 PM

Here are drafts for the bug reports:

 

Attached File  attack_sound_bug_reports.pdf   175.16K   475 downloads

 

I'd be grateful if anybody followed and reproduced them. It's probably better to use an invincible character who can withstand all those attacks to avoid frustration.

 

I'm pretty sure Mac and portable are affected, but if anybody uses those and doesn't notice the issues, please let me know.



#40 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 08 February 2017 - 12:58 AM

Hello skellytz!

 

I cannot help with BG:EE testing but I do have a BGT platform to work on.


If I understand correctly I can only help testing with "Animation INI middle-column sounds" and "Animation INI slash, backslash and jab sounds"?

 

The other two problems can only be reproduced on the EE engine?