Jump to content


Photo

So the Infinity Animation update..


  • Please log in to reply
190 replies to this topic

#181 skellytz

skellytz
  • Staff
  • 576 posts

Posted 04 June 2022 - 09:20 AM

1) Walk sounds always play without interruption and overlapping
2) Armor sounds conflicts, stop one and play instantly other
3) Main char always plays 5 armour sounds at begin of moving , then long pause and last sound when char stopped at destinaton

This is original engine behaviour, new sound text debug just shows how this bioware's magicbox really works

Yeah, everything seems normal.

 

1) Walking sounds play without interruption, because sound_freq determines the delay between each sound. Aborting each walking sound before playing another would sound unnatural eg footsteps echo would be a bit off. So, this is ok.

2) The armor sounds are dependent on path search orientation changes. Each armor sound must be aborted before playing the next one, as otherwise there would be too many playing at the same time eg around tight corners. The vanilla engine behavior is ok.

3) I guess it depends on the exact path search node curve and the distance. If you click a short distance away, the nodes may get bunched up, so the engine interprets them as character orientation changes and plays a few armor sounds in a short span of time. Nothing to be worried about; it's just how path searching works.

 

Confirm, after reverting to v8 i see this bug, now fixed, your 2DA is OK

Ok, seems to be fixed now.

 

to enable robe sound:

TobExTweak.ini

Sound:Enable Robe Armor Sound=1

Robe sounds work fine; however, there seems to be an inconsistency:

- BG2 mage character animations play robe sounds only when wearing a robe item.

- BG1 mage character animations play robe sounds even if not wearing a robe item, ie with base animation level.


Let's make it consistent with other armor items and play robe sounds only if robe items are equipped.


Edited by skellytz, 04 June 2022 - 10:27 AM.


#182 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 04 June 2022 - 09:53 PM

skellytz

2) Armor sounds conflicts, stop one and play instantly other
3) Main char always plays 5 armour sounds at begin of moving , then long pause and last sound when char stopped at destinaton

2) The armor sounds are dependent on path search orientation changes. Each armor sound must be aborted before playing the next one, as otherwise there would be too many playing at the same time eg around tight corners. The vanilla engine behavior is ok.
3) I guess it depends on the exact path search node curve and the distance. If you click a short distance away, the nodes may get bunched up, so the engine interprets them as character orientation changes and plays a few armor sounds in a short span of time. Nothing to be worried about; it's just how path searching works.

Engine aborts armor sounds even if moving on straight horizontal line.

 

Analyzing BG2EE static decompiled code i found only two places where armor sound can be played: ChangeDirection() and SetSequence()

 

ChangeDirection() changes armor sound when new "direction" detected

SetSequence() probably changes sound when char start moving SEQ_* -> SEQ_WALK or when turn head SEQ_HEAD_TURN

 

So we have 5 armor sounds, i think first are from SetSequence() because sequence changed to WALK or mix of HEAD_TURN/WALK, remain sounds from ChangeDirection() because engine burst changing direction few times immediatly after moving, but later direction IS NOT CHANGED when we walk on straight line.

 

Robe sounds work fine; however, there seems to be an inconsistency:
- BG1 mage character animations play robe sounds even if not wearing a robe item, ie with base animation level.

Thanks for report, i will recheck



#183 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 04 June 2022 - 10:42 PM

Hi,

What BG2 engine does when start walking (Initial animation sequence is HEAD_TURN, char stays on ground) :

1) Change sequence to READY
2) Play ArmorSound#1
3) Play SEQ_READY sound from 2DA

4) Change sequence to WALK
5) Abort ArmorSound#1, play ArmorSound#2
6) Play SEQ_WALK sound from 2DA

7) change direction 6 -> 9
8.) Abort ArmorSound#2, play ArmorSound#3
Next direction step=7 is not saved to creature context !!!

9) change direction 6 -> 9 (again)
10) Abort ArmorSound#3, play ArmorSound#4
11) Next direction step=7 saved to creature context
12) Next direction step=8 saved to creature context

13) change direction 8 -> 9
14) Abort ArmorSound#4, play ArmorSound#5
15) Destination direction =9 saved to creature context
...
Walking, play WAL_* sounds as usual
...
16) Change sequence to HEAD_TURN
14) Play last ArmorSound#6

1) Steps 1-15 processed at very short time
2) I worry abour global READY sequence, why it applied when we just want to walk ?
3) In my example initial direction = 6, destianation = 9, three steps, probably can be more or little steps depending on how char oriented before moving
4) Delayed step=7 at first call to ChangeDirection() ?


Edited by Insomniator, 05 June 2022 - 09:15 AM.


#184 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 05 June 2022 - 03:05 AM

Made experimental lite version, calling to heavy SetSequence(SEQ_READY) removed, only context field filled for possible checks in engine against current sequence
 
Char moving in same direction as face aligned, only two sounds without overlapping:

Creature::Play CRE.SEL_ACTION   sound: FEMALE4K  ch:7
Creature::ArmorSound            sound: ARM_02    ch:20 - SetSequence(WALK)
Creature::AIUpdateWalk          sound: WAL_04A   ch:18
Creature::AIUpdateWalk          sound: WAL_04    ch:18
Creature::AIUpdateWalk          sound: WAL_04    ch:18
Creature::AIUpdateWalk          sound: WAL_04    ch:18
Creature::AIUpdateWalk          sound: WAL_04B   ch:18
Creature::AIUpdateWalk          sound: WAL_04    ch:18
Creature::ArmorSound            sound: ARM_02E   ch:20 - SetSequence(HEAD_TURN)

 
When face align mismatch walk direction, engine plays ping pong with armor sounds as before
Also this fix eliminates SEQ_READY sound from 2DA when we start moving


Edited by Insomniator, 05 June 2022 - 09:14 AM.


#185 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 05 June 2022 - 03:06 AM

SEQ_READY is really weird (on BGT with a lot of mods + IA):
1) if load save, change weapon F2/F3/.. -> animation stuck on SEQ_READY until we move char
2) if change weapon immediatly after walking -> SEQ_READY played 2-3 secs
3) if stay on ground and change weapon -> glitch when SEQ_READY played 1 or 2 frames only



#186 skellytz

skellytz
  • Staff
  • 576 posts

Posted 05 June 2022 - 08:26 AM

SEQ_READY is really weird (on BGT with a lot of mods + IA):

Does SEQ_READY internally cancel any functions, or is it purely cosmetic animation?
 



#187 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 05 June 2022 - 09:13 AM

skellytz,



SEQ_READY is really weird (on BGT with a lot of mods + IA):

Does SEQ_READY internally cancel any functions, or is it purely cosmetic animation?

It is some like "default" stage, for example if we cancel all current action on user, engine resets sequence to READY. I can't answer about canceing function, it is used in too many places
 
EDIT: i edited prev posts with walking, last stage is HEAD_TURN instead SEQ_READY.
this makes walking logic more complex, when char stopped at destination engine itself skip SEQ_READY stage and transit SEQ_WALK - > SEQ_HEAD_TURN

 Creature::Play CRE.SEL_ACTION   sound: MONTR21   ch:9
seq= SEQ_WALK
Creature::ArmorSound            sound: ARM_02    ch:20
Creature::AIUpdateWalk          sound: WAL_03C   ch:18
Creature::AIUpdateWalk          sound: WAL_03    ch:18
Creature::AIUpdateWalk          sound: WAL_03B   ch:18
Creature::AIUpdateWalk          sound: WAL_04    ch:18
CSound::Abort................   sound: WAL_04    ch:18
Creature::AIUpdateWalk          sound: WAL_04C   ch:18
seq= SEQ_HEADTRN
Creature::ArmorSound            sound: ARM_02C   ch:20


 

2) if change weapon immediatly after walking -> SEQ_READY played 2-3 secs

seems OK, after walking we have timer before idle, so READY animation fit to this time

 

1) if load save, change weapon F2/F3/.. -> animation stuck on SEQ_READY until we move char

Nasty bug , occurs only if game started under visual studio, using unintialized variable in original engine, classic error.
visual studio all allocated memory fills with nonzero values to help detect such type of errors

 

3) if stay on ground and change weapon -> glitch when SEQ_READY played 1 or 2 frames only

I think this is wrong, if we changed weapon in hands, char must stay in READY stage some time before transit to idle(HEADTURN)
Lore: may be char after changing weapon going to attack, so must be "prepared" to battle


Edited by Insomniator, 05 June 2022 - 09:33 AM.


#188 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 05 June 2022 - 11:45 PM

Hi All,

 

Tweak to extend SEQ_READY animation time after weapon/shield re-equipped

 

to enable:
TobExTweak.ini
Animation:Reset Idle Timer After Weapon Equipped=1

 

v11, also includes fix for IA BG1 Robes missed sound

https://ufile.io/ehiuoplm



#189 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 06 June 2022 - 06:56 AM

Fantastic, Insomniator!


Thanks for your continued work on ToBEx Afterlife!  :cheers:

 

Unfortunately, my antivirus (Avast Free) is blocking the webpage you uploaded the latest .dll to. 

 

Downloaded it by temporarily disabling the antivirus.


Edited by Salk, 06 June 2022 - 07:18 AM.


#190 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 06 June 2022 - 07:32 AM

Unfortunately, my antivirus (Avast Free) is blocking the webpage you uploaded the latest .dll to.


i can switch to other file free hosting, just give me link



#191 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 06 June 2022 - 10:09 AM

I use Google Drive myself and I am very happy with it, so I would suggest that.