Skip to content

Expanded CREature sounds (mod)

GoidaGoida Member Posts: 118
edited April 2019 in General Modding
The Infinity Engine has two IDS files listing sounds that creatures can have in their CRE files - their battle cries, damage groans, leader boasts and jibes. The first is SNDSLOT and the other is SOUNDOFF. Strangely enough, they are not identical. SOUNDOFF appears to list sounds of a category, e.g. position 55 in SNDSLOT is RESPONSE_TO_COMPLIMENT1 (and there are several more responses below), but in SOUNDOFF 55 belongs to RESPONSE_TO_COMPLIMENT, no number. The following numbers, 56 and 57, do not exist here. The practical takeaway is that there is a function gap between two actions, SetPlayerSound(O:Object*,I:STRREF*,I:SlotNum*SNDSLOT) and VerbalConstant(O:Object*,I:Constant*SOUNDOFF) (as well as the VerbalConstantHead version). Only the limited selection from SOUNDOFF is available for playing, though all the sounds from CRE files can be set in the other file.

This is restrictive for those who want to flesh out NPC with more sounds in empty slots, the ones that never get used. In particular, party NPC have freely available slots EXISTANCE1 - 4, not to touch EXISTANCE5, which is said to control the biography (though there is also BIO). These EXISTANCE sounds along with PICKED_POCKET, INVENTORY_FULL and others can play randomly for non-global creatures, but all of the NPC are global, so there is no danger of them uttering something off except when you want them. However, it is impossible to order anyone to play the EXISTANCE range and many other sounds, simply because they are not listed in SOUNDOFF. Instead SOUNDOFF is limited to the first sound in the category. If you have three different sounds in BATTLE_CRY1 - 3, forcing a verbal constant with BATTLE_CRY only plays number 1.

I went ahead and replaced the contents of SOUNDOFF with the full range from SNDSLOT. Now it's possible to play all of the sounds that can be set. You can even display NPC's biography in the bottom window if you like. The only concern I had is what was going to happen to mods used to the limited range of the old SOUNDOFF during a Weidu installation or in script commands. The change would have been all right for scripts that only used line numbers in references to SOUNDOFF, 9 is 9, but most BAF files people write up probably use the words BATTLE_CRY, because who remembers those numbers and why bother, if the script compiler will recognize them and convert? It is the same thing with Weidu. I myself have written out BATTLE_CRY, no number, many times for my creatures' TRA references just because I had no option to set the separate sounds and didn't understand that only the first sound played (I thought they played at random from the category).

With an expanded SOUNDOFF the numberless references became invalid. Typing BATTLE_CRY when installing on a machine with an upgraded SOUNDOFF would produce an error, and scripts that referred to the lines by words would fail to compile. I realized that I had to give duplicate references inside the new SOUNDOFF that would be recognizable by old scripts and Weidu. Thus, the battle cries category now begins with BATTLE_CRY, at the same number 9 as the following line for BATTLE_CRY1. This solved the compatibility problem. Modders who want to make use of the new file should copy the SOUNDOFF to override before trying to compile their BAFs and setting TRA sound slot references.

The only curious spot in the changed file is in the selection sounds. The old SOUNDOFF had a SELECT_RARE at number 35, which in SNDSLOT corresponds to SELECT_COMMON4 and the next two selection sounds, truly rarely heard, if at all. In SOUNDOFF's thinking the rare selection sounds are just those common ones that are farther down on the list, yet there are also two separate slots in SNDSLOT for SELECT_RARE, at 63 and 64. This is a real discrepancy in thinking if not in execution. One file was analog, continuous, about rarity, and the other had two distinct categories, common and rare. I sided with the notion of SOUNDOFF about where the rare sounds go, because, after all, that's the file controlling what is played. But I kept the SELECT_RARE1 and SELECT_RARE2 references at 63-64 of the hybrid file, for anyone who wants to fill and play back those slots.

A comparison of the files follows.

Sounds available for playing from SOUNDOFF
0 INITIAL_MEETING
1 MORALE
2 HAPPY
3 UNHAPPY_ANNOYED
4 UNHAPPY_SERIOUS
5 UNHAPPY_BREAKING_POINT
6 LEADER
7 TIRED
8 BORED
9 BATTLE_CRY
14 ATTACK
18 DAMAGE
19 DYING
20 HURT
21 AREA_FOREST
22 AREA_CITY
23 AREA_DUNGEON
24 AREA_DAY
25 AREA_NIGHT
26 SELECT_COMMON
32 SELECT_ACTION
35 SELECT_RARE
39 INTERACTION
44 INSULT
47 COMPLIMENT
50 SPECIAL
53 REACT_TO_DIE_GENERAL
54 REACT_TO_DIE_SPECIFIC
55 MISCELLANEOUS
55 RESPONSE_TO_COMPLIMENT
58 RESPONSE_TO_INSULT
59 DIALOG_HOSTILE
60 DIALOG_DEFAULT

Sounds available for setting in SNDSLOT
0 INITIAL_MEETING
1 MORALE
2 HAPPY
3 UNHAPPY_ANNOYED
4 UNHAPPY_SERIOUS
5 UNHAPPY_BREAKING_POINT
6 LEADER
7 TIRED
8 BORED
9 BATTLE_CRY1
10 BATTLE_CRY2
11 BATTLE_CRY3
12 BATTLE_CRY4
13 BATTLE_CRY5
14 ATTACK1
15 ATTACK2
16 ATTACK3
17 ATTACK4
18 DAMAGE
19 DYING
20 HURT
21 AREA_FOREST
22 AREA_CITY
23 AREA_DUNGEON
24 AREA_DAY
25 AREA_NIGHT
26 SELECT_COMMON1
27 SELECT_COMMON2
28 SELECT_COMMON3
29 SELECT_COMMON4
30 SELECT_COMMON5
31 SELECT_COMMON6
32 SELECT_ACTION1
33 SELECT_ACTION2
34 SELECT_ACTION3
35 SELECT_ACTION4
36 SELECT_ACTION5
37 SELECT_ACTION6
38 SELECT_ACTION7
39 INTERACTION1
40 INTERACTION2
41 INTERACTION3
42 INTERACTION4
43 INTERACTION5
44 INSULT1
45 INSULT2
46 INSULT3
47 COMPLIMENT1
48 COMPLIMENT2
49 COMPLIMENT3
50 SPECIAL1
51 SPECIAL2
52 SPECIAL3
53 REACT_TO_DIE_GENERAL
54 REACT_TO_DIE_SPECIFIC
55 MISCELLANEOUS
55 RESPONSE_TO_COMPLIMENT1
56 RESPONSE_TO_COMPLIMENT2
57 RESPONSE_TO_COMPLIMENT3
58 RESPONSE_TO_INSULT1
59 RESPONSE_TO_INSULT2
60 RESPONSE_TO_INSULT3
61 DIALOG_HOSTILE
62 DIALOG_DEFAULT
63 SELECT_RARE1
64 SELECT_RARE2
65 CRITICAL_HIT
66 CRITICAL_MISS
67 TARGET_IMMUNE
68 INVENTORY_FULL
69 PICKED_POCKET
70 EXISTANCE1
70 HIDDEN_IN_SHADOWS
71 EXISTANCE2
71 SPELL_DISRUPTED
72 EXISTANCE3
72 SET_A_TRAP
73 EXISTANCE4
74 EXISTANCE5
74 BIO

New, hybrid SOUNDOFF

0 INITIAL_MEETING
1 MORALE
2 HAPPY
3 UNHAPPY_ANNOYED
4 UNHAPPY_SERIOUS
5 UNHAPPY_BREAKING_POINT
6 LEADER
7 TIRED
8 BORED
9 BATTLE_CRY
9 BATTLE_CRY1
10 BATTLE_CRY2
11 BATTLE_CRY3
12 BATTLE_CRY4
13 BATTLE_CRY5
14 ATTACK
14 ATTACK1
15 ATTACK2
16 ATTACK3
17 ATTACK4
18 DAMAGE
19 DYING
20 HURT
21 AREA_FOREST
22 AREA_CITY
23 AREA_DUNGEON
24 AREA_DAY
25 AREA_NIGHT
26 SELECT_COMMON
26 SELECT_COMMON1
27 SELECT_COMMON2
28 SELECT_COMMON3
29 SELECT_COMMON4
30 SELECT_COMMON5
31 SELECT_COMMON6
32 SELECT_ACTION
32 SELECT_ACTION1
33 SELECT_ACTION2
34 SELECT_ACTION3
35 SELECT_RARE
35 SELECT_ACTION4
36 SELECT_ACTION5
37 SELECT_ACTION6
38 SELECT_ACTION7
39 INTERACTION
39 INTERACTION1
40 INTERACTION2
41 INTERACTION3
42 INTERACTION4
43 INTERACTION5
44 INSULT
44 INSULT1
45 INSULT2
46 INSULT3
47 COMPLIMENT
47 COMPLIMENT1
48 COMPLIMENT2
49 COMPLIMENT3
50 SPECIAL
50 SPECIAL1
51 SPECIAL2
52 SPECIAL3
53 REACT_TO_DIE_GENERAL
54 REACT_TO_DIE_SPECIFIC
55 MISCELLANEOUS
55 RESPONSE_TO_COMPLIMENT
55 RESPONSE_TO_COMPLIMENT1
56 RESPONSE_TO_COMPLIMENT2
57 RESPONSE_TO_COMPLIMENT3
58 RESPONSE_TO_INSULT
58 RESPONSE_TO_INSULT1
59 RESPONSE_TO_INSULT2
60 RESPONSE_TO_INSULT3
61 DIALOG_HOSTILE
62 DIALOG_DEFAULT
63 SELECT_RARE1
64 SELECT_RARE2
65 CRITICAL_HIT
66 CRITICAL_MISS
67 TARGET_IMMUNE
68 INVENTORY_FULL
69 PICKED_POCKET
70 EXISTANCE1
70 HIDDEN_IN_SHADOWS
71 EXISTANCE2
71 SPELL_DISRUPTED
72 EXISTANCE3
72 SET_A_TRAP
73 EXISTANCE4
74 EXISTANCE5
74 BIO

Comments

  • AndreaColomboAndreaColombo Member Posts: 5,524
    edited April 2019
    This might be of interest to you ;)

    Shouldn't you already be able to set all those sounds in animations' INI files?
  • GoidaGoida Member Posts: 118
    This might be of interest to you ;)

    If you mean that there are also sounds played from INI and various bugs, I'm aware of that. Otherwise that topic has 47 replies.
Sign In or Register to comment.