If you haven't been following TobEx updates, Insominator has helped us immensely by implementing engine hacks necessary to fix some long-standing animation and soundset issues. Thanks to that, classic BG2 modders will now have a full toolset to tweak things like animation walking speed, footcircle size, walking sound frequency, chunked death and non-conflicting creature soundsets. Nothing short of amazing, as we'd been trying to get those features into the classics for years.
Considering these developments, does the IA Reference Picker need another rewrite? I'm willing and able, but would need a bit to re-familiarize myself with the inner workings.
Currently, when claiming a slot the IA Reference Picker suggests the following code (an example):
APPEND ~animate.ids~ ~0x54B8 WENDIGO~ UNLESS ~^0x54[Bb]8~
APPEND ~anisnd.ids~ ~0x54B8 ŁCK CGAMEANIMATIONTYPE_WENDIGO~ UNLESS ~^0x54[Bb]8~
This simply adds information to the IDS reference files, where:
0x54B8 is the animation offset hardcoded by IA as BG1 Simple Monster, Normal 3 footcircle size, unpaletted
WENDIGO is the animation name
ŁCK is the animation code used for BAM and 2DA soundset filenames (hardcoded by IA)
Without TobEx, the new animation will use the default hardcoded:
- walking sound (WAL_24[ABC].wav)
- walking sound frequency (~0.5 sec between each walking sound)
- walking speed (9)
- blood and chunked death behavior
With the original TobEx modders can set custom walking sounds:
APPEND ~aniwksnd.2da~ ~0x54B8 WENDIGO WAL_24 4~ UNLESS ~^0x54[Bb]8~
TobEx externalises all animation walking sounds to ANIWKSND.2DA, which allows modmakers to specify custom walking sounds by each animation ID. This is particularly useful for new animations introduced by Infinity Animations.
ANIWKSND.2DA
[ROWNAME]: animation ID
ANIMATION: the name of the animation for your reference (from ANIMATE.IDS)
WALK_SOUND: 6-character string specifying the root name of the walking sound. Longer strings are read truncated. Shorter strings cause havoc! A value of '*' is equivalent to no walking sound.
WALK_NUM: integer specifying the number of walking sounds available for the root name.
As per engine behaviour, a sound file will be loaded with name <WALK_SOUND><random>, where <random> is mapped 0 -> a, 1 -> b, 2 -> c, ..., (WALK_NUM - 1) -> nul.
Example:
WALK_SOUND WALK_NUM
0x1234 WAL_20 4
Walking sound for animation ID 0x1234 loads one of the following sounds:
WAL_20a [0]
WAL_20b [1]
WAL_20c [2]
WAL_20 [3]
If WALK_SOUND is set to 'TERRAIN' and WALK_NUM is set to '*', ANITNSND.2DA is used to determine the walking sound.
With the new version of TobEx AfterLife modders can override the hardcoded values:
APPEND ~extanim.2da~ ~0x54B8 10 30 * 56 0~ UNLESS ~^0x54[Bb]8~
- sets walking speed to 10
- sets walking sound frequency to 2 sec between each sound (30 / 15 = 2)
- keeps the footcircle size hardcoded to the animation slot
- sets blood color value to 56
- disables chunked death for this animation
----- Externalise Animation Config Override [M]
Externalise some usefull animation parameters to EXTANIM.2DA:
2DA V1.0
*
SPEED SND_FREQ PERSONAL_SPACE COLOR_BLOOD CHUNK_DEATH
0x7B00 9 140 5 48 *
Frst column - animation id
SPEED - walk speed
SND_FREQ - walk sound refresh time, in ticks (tick = 1/15 sec)
PERSONAL_SPACE - foot/selection size
COLOR_BLOOD - color of creature's blood
CHUNK_DEATH - enable chunk death animation
* - skip changes to this parameter
Note: chunk_death accepts 0 (disabled) and 1 (enabled), but internally it instructs the game engine just like color_chunks in BGEE animation INI. In case you're curious, I've updated the descriptions on IESDP:
color_chunks = intThis attribute accepts color gradient values 0-255, but contrary to the key name, it does not change the blood color of the chunked death animation. Instead, it currently works like a switch to enable or disable the chunking animation on death. Any value 0-254 enables the chunked death, and 255 disables it.
sound_freq = int
This attribute specifies the frequency of playing walking sounds to match them with walking animations. It is measured in ticks (1 tick = 1/15 second). For example, "sound_freq=150" plays walking sounds every 10 seconds, and "sound_freq=8" plays walking sounds every 0.5 second.
All appends together:
APPEND ~animate.ids~ ~0x54B8 WENDIGO~ UNLESS ~^0x54[Bb]8~
APPEND ~anisnd.ids~ ~0x54B8 ŁCK CGAMEANIMATIONTYPE_WENDIGO~ UNLESS ~^0x54[Bb]8~
APPEND ~aniwksnd.2da~ ~0x54B8 WENDIGO WAL_24 4~ UNLESS ~^0x54[Bb]8~ // requires TobEx
APPEND ~extanim.2da~ ~0x54B8 10 15 * 56 0~ UNLESS ~^0x54[Bb]8~ // requires TobEx AfterLife
Do you think the IA Reference Picker should help modders further tweak their animations using the GUI?