Jump to content

Random 2DA descriptions


Ascension64

Recommended Posts

Probably already known, but not to the IESDP.

 

LVLMODWM (BG2)

Lvlmodwm.2da contains a table that determines how the spell level of a spell cast by a wild mage is modified.

Columns indicate a random starting level as determined by the 1D20 roll.

Rows indicate the wild mage's level.

Values in the table determine how much the spell level of the spell being cast is modified.

For example, a level 5 wild mage casts Magic Missile (spell level 1). A 1D20 rolls 15. The table value to use is 1. Therefore, Magic Missile is cast at spell level 2.

 

2DA V1.0

0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1

2 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 1 1 1 1 1 1

3 -2 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 2

4 -2 -2 -1 -1 -1 -1 -1 -1 0 0 0 0 1 1 1 1 1 1 2 2

5 -3 -2 -2 -1 -1 -1 -1 -1 -1 0 0 1 1 1 1 1 1 2 2 3

6 -3 -3 -2 -2 -1 -1 -1 -1 -1 0 0 1 1 1 1 1 2 2 3 3

7 -4 -3 -3 -2 -2 -1 -1 -1 -1 0 0 1 1 1 1 2 2 3 3 4

8 -4 -4 -3 -3 -2 -2 -1 -1 -1 0 0 1 1 1 2 2 3 3 4 4

9 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

10 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

11 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

12 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

13 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

14 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

15 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 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1 2 2 3 3 4 4 5

36 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

37 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

38 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

39 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

40 -5 -4 -4 -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 5

Link to comment
ANIMATION SOUNDS (BG2)

Each animation sound 2da contains soundset information associated with each animation with the same 4-letter animation code (see ANIMSND.2DA).

Rows are paired and are associated with an animation sequences (see SEQ.IDS).

The first row of each pair contains space-delimited sound resource references. When the animation sequence is played, one of the listed sounds are chosen at random. This is ignored if the sound name is identical to the default value (i.e. ***).

The second row of each pair contains the frame number of the animation cycle (see relevant BAM files) to play the chosen sound.

 

All the SEQ.IDS-related rows are always played unless the creature is STATE_SILENCED.

The rows Battle_Cry and Selection are used only if there are no available battle cry and selection sounds present within the CRE file, respectively.

 

For example, the file AIRELE1.CRE animation type is CGAMEANIMATIONTYPE_ELEMENTAL_AIR, coded as MAIR. It therefore uses MAIR.2DA for its animation soundset.

The ATTACK row pair has three sounds: airel01, nosound, and nosound, played at frames 2, 0, and 0, respectively. When this creature attacks, one sound from this list is chosen from random and played. Note "nosound" is an invalid sound, so no sound plays at all.

AIRELE1.CRE will use the Battle_Cry and Selection sounds in MAIR.2DA, because it has no valid battle cry and selection sounds present in the CRE file.

 

Mair/air elemental

***

SOUND

ATTACK airel01 nosound nosound

ATTACK 2 0 0

AWAKE ***

AWAKE 0

CAST ***

CAST 0

CONJURE ***

CONJURE 0

DAMAGE airel06

DAMAGE 0

DIE airel07

DIE 0

HEAD_TURN ***

HEAD_TURN 0

READY ***

READY 0

SHOOT ***

SHOOT 0

TWITCH ***

TWITCH 0

WALK ***

WALK 0

ATTACK_SLASH airel03 nosound nosound

ATTACK_SLASH 2 0 0

ATTACK_BACKSLASH airel04 nosound nosound

ATTACK_BACKSLASH 2 0 0

ATTACK_JAB airel05 nosound nosound

ATTACK_JAB 0

EMERGE ***

EMERGE 0

HIDE ***

HIDE 0

SLEEP ***

SLEEP 0

Battle_Cry airel01 airel02

Battle_Cry 0 0

Selection airel01

Selection 0

 

N.B. BG2:Throne of Bhaal has a bug where only the first and last sounds will play if there are more than 2 sounds listed under a row. The middle sounds will not play correctly. For example, MSOL.2DA has the following ATTACK row pair, and solarg02 will never play when a creature of animation CGAMEANIMATIONTYPE_SOLAR (MSOL) attacks.

 

Msol/Solar

***

SOUND

ATTACK solarg01 solarg02 nosound

ATTACK 0 0 0

Link to comment

Might as well clarify randcolr.2da while we're at it.

So I could theoretically have a creature with the Colour Index for Hair set to 203, which would randomly make the hair a metallic green, blue, or black (103, 96, and 21).
Not a great example, because 203 is SkinSet2 and in any case, the values are wrong for it. I'd use 202 (HairSet2) instead, in which case makes the hair either red-tinted black (0) or dark gold (2). Probably about an equal chance for either, since I'm guessing the engine rolls 1d10 to pick a value in those rows. I'd also delete the example for the sword, since it says further down "It seems random colours don't work with items, just colours on creatures and players."
The possibilities for this are quite big...
Not really true either, since the colour entries on the .cre files are BYTEs (0x2a - 0x32) meaning the maximum value for these entries is 255, and they go to 253 by default. However, there seems to be an unused stretch from about 120-199 (existing colour gradients go up to 119 according to this).
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...