Jump to content


Photo

Restore Oringinal Voice Sets of BG1 NPCs in BGEE


  • Please log in to reply
33 replies to this topic

#21 skellytz

skellytz
  • Staff
  • 576 posts

Posted 26 January 2022 - 10:36 PM

can you explain detailed ? - which .CRE take as base (BG1 or BG2), where do action1-7 slots come from, where do rare1-4 slots come from

First we need to divide the creatures into two groups:

"Joinables" - Characters who can join the party and can be controlled. These characters should always have seven SELECT_ACTION slots available (0x124-0x13c) both in BG1 and BG2 portions of BGT, because we actually want to keep the option to play more sounds when we click our characters to do something, even in BG1.
"Non-joinables" - Creatures which don't join the party and typically aren't player-controlled. These creatures should have standard three SELECT_ACTION slots (0x124-0x12c) available in BG1.

Step 1: TobEx should add new TOBEX_SELECT_RARE creature soundset slots to the BG2 engine:

0x1d0 - should work like SELECT_RARE1 (0x130) in BG1
0x1d4 - should work like SELECT_RARE2 (0x134) in BG1
0x1d8 - should work like SELECT_RARE3 (0x138) in BG1
0x1dc - should work like SELECT_RARE4 (0x13c) in BG1

 

These new rare slots will be always available for every creature.

Step 2: Check if the player is playing BG1 or BG2 part of BGT.

- If the player is in BG1, go to step 3.
- If the player is in BG2, process sounds normally.

Step 3 (if the player is in the BG1 part): Check if the creature is "joinable" or "non-joinable".
- If the creature is "joinable", process sounds for this creature normally.
- If the creature is "non-joinable", go to step 4.

Step 4 (if the creature is "non-joinable" and in BG1 part): process the soundset slots

0x124 (SELECT_ACTION1) - normally like in BG2
0x128 (SELECT_ACTION2) - normally like in BG2
0x12c (SELECT_ACTION3) - normally like in BG2
0x130 (SELECT_ACTION4) - like SELECT_RARE1 in BG1
0x134 (SELECT_ACTION5) - like SELECT_RARE2 in BG1
0x138 (SELECT_ACTION6) - like SELECT_RARE3 in BG1
0x13c (SELECT_ACTION7) - like SELECT_RARE4 in BG1

BGT new version (v1.22): Check if TobEx fork is installed. If it is, patch BG1 vanilla joinables to move their SELECT_ACTION4-SELECT_ACTION7 (0x130-0x13c) sounds to the new TobEx-enabled slots TOBEX_SELECT_RARE1-TOBEX_SELECT_RARE4 (0x1d0-0x1dc)

Other mods: Feel free to use the new TobEx soundset slots to add funny nine-click rare selection sounds to NPCs or other creatures. Doesn't matter if it is BG1 or BG2 content.

 

Easier alternative: Personally, I'd skip steps 2-4 altogether. Too much extra processing. I'd just add the new rare slots (step 1) and let mods do the rest. BGT would then move the rare sounds to the new slots for BG1 joinables and non-joinables.


Edited by skellytz, 26 January 2022 - 11:24 PM.


#22 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 27 January 2022 - 11:39 AM

Hi Skellytz

First we need to divide the creatures into two groups:
"Joinables" - Characters who can join the party and can be controlled. These characters should always have seven SELECT_ACTION slots available (0x124-0x13c) both in BG1 and BG2 portions of BGT, because we actually want to keep the option to play more sounds when we click our characters to do something, even in BG1.
"Non-joinables" - Creatures which don't join the party and typically aren't player-controlled. These creatures should have standard three SELECT_ACTION slots (0x124-0x12c) available in BG1.
Other mods: Feel free to use the new TobEx soundset slots to add funny nine-click rare selection sounds to NPCs or other creatures. Doesn't matter if it is BG1 or BG2 content.

I prefer to place name of mixed creatures just to external .2da, just one line with .cre filename, this allow:
- BGT can patch any NPC(including not-joinable) to make it as "7 action BG2 0x124" + "4 rare BG1 0x1D0" + "2 select_rare BG2 0x1A0"
- BG1/BG2 MODs can append to .2da to inform about mixed soundset
- if .cre not presented in 2da, assume it as default for BG1 part
- default type selected by player at install time, mostly for handle cre from mods, for vanilla BG1 Tobex uses external list of NPC(all not-joinable) with hardcorded .cre filenames to be always bg1-type
 
p.s. for currently installed BGT 1.21 i made first alpha version, currently it support only two modes: 1) in bg1 part all .cre are bg1 2) in bg1 part only .cre from external .2da are bg1, .2da is just list of all possible Cres from vanilla BG1 and few new(renamed) from BGT
bg1 sounset.jpg


Edited by Insomniator, 27 January 2022 - 11:53 AM.


#23 skellytz

skellytz
  • Staff
  • 576 posts

Posted 27 January 2022 - 02:52 PM

I prefer to place name of mixed creatures just to external .2da, just one line with .cre filename, this allow:

Sounds good.

 

One more suggestion: In BG1 creatures which initiate dialogue with the player (eg Imoen in Candlekeep) play their INITIAL_MEETING (0xa4) sound as soon as they see the player (before the dialogue starts). In BG2 this was changed to play INITIAL_MEETING only when the dialogue starts. How about restoring the original behavior to BG1 part of BGT?
 



#24 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 28 January 2022 - 09:22 AM

Hi skellytz

I prefer to place name of mixed creatures just to external .2da, just one line with .cre filename, this allow:

Sounds good.

 

One more suggestion: In BG1 creatures which initiate dialogue with the player (eg Imoen in Candlekeep) play their INITIAL_MEETING (0xa4) sound as soon as they see the player (before the dialogue starts). In BG2 this was changed to play INITIAL_MEETING only when the dialogue starts. How about restoring the original behavior to BG1 part of BGT?

Fixed this some time ago, http://www.shsforums...2-improved-gui/ , BG1 Style Greeting

 

I made next version with support of full-featured .CRE, soundset types loaded from BGSNDSET.2DA
//  - comment
BG1 - BG1 soundset
BG2 - BG2 soundset, usefull for BG1 MOD's creatures, not need to point for vanilla bg2 creatures
Mix - BG2 + BG1(only 4 rare sounds) soundset
Max - BG2 + BG1 soundset, experimental idea, complicated

File based on BG1ToSC dataset with additional BGT copies/renames, probably it is not finished (or wrong) because i didn't reversed some BGT renames like BELT -> BELTBRD ?

Tested on IMOEN10, new Mix type, manually i added 4 references at 0x1D0 offset:
SELECT_ACTION1:      Gotcha.
SELECT_ACTION2:      Good to go.
SELECT_ACTION3:      Right you are.
SELECT_ACTION4:      Alright, alright.
SELECT_ACTION5:      No problem at all.
SELECT_ACTION6:      You can count on me!
SELECT_ACTION7:      This way then?
SELECT_RARE1:        Right as rain.
SELECT_RARE2:        Just like old times. Well, except for the torture and all.
BG2EE_SELECT_RARE1:  Do ya wanna tell me a story 'bout trollops an' plug tails? Please?
BG2EE_SELECT_RARE2:  I know nothing more, so leave me to go.
BG2EE_SELECT_RARE3:  Good on you if you save the day.
BG2EE_SELECT_RARE4:  Back home, Puff-Guts would always tell me a story.

mix.jpg


Max Type - merge all available lines from both games, stored at 1D0-234, 2 bytes per reference, free 50 lines.
Possible only for few voiced joinable NPC existing in both games: Imoen, Minsc, Jaheira, Edwin, Viconia (some else ?). There is big issue - voices written in different time, no fix :)

Tired:  1+1 = 2  lines
Bored:  1+1 = 2  lines
Hurt:   1+1 = 2  lines
Common: 6+6 = 12 lines
Action: 3+7 = 10 lines
...

Attached File  BGSNDSET.ZIP   6.23K   117 downloads



#25 Graion Dilach

Graion Dilach
  • Modder
  • 106 posts

Posted 28 January 2022 - 12:53 PM

Please do not deviate from the EE soundslot distribution, because that will be very hard to track (I am not even persuaded by that this whole 2da setup is needed for BG2, but I don't aim for classic compatibility usually). The EEs had a very good reason for what they did, because this merged in the BG1 and the IWD1 functionality into BG2.



#26 skellytz

skellytz
  • Staff
  • 576 posts

Posted 28 January 2022 - 09:15 PM

File based on BG1ToSC dataset with additional BGT copies/renames, probably it is not finished (or wrong) because i didn't reversed some BGT renames like BELT -> BELTBRD ?

I'll take a look and let you know if there are any problems.

 

Here are three more engine-related issues (detailed info) that I hope you can help us solve. I've already attempted to fix these in Infinity Sounds or RBG1MPV, but with some limitations that can be avoided with TobEx.

 

1. CRE soundset attack sounds 2, 3 and 4 do not work

The engine plays only ATTACK1 (0xdc), the other slots are ignored:

ATTACK2 (0xe0)

ATTACK3 (0xe4)

ATTACK4 (0xe8)

 

2. CRE attack, damage and dying sounds overlap with 2DA animation sounds

The engine disables the playback of 2DA animation selection and battlecry sounds if the creature with that animation also has these sounds in the CRE soundset (SELECT_COMMON and BATTLECRY), so that they don't play at the same time. But if the creature has ATTACK, DAMAGE or DYING sounds in the CRE soundset, these sounds play on top of the 2DA sounds for the creature's animation (the engine plays both sounds at the same time). The attack, damage and dying sounds should work just like selection and battlecries (if present in the CRE soundset slots, disable the playback of the corresponding slots in 2DA soundset).

 

3. Some BG1 animations do not have 2DA soundsets coded in the game executable (more explanation)

These animation palette variants were supposed to have unique animation soundset codes, but weren't coded properly and default to base animation codes:

 

0x7101 BASILISK_GREATER should be linked with MBAS2.2da, defaults to MBAS.2da (shared with lesser basilisk)

 

0x7203 BEAR_POLAR should be linked with MBER2.2da, defaults to MBER.2da (shared with brown bear, black bear, cave bear)

0x7202 BEAR_CAVE should be linked with MBER3.2da, defaults to MBER.2da (shared with brown bear, black bear, polar bear)

0x7200 BEAR_BLACK should be linked with MBER4.2da, defaults to MBER.2da (shared with brown bear, polar bear, cave bear)

 

0x7401 DOG_WAR should be linked with MDOG2.2da, defaults to MDOG.2da (shared with wild dog)

 

0x7501 DOPPLEGANGER_GREATER should be linked with MDOP2.2da, defaults to MDOP.2da (shared with doppleganger)

 

0x7702 GHOUL_GHAST should be linked with MGHL2.2da, defaults to MGHL.2da (shared with ghoul)

 

0x7B01 WOLF_WORG should be linked with MWLF5.2da, defaults to MWLF.2da (shared with wolf and dire wolf)

0x7B02 WOLF_DIRE should be linked with MWLF6.2da, defaults to MWLF.2da (shared with wolf and worg)

 

0xA000 WYVERN (small wyvern) should be linked with MWYV2.2da, defaults to MWYV.2da (shared with big wyvern)


Edited by skellytz, 28 January 2022 - 09:17 PM.


#27 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 29 January 2022 - 01:34 PM

Here are three more engine-related issues (detailed info) that I hope you can help us solve. I've already attempted to fix these in Infinity Sounds or RBG1MPV, but with some limitations that can be avoided with TobEx.


Ok, i will look what can be fixed



#28 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 29 January 2022 - 01:43 PM

Hi skellytz

File based on BG1ToSC dataset with additional BGT copies/renames, probably it is not finished (or wrong) because i didn't reversed some BGT renames like BELT -> BELTBRD ?

I'll take a look and let you know if there are any problems.

I got issue with transferring Chars from  bg1 to bg2 part, BGT scripts (sbtimo.baf/...) change select_action4-7 for pure bg1 creature. If we will have prepared universal mixed Chars at start of BG1, no need to change these lines later



#29 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 30 January 2022 - 06:25 AM

Hi skellytz

Here are three more engine-related issues (detailed info) that I hope you can help us solve. I've already attempted to fix these in Infinity Sounds or RBG1MPV, but with some limitations that can be avoided with TobEx.

Please follow http://www.shsforums...tion-soundsets/ for engine-related issues



#30 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 01 February 2022 - 11:01 AM

Hi skellytz
 
to enable .CRE with mixed soudset:
1) use one of last tobex.dll from http://www.shsforums...tion-soundsets/
 
2) add to TobExTweak.ini:
Sound: Mixed Soundset for BGT=1
Sound: Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet=1

second option means: if no entry in BGSNDSET.2DA, assume creature as BG2 tyoe in any part of BGT
 
3) edit BGSNDSET.2DA http://www.shsforums...e-2#entry612192
 
3) copy BGSNDSET.2DA to override/ (http://www.shsforums...attach_id=30981)
 
4) BGSNDSET.2DA based on filenames, original engine has bug and lost first char of filename forever. I fixed it, but you need start new game or manually restore char at offset 0xf7 (NearInfinity name it Initial character) of .CRE in savegames
 


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


#31 skellytz

skellytz
  • Staff
  • 576 posts

Posted 01 February 2022 - 10:05 PM

OK, give me some more time to check BGSNDSET.2DA and test the soundsets.



#32 skellytz

skellytz
  • Staff
  • 576 posts

Posted 06 February 2022 - 07:57 PM

to enable .CRE with mixed soudset:
1) use one of last tobex.dll from http://www.shsforums...tion-soundsets/
2) add to TobExTweak.ini:
Sound: Mixed Soundset for BGT=1
Sound: Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet=1

second option means: if no entry in BGSNDSET.2DA, assume creature as BG2 tyoe in any part of BGT
3) edit BGSNDSET.2DA http://www.shsforums...e-2#entry612192
3) copy BGSNDSET.2DA to override/ (http://www.shsforums...attach_id=30981)
4) BGSNDSET.2DA based on filenames, original engine has bug and lost first char of filename forever. I fixed it, but you need start new game or manually restore char at offset 0xf7 (NearInfinity name it Initial character) of .CRE in savegames

Here's cleaned-up BGSNDSET.2DA without BGT-BG1-BG2 conflicts:

Attached File  BGSNDSET.zip   4.9K   115 downloads

 

I got issue with transferring Chars from  bg1 to bg2 part, BGT scripts (sbtimo.baf/...) change select_action4-7 for pure bg1 creature. If we will have prepared universal mixed Chars at start of BG1, no need to change these lines later

No problem, I'll fix that.

 


Edited by skellytz, 06 February 2022 - 08:35 PM.


#33 skellytz

skellytz
  • Staff
  • 576 posts

Posted 07 February 2022 - 03:35 PM

TobExTweak.ini key naming is inconsistent in the new ver (additional space after " : ")

 

Sound: Mixed Soundset for BGT -> Sound:Mixed Soundset for BGT
Sound: Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet -> Sound:Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet

Sound: Normalize Volume -> Sound:Normalize Volume
Sound: Normalize Volume Creatures Only -> Sound:Normalize Volume Creatures Only
Sound: Normalize Volume Debug Print -> Sound:Normalize Volume Debug Print

 

Sound:Mute Generic Attack Sound (only this one matches the existing keys)



#34 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 08 February 2022 - 10:17 AM

TobExTweak.ini key naming is inconsistent in the new ver (additional space after " : ")

 

Sound: Mixed Soundset for BGT -> Sound:Mixed Soundset for BGT
Sound: Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet -> Sound:Mixed Soundset for BGT. Unknow BG1 NPC have BG2 SoundSet

Sound: Normalize Volume -> Sound:Normalize Volume
Sound: Normalize Volume Creatures Only -> Sound:Normalize Volume Creatures Only
Sound: Normalize Volume Debug Print -> Sound:Normalize Volume Debug Print


Thx for reporting, i'l fix in next version