Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - chuanhsing

#1
Check if second byte smaller than 0x10 (max players) and bigger than 0x1 (min player). And check third byte equal to OPcode(0x0, 0x83).
#2

messages & blinks can be interleaved in any order.

#3
Quote from: newbiz on March 04, 2010, 01:40:02 AM
Thank you very much ! These are very valuable information ^^
Did you figure it out yourself or are you in a parser project ? If not, you can join my effort @ http://projects.coderbasement.com/projects/show/sc2replay
I'm not in a parser project, just for fun.


I'm also writing these in Sourcepeek.com.
#4
It's the function of Alt+g (blink on map).


* Unknown Function, 7 bytes for each, always at header
** 0x0, maybe Frame ?
** unknown
** 0x80, maybe OPcode ?
** 0x0
** 0x0
** unknown
** unknown
* Message Function
** Accumulate Frames, 1-N bytes, Big Endian and Frame/64=Second
** Sender, 1 byte
** OPcode, 1 byte, 0x0 to all, 0x2 to alliance
** Message Len, 1 byte
** Message Content, n bytes from Message Len
* Blink Function (alt+g on Map)
** Accumulate Frames, 1-N bytes
** Player, 1 byte
** OPCode, 1 byte, 0x83
** X, 4 bytes
** Y, 4 bytes
#5






00 22 80 00 00 1D 00
00 21 80 00 00 1D 00
00 22 80 00 00 32 00
00 21 80 00 00 32 00
00 23 80 00 00 1C 00
00 23 80 00 00 1E 01
00 23 80 00 00 25 00
00 23 80 00 00 27 01
00 23 80 00 00 2F 00
00 23 80 00 00 32 00
35 B8 03 83 00 F1 F0 81 01 00 20 01
99 E6 03 83 00 84 93 86 00 3C 1A 06
01 EE 03 83 00 B4 D3 81 00 45 E7 06
01 B5 04 83 01 11 9A 85 00 6C 10 06
01 B8 03 83 01 00 69 84 00 FE 7D 07
09 3F 03 83 00 8E 3A 80 01 27 54 03
3D 67 03 83 01 02 05 82 00 F3 0E 05
11 44 03 83 01 00 69 84 01 08 4B 00
   10 03 83 01 06 D8 83 00 FE 7D 07
41 3E 03 83 00 ED 1D 80 01 05 06 05
05 E3 03 83 00 C1 B0 86 01 00 20 01
19 51 03 83 00 AE 64 82 00 6D 1C 01
59 4E 03 83 01 28 9E 82 00 EF CA 03
29 47 03 83 00 99 7C 80 01 1F 29 04
15 04 03 83 00 AE 64 82 00 6B 79 07
31 71 03 83 00 69 3C 85 00 28 80 05
0D 51 02 00 02 67 67
   8C 03 00 02 67 67
   C0 04 00 02 67 67
09 BD 03 83 00 32 8E 84 00 97 94 06
   28 01 00 1E 68 6F 77 20 64 6F 20 79 6F 75 20 73 74 6F 70 20 6D 61 73 73 20 73 74 61 6C 6B 65 72 73 3F
05 18 03 00 12 6D 61 73 73 20 73 74 61 6C 6B 65 72 73 20 73 75 63 6B
   C8 04 00 15 69 64 6B 20 49 20 64 6F 6E 27 74 20 70 6C 61 79 20 74 6F 73 73
09 0D 01 00 18 79 6F 75 20 74 68 69 6E 6B 20 73 74 61 6C 6B 65 72 73 20 73 75 63 6B 3F
05 1A 03 00 07 74 68 65 79 20 64 6F
01 4B 03 02 14 75 6E 6C 65 73 73 20 75 20 6C 65 74 20 68 69 6D 20 67 65 74
01 7E 03 00 19 75 6E 6C 65 73 73 20 75 20 6C 65 74 20 68 69 6D 20 67 65 74 20 6C 69 6B 65
   30 03 00 03 69 64 6B
   18 01 00 2A 79 6F 75 27 64 20 70 72 65 66 65 72 20 6D 61 73 73 20 70 72 6F 64 75 63 69 6E 67 20 6D 61 72 69 6E 65 73 20 74 68 65 6E 20 3F
   10 03 00 02 36 30
01 8E 03 00 0C 69 74 20 77 6F 72 6B 65 64 20 3B 33
01 5A 01 00 03 6C 6F 6C
   E0 01 00 02 3A 29
01 66 03 83 00 44 3F 82 00 54 9B 03
01 CA 01 00 02 67 67
01 4C 03 00 02 67 67
#6

elapsed frames | player id | zero | msg length | msg
         05 2C |        01 |   00 |         02 |                                     68 69
            68 |        01 |   00 |         05 |                            66 72 6F 6D 3F

The second message was chatted at (0x52c+0x68)/64 sec.


I don't have any frame field that is over 5 bytes. Maybe there is something wrong.
#7
Quote from: newbiz on March 04, 2010, 02:07:31 AM
Any idea how to guess the number of headers at the beginning of the file ?

A poor idea is:


while(BMessage[HeadPointer]==0 && BMessage[HeadPointer+2]==0x80 && BMessage[HeadPointer+3]==0 && BMessage[HeadPointer+4]==0) {
    HeadPointer += sizeof(SC2MessageHead);
}
#8
= Message Structure (replay.message.events) =


* Unknown Function, 7 bytes for each, always at header
** 0x0, maybe Frame ?
** unknown
** 0x80, maybe OPcode ?
** 0x0
** 0x0
** unknown
** unknown
* Message Function
** Accumulate Frames, 1-N bytes, Big Endian and Frame/64=Second
** Sender, 1 byte
** OPcode, 1 byte, 0x0 to all, 0x2 to alliance
** Message Len, 1 byte
** Message Content, n bytes from Message Len
* Blink Function (alt+g on Map)
** Accumulate Frames, 1-N bytes
** Player, 1 byte
** OPCode, 1 byte, 0x83
** X, 4 bytes
** Y, 4 bytes

= Info Structure (replay.info) =


* Players, 1 byte, always 0x10
** Player Name Length, 1 byte
** Player Name, N bytes from Player Name Length
** Player Info, 5 bytes
* MapInfo
** Unknown, 4 bytes
** unkDLen, 1 byte, always 0x4
** unkDefault, unkDLEn bytes, "Dflt"
** allianceLocked, 1 byte, (allianceLocked & 0x01) if alliances are locked
** Unknown, 1 byte
** Game Speed, 1 byte. 0 ~ 4, 4 is More Faster
** Unknown, 11 bytes
** Map Cache Length, 1 byte, always 0x4B
** Map Cache Path, 0x4B bytes
* Unknown, 686 bytes
* S2MA * 5
** S2MA, 4 bytes, "s2ma"
** Zero, 1 byte
** BattleNet, 3 bytes, "KRB"=KR Battle.Net, "EUB", "USB"
** MD5?, 32 bytes
* Unknown, X bytes
* MapLen1, 1 byte
* MapLen2, 1 byte
* Map Name, MapLen1<<2+MapLen2 bytes
* Zero, 1 byte, always 0x0
* Players, 4 bytes, always 0x10
** Player Name Length, 1 byte
** Player Name, N bytes from Player Name Length
** Player Race Length, 1 byte
** Player Race, N bytes from Player Race Length
** Player Color Length, 1 byte
** Player Color, N bytes from Player Color Length

= Sync Structure (replay.sync.events) =

* 1 bytes, always 4
* 2 bytes, unknown
* 1 bytes, always 0 or 1


Elapse Time (sec) = (filesize of replay.sync.events) / 64;



= Game Structure (replay.game.events) =


Start OPcode
* 00 01 1B, player1 initial
* 00 02 1B, player2 initial
* 00 10 05, game start


Action OPcode
* Accumulate Frames, 1~N bytes, Big Endian
* Player, 1 byte, 0x21 or 0x61 -> player1
* OpCode, 1 byte


OPCodes
* 0x81, Move Camera
** X, 4 bytes
** Y, 4 bytes
** Hor, 4 bytes
** Vet, 4 bytes
** Unknown, 4 bytes
* 0x0B, Unit Action, like building, morph, research, upgrade, order, ability
* 0x3C,
* 0xAC, Select Unit
* 0x0D,
* 0x1D,