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.