Oregon Trail dialogue format
Dialogue from The Oregon Trail at cities, rivers, and outposts is stored in the DIALOGS.REC file. Each record has two values, the name of the person speaking and their dialogue with a fixed with of 29 and 254 bytes respectively. Both the name and dialogue are prefixed with a single-byte for the length of the data. Each of the 17 stops on the trail has a total of three dialogues, so there are a total of 51 records in the file.
|UINT8 Name length||The number of characters to read for the Name.|
|char Name||The title and name of the person speaking.|
|UINT8 Dialogue length||The number of characters to read for the Dialogue.|
|char Dialogue||What the person says.|
When displayed in the game, " tells you:" is concatenated to the end, and the dialogue is wrapped in double quotes.
This FreeBASIC program will print each of the game's dialogues.
Dim As UByte StringLength Dim As Integer I, Record Dim As String Character, Title, Dialogue Open "DIALOGS.REC" For Binary As #1 For Record = 1 To 51 Title = "" Get #1, , StringLength For I = 0 To 28 Character = " " Get #1, , Character Title = Title + Character Next I Print Str(Record) + ".) " + Left(Title, StringLength) + " tells you:" Dialogue = "" Get #1, , StringLength For I = 0 To 254 Character = " " Get #1, , Character Dialogue = Dialogue + Character Next I Print Chr(34) + Left(Dialogue, StringLength) + Chr(34) Print Next Record Sleep
This format was reverse engineered by TheAlmightyGuru. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)