What kinda of program are you making for Age? A DRS utility like Stoyan Ratchev's? That would be cool to have a visual interface instead of the dos version. You will have to open the file for binary, and read different bits of data, then convert it from hex to decimal, then convert it from decimal to ASCII. This is some code that I wrote just now to get the header info...
VB Code:
Private Sub Command1_Click() Dim buff As String, buff2 As Long 'declare variables Open "D:\Age of Empires II\Data\Interfac.drs" For Binary Access Read As #1 'change to your age of empires folder buff = String(40, Chr(0)) 'fill the buffer so that binary access works Get #1, 1, buff 'get the info into the variable buff MsgBox buff 'display buff to you buff = String(4, Chr(0)) 'repeat steps over to get version, tribe, etc. Get #1, 41, buff MsgBox buff buff = String(12, Chr(0)) Get #1, 45, buff MsgBox buff Get #1, 54, buff2 MsgBox buff2 Get #1, 59, buff2 MsgBox buff2 Close End Sub




Reply With Quote