Jump to content


Photo

Issues with Creature and Animation Soundsets


  • Please log in to reply
94 replies to this topic

#81 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 10 February 2022 - 09:19 AM

Hi,


I found "strange" sound sequence overriding (-> SEQ_READY) for 2DA soundset. Engine has two sequence IDs, one for animation and second for sound. Sound sequence ID is copy of Animation sequence ID, but each animation type has own override. Main issue is override "SEQ_SHOOT -> SEQ_READY", instead ranged(shoot) sound engine for some creatures plays nothing because 2DA.READY is empty for all(?) creatures. Ok, these monsters don't have ranged animation(?), but if we give them ranged weapon (and game will not crash) what happens...
Other issue is Ankheg sounds, it looks messy.

BG2 Chars           (5xxx):
BG1 Chars           (64xx):
Monster             (73xx, 77xx, 7Fxx, ...):
MonsterOld          (70xx, 72xx, ...):
MonsterMulti        (12xx):
MonsterLayered      (80xx):
MonsterMultiNew     (13xx):

SEQ_ATTACK_SLASH        ->  SEQ_ATTACK
SEQ_ATTACK_BACKSLASH    ->  SEQ_ATTACK
SEQ_ATTACK_JAB          ->  SEQ_ATTACK
SEQ_EMERGE              ->  SEQ_READY  not used (all other anims has it, so i skipped)
SEQ_HIDE                ->  SEQ_READY  not used (all other anims has it, so i skipped)


Ankheg (3xxx):

SEQ_ATTACK_SLASH        ->  SEQ_ATTACK
SEQ_ATTACK_BACKSLASH    ->  SEQ_ATTACK
SEQ_ATTACK_JAB          ->  SEQ_ATTACK
SEQ_DAMAGE              ->  SEQ_READY       ?
SEQ_HEAD_TURN           ->  SEQ_READY       ?
SEQ_SHOOT               ->  SEQ_READY       ?
SEQ_WALK                ->  SEQ_READY       ?
SEQ_EMERGE              ->  SEQ_READY       error, but not used when above ground, so OK    


Effect (0xxx):

SEQ_*                   ->  SEQ_READY


TownStatic    (4xxx):
AmbientStatic (Bxxx):

SEQ_SHOOT               ->  SEQ_READY       
SEQ_WALK                ->  SEQ_READY       
SEQ_ATTACK_SLASH        ->  SEQ_READY       
SEQ_ATTACK_BACKSLASH    ->  SEQ_READY       
SEQ_ATTACK_JAB          ->  SEQ_READY       


Flying (Dxxx):
Ambient (Cxxx):

SEQ_READY for all except SEQ_WALK, or second path:
SEQ_ATTACK_SLASH        ->  SEQ_READY       
SEQ_ATTACK_BACKSLASH    ->  SEQ_READY       
SEQ_ATTACK_JAB          ->  SEQ_READY       
SEQ_SHOOT               ->  SEQ_READY       


MonsterIcewind (Exxx):

SEQ_ATTACK_SLASH        ->  SEQ_ATTACK
SEQ_ATTACK_BACKSLASH    ->  SEQ_ATTACK
SEQ_ATTACK_JAB          ->  SEQ_ATTACK
SEQ_CAST                ->  SEQ_READY       ?, if doesn't have "Ca" suffix *.BAM
SEQ_CONJURE             ->  SEQ_READY       ?, if doesn't have "Sp" suffix *.BAM
SEQ_SHOOT               ->  SEQ_READY       ?, if doesn't have "A4" suffix *.BAM


MonsterLarge    (9xxx):
MonsterLarge16  (Axxx):
MonsterQuadrant (10xx, 11xx):

SEQ_ATTACK_SLASH        ->  SEQ_ATTACK
SEQ_ATTACK_BACKSLASH    ->  SEQ_ATTACK
SEQ_ATTACK_JAB          ->  SEQ_ATTACK
SEQ_SHOOT               ->  SEQ_READY       ?


MonsterLayeredSpell (2xxx):

SEQ_ATTACK_SLASH        ->  SEQ_ATTACK
SEQ_ATTACK_BACKSLASH    ->  SEQ_ATTACK
SEQ_ATTACK_JAB          ->  SEQ_ATTACK
SEQ_SHOOT               ->  SEQ_READY       ?, only if anim = 22xx or 23xx


#82 skellytz

skellytz
  • Staff
  • 554 posts

Posted 10 February 2022 - 01:40 PM

I found "strange" sound sequence overriding (-> SEQ_READY) for 2DA soundset. Engine has two sequence IDs, one for animation and second for sound. Sound sequence ID is copy of Animation sequence ID, but each animation type has own override. Main issue is override "SEQ_SHOOT -> SEQ_READY", instead ranged(shoot) sound engine for some creatures plays nothing because 2DA.READY is empty for all(?) creatures. Ok, these monsters don't have ranged animation(?), but if we give them ranged weapon (and game will not crash) what happens...
Other issue is Ankheg sounds, it looks messy.

Nice one. Now I remember I ran into this issue when I was fixing the hardcoded weapon sounds. I had to exclude ankheg ranged weapon (ankheg1.itm) from the patches and keep the hardcoded sound because I couldn't get ankheg 2DA.SHOOT to work (noted it down as "bug in ankheg anim shoot cycle") That was three years ago, so I forgot about it. Sorry!
 
But I also remember I tested BGEE ankhegs and their INI.SHOOT worked. Did they fix SEQ_SHOOT -> SEQ_READY SEQ_SHOOT?
 
Looking at the BAMs, ankhegs don't have walk and damage animations at all (but they have dying). They have one melee attack animation (MAKHG3 -> cycles 0-4) and a shoot animation (MAKHG3 -> cycles 8-12). BGEE incorrectly makes them play cycles 0-4 (slash attack) on ranged attacks.
 
Do you think you could change the sound override in the classic engine
SEQ_DAMAGE -> SEQ_READY SEQ_DAMAGE
SEQ_SHOOT -> SEQ_READY SEQ_SHOOT

and get the ankheg animations (3xxx) to use cycles 8-12 on ranged attacks?


Edited by skellytz, 25 May 2022 - 04:44 PM.


#83 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 11 February 2022 - 01:02 AM

skellytz,

Looking at the BAMs, ankhegs don't have walk and damage animations at all (but they have dying). They have one melee attack animation (MAKHG3 -> cycles 0-4) and a shoot animation (MAKHG3 -> cycles 8-12).

BG2 plays walk and damage sounds independ of animation frames availability::

Creature::Swing                 sound: SWI_04A
Creature::Swing                 sound: SWI_04E
EffectDamage                    sound: HIT_03A2DA
SEQ_DAMAGE                   sound: ZWOLRDY - bug
Creature::Play Battle_Cry       sound: DWOLF03
2DA SEQ_READY                   sound: ZWOLRDY
2DA SEQ_WALK                    sound: ZWOLWALK
2DA SEQ_READY                   sound: ZWOLRDY
2DA SEQ_WALK                    sound: ZWOLWALK

ZWOLF*,DWOLF* - my local test sounds for ankheg


Edited by Insomniator, 11 February 2022 - 01:11 AM.


#84 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 11 February 2022 - 01:08 AM

skellytz,

 

Do you think you could change the sound override in the classic engine

SEQ_DAMAGE -> SEQ_READY SEQ_DAMAGE
SEQ_SHOOT -> SEQ_READY SEQ_SHOOT

Yes, this is possible.Do you ask for ankheg only or all animations ?

 

and get the ankheg animations (3xxx) to use cycles 8-12 on ranged attacks?

I don't know much about BAM/animation cycles/sequence. I need some time to figure this out
 



#85 skellytz

skellytz
  • Staff
  • 554 posts

Posted 11 February 2022 - 03:28 AM

Do you ask for ankheg only or all animations ?

Is the list above complete? Then, yes, all of them. Looks like by default the anim and sound IDs were set based on frame availability (no frames, default to SEQ_READY), they simply didn't bother (or forgot) to manually override the sound IDs for those creatures.

 

I don't know much about BAM/animation cycles/sequence. I need some time to figure this out

BGEE changes ankheg ranged attack animation from ready to slash. Maybe that would be a good piece of code to start with?



#86 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 11 February 2022 - 07:31 AM

skellytz,

Ankheg animation frames:
- ATTACK_JAB (G3 cycles 8-12) changed to ATTACK_SLASH/ATTACK_BACKSLASH (G3 cycles 0-4)
- SHOOT enabled (G3 cycles 8-12)

Removed SEQ_READY sound overriding:
0x10xx/0x11xx/:
0x20xx/0x21xx/:
0x9000:
0xA000:
SEQ_SHOOT

0x3000:
SEQ_DAMAGE
SEQ_HEAD_TURN
SEQ_WALK
SEQ_SHOOT


0xE000:
SEQ_CONJURE - not tested
SEQ_CAST    - not tested
SEQ_SHOOT

Removed spaces:
Sound:Normalize Volume=1
Sound:Normalize Volume Creatures Only=1
Sound:Normalize Volume Debug Print=1
Sound:Mixed Soundset for BGT=1
Sound:Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet=1


New option (you have own implementation, not necessary):
Sound:Disable Hardcoded BG1 Item Sounds=1
(switch from hardcoded ANGHEG1.itm/* sounds to CRE.ATTACK*/2DA.ATTACK*)

 

https://ufile.io/pbo0lpj1



#87 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 11 February 2022 - 07:41 AM

Hi Andrea C.

It is fantastic to see this game receive so much passion and attention so many years after its release.

And it surprises me how many years bugs still live in BG2 engine  :)



#88 skellytz

skellytz
  • Staff
  • 554 posts

Posted 11 February 2022 - 09:57 PM

Ankheg animation frames:
- ATTACK_JAB (G3 cycles 8-12) changed to ATTACK_SLASH/ATTACK_BACKSLASH (G3 cycles 0-4)
- SHOOT enabled (G3 cycles 8-12)

Well done.

 

0xE000:
SEQ_CONJURE - not tested
SEQ_CAST    - not tested

Seems to work. For example, minotaur doesn't have casting anims, so plays SEQ_READY anim with SEQ_CONJURE (while casting) and SEQ_CAST (when the spell is cast) sounds.

 

Sound:Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet=1

-> Sound:Mixed Soundset for BGT. Unknown BG1 NPC Have BG2 Soundset

 

New option (you have own implementation, not necessary):
Sound:Disable Hardcoded BG1 Item Sounds=1

That IS component will require the new TobEx AfterLife anyways, so I'll just use this new engine hack. Thanks!

 

I've tested CRE.ATTACK some more. If a creature has a weapon with one of the categories (ITM offset 0x1c) that are hardcoded to play SWI_XXX.wav sounds on Creature::Swing (for example: bows, large swords), CRE.ATTACK sounds won't play (both melee and ranged). You can test that by changing the testr.itm (debug wolf package) from Category: Miscellaneous to Category: Bows. For melee, you can give the wolf sw1h01.itm (Category: Large swords), and then p1-4.itm (Category: Miscellaneous). CRE.ATTACK sounds shouldn't be disabled if a weapon has hardcoded "category" sounds. Both sounds should be enabled on attacks.


Edited by skellytz, 11 February 2022 - 10:08 PM.


#89 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 12 February 2022 - 05:05 AM

skellytz,
 

Sound:Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet=1
-> Sound:Mixed Soundset for BGT. Unknown BG1 NPC Have BG2 Soundset

Thanks
 

I've tested CRE.ATTACK some more. If a creature has a weapon with one of the categories (ITM offset 0x1c) that are hardcoded to play SWI_XXX.wav sounds on Creature::Swing (for example: bows, large swords), CRE.ATTACK sounds won't play (both melee and ranged). You can test that by changing the testr.itm (debug wolf package) from Category: Miscellaneous to Category: Bows. For melee, you can give the wolf sw1h01.itm (Category: Large swords), and then p1-4.itm (Category: Miscellaneous). CRE.ATTACK sounds shouldn't be disabled if a weapon has hardcoded "category" sounds. Both sounds should be enabled on attacks.

Confirm, when Swing() finds something by priority(weapon category), it stops looking for low-priority candidates (CRE.ATTACK*). Also Swing() plays only one sound at time, this needs to be patched too.
 
Categories Darts (24) and Hand-to-hand weapons (28, many "touch" weapons) have special behaviour: no any swing sound, they remove "SWI_" prefix and disable CRE.ATTACK*, is this OK ?


Edited by Insomniator, 12 February 2022 - 05:30 AM.


#90 skellytz

skellytz
  • Staff
  • 554 posts

Posted 12 February 2022 - 08:55 AM

Categories Darts (24) and Hand-to-hand weapons (28, many "touch" weapons) have special behaviour: no any swing sound, they remove "SWI_" prefix and disable CRE.ATTACK*, is this OK ?

They shouldn't disable CRE.ATTACK sounds.



#91 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 12 February 2022 - 11:21 AM

skellytz,

When char plays long-term sound like battle cry and if it changed "sequence", it will stop previous sound. Example:
Creature::Play CRE.BATTLE_CRY   sound: OGREE04   ch:13
Creature::Swing                                sound: DWOLF05   ch:3
Creature::Swing                                sound: DWOLF05   ch:3
Creature::Play CRE.DAMAGE          sound: OGREE08   ch:13

Ogre plays battlecry(OGREE04) and stops immediatly when get damage(OGREE08) from Wolf. Seems logical, when you lost finger on hand, you cannot sing more, but probably you know more...

p.s. Upcoming TobEx update has fix for non-stopped casting sound when party member aborted(non-damaged way) casting and make other action:
Effect Opcodes:Stop Animation/Sound of Interrupted Casting=1


 



#92 skellytz

skellytz
  • Staff
  • 554 posts

Posted 12 February 2022 - 11:34 AM

Ogre plays battlecry(OGREE04) and stops immediatly when get damage(OGREE08) from Wolf. Seems logical, when you lost finger on hand, you cannot sing more, but probably you know more...

Yes, I agree this is the intended behavior.

 

Upcoming TobEx update has fix for non-stopped casting sound when party member aborted(non-damaged way) casting and make other action

Nice!



#93 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 13 February 2022 - 01:44 AM

I didn't visit here for a couple of weeks and I want to join Andrea C. in thanking (again) both skellytz and Insomniator for their invaluable work.

 

Two pillars of the IE community still standing strong in 2022!  :cheers:



#94 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 14 February 2022 - 12:12 PM

Hi All,

 

This is prerelease version of TobEx Afterlife update

TobEx_ini.txt - description of new sound options

 

https://ufile.io/oz8cnzt5

 

 



#95 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 14 February 2022 - 12:15 PM

Hi skellytz

Categories Darts (24) and Hand-to-hand weapons (28, many "touch" weapons) have special behaviour: no any swing sound, they remove "SWI_" prefix and disable CRE.ATTACK*, is this OK ?

They shouldn't disable CRE.ATTACK sounds.

Done

Creature::Swing Weapon          sound: SWI_01B   ch:3
Creature::Swing CRE.Attack      sound: RWOLF03   ch:3
...
Creature::Swing Weapon          sound: SWI_01A   ch:3
2DA.Generic attack              sound: ZWOLF0_3  ch:13
2DA.SEQ_ATTACK_BACKSLASH        sound: ZWOLF2_2  ch:13

CRE.Attack1 = RWOLF03
CRE.Attack2 = empty
CRE.Attack3 = empty

 

attachment in prev post, some TobExCore.ini/TobExTweak.ini options changed/moved