SRC file format
Applies to:
PST, PSTEE
General Description
This file format contains strrefs for out-of-dialog text (e.g text displayed over the character on the game screen). Text is usually displayed over the creature's head, and the associated sound is played.
Detailed Description
SRC files have a very simple header, only containing the count of strref entries. Each strref entry is eight bytes and consists of a strref and the relative weight of the entry (usually set to 1).
The weight defines how often an entry is picked in relation to the other entries. Higher weights increase the probability for the entry to be picked more often by the engine. It can be approximated by this formula:
Overall structure
The weight defines how often an entry is picked in relation to the other entries. Higher weights increase the probability for the entry to be picked more often by the engine. It can be approximated by this formula:
probability = weight * 100 / sum_of_all_weights
.
Overall structure
Offset | Size (data type) | Description |
---|---|---|
0x0000 | 4 (dword) | Entry count |
Offset | Size (data type) | Description |
---|---|---|
0x0004 | 4 (dword) | Strref |
0x0008 | 4 (dword) | Weight |