Valhalla Legends Forums Archive | BnetDocs Research and Discussion | Request for Information: MCP_CREATEGAME

AuthorMessageTime
Arta
Hi,

I recently received a report indicating that this message is rather incorrect: http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=361

The contributor suggested the following:

[code]
(WORD)        Request Number
(BYTE)        Unused (0x00)
(BYTE)        Difficulty ('&H0 = Normal, &H1 = Nightmare, &H2 = Hell)
(WORD)        Unused (0x00)
(BYTE)        Always 0x01
(BYTE)        Character Difference (&HFF = No Difference)
(BYTE)        Max Players
(String)      Game Name
(String)      Game password
(String)      Game Description
[/code]

Can anyone confirm this? Normally I wouldn't need to check but this is so different from the version on BnetDocs that I wanted to be sure.
July 5, 2005, 2:49 PM
Archangel
[code]
    With clsPacketBuffer
        .iWord lngGameRequestID
        .iDWord &H0
        .iByte lngDifficulty
        .iByte &HFF
        .iByte lngPlayers
        .iNTString strGameName
        .iNTString strGamePass
        .iNTString strDescription
        .sMCPPacket MCP_CREATEGAME, frmBot.sckMCP
    End With
[/code]

I am using BnetDocs format and it works perfectly.
Thats what i have been using.
July 5, 2005, 3:10 PM
LordNevar
I have been using this since 1.09 and it hasn't stopped working yet. Although there is probably a easier way to do it now, I am a firm believer of don't fix it if it isn't broken.

[code]
        .InsertBYTE &H2 <~~~ Use to be needed, not sure now.
        .InsertWORD &H0
    If N.Value = True Then
        .InsertBYTE &H0 <~~~Normal Level
    End If
    If NM.Value = True Then
        .InsertBYTE &H10 <~~~ Nightmare Level
    End If
    If H.Value = True Then
        .InsertBYTE &H20 <~~~ Hell Level
    End If
        .InsertWORD &H0
        .InsertBYTE &H1
        .InsertBYTE &HFF <~~~Default (Unless you know what your doing)
        .InsertBYTE &H8 <~~~Player Count (Does not have to be 8)
        .InsertNTString Name.text
        .InsertNTString Pass.text
        .InsertNTString Description.text
        .InsertNTString ExDescription.text
        .InsertBYTE &H0
[/code]
July 5, 2005, 4:42 PM
Arta
Well, the code samples posted do not match up. The first corresponds to BnetDocs, but the second is closer to the format in my original post. Can someone look into this? Perhaps post a packet capture?

I expect the two code samples just both happen to work, and are both mostly right but inaccurate in places. Or something like that.
July 7, 2005, 1:17 AM
Ringo
[code]
With Buf
  .InsertWORD D2GRequestCount
  .InsertBYTE &H0 'unknown
  .InsertBYTE Bot.cboD2CreateNNMH.ListIndex * 16 'n/nm/h /0x00/0x10/0x20
  .InsertWORD &H0 'unknown
  .InsertBYTE &H1
If Bot.cboD2CreateDif.ListIndex = 0 Then
  .InsertBYTE &HFF 'no char differance
Else
  .InsertBYTE Bot.cboD2CreateDif.ListIndex - 1
End If
  .InsertBYTE Bot.cboD2CreateMaxP.ListIndex + 1 '1 to 8
  .InsertNTString InGameName
  .InsertNTString InGamePass
  .InsertNTString Bot.txtD2GameDescription.Text
  .SendRPacket &H3
End With
[/code]
This one was creating a normal game;
[code]
0000  16 00 03 21 00 00 00 00 00 01 FF 08 53 67 73 64    ...!........Sgsd
0010  67 73 67 00 00 00                                  gsg...
[/code]

This one was creating a mightmare game;
[code]
0000  1A 00 03 23 00 00 10 00 00 01 FF 08 44 73 66 67    ...#........Dsfg
0010  62 68 72 72 72 67 68 00 00 00                      bhrrrgh...
[/code]

This one was creating a hell game;
[code]
0000  19 00 03 25 00 00 20 00 00 01 FF 08 57 65 67 77    ...%.. .....Wegw
0010  67 65 77 65 67 67 00 00 00                        gewegg...
[/code]


hell game but lowerd max players to 5, and created a passworded game
[code]
0000  22 00 03 27 00 00 20 00 00 01 FF 05 53 67 68 72    "..'.. .....Sghr
0010  65 72 68 72 65 68 65 72 68 00 45 72 67 65 72 67    erhreherh.Ergerg
0020  00 00                                              ..
[/code]

hell game, 5 max players, player differnce was on 10 and game was passworded with a description
[code]
0000  2D 00 03 29 00 00 20 00 00 01 0A 05 57 65 67 77    -..).. .....Wegw
0010  65 67 71 65 67 00 41 66 61 73 66 00 64 65 73 63    egqeg.Afasf.desc
0020  72 69 70 74 69 6F 6E 61 73 66 61 66 00            riptionasfaf.
[/code]

[edit]
I think this one has changed a little from what is used now, but the format is almost the same. (S > C 0x06)
[code]
(WORD) Request Count
(DWORD) unknown
(DWORD) uptime
(BYTE) Unknown(0x01) its the byte speficted in the create game packet i think
(BYTE) Player differance
(BYTE) Max players that can be in the game
(BYTE) true number of players in the game
(BYTE[16]) Chartypes
(BYTE[16]) Level types
(STRING) Game description
~~~ for each true number of players in the game ~
(STRING) Char name
[/code]

The levels type strand always has another charname or game name string behind it (like the ladder packets)
but i dont think theres a formula to calculate the true number of players in the game anymore (can somone clarify?), as the players speficyed have almost always been in the game when iv joined.

a log;
[code]
0000  6A 00 06 1F 00 04 28 30 00 A1 03 00 00 01 FF 08    j.....(0........
0010  02 00 04 51 02 12 EA FD 74 50 18 FD 74 FF FF FF    ...Q....tP..t...
0020  FF 58 01 51 02 62 1C 03 75 94 B7 00 00 B4 EB 51    .X.Q.b..u......Q
0030  02 4E 20 32 20 73 6F 6A 73 20 6F 72 20 33 20 69    .N 2 sojs or 3 i
0040  73 74 73 20 6F 72 20 6C 69 67 74 68 20 73 6B 69    sts or ligth ski
0050  00 43 72 61 53 48 2D 59 6F 55 00 47 45 4D 53 2D    .CraSH-YoU.GEMS-
0060  52 55 4E 45 53 53 53 53 53 00                      RUNESSSSS.
[/code]
July 7, 2005, 1:24 AM
Elneroth
It is I who posted that on BNETDocs.
The information is packetlogged from the acuall D2 Client.
Although I've never attempted the BNETDocs format, it could still be right.
Here's my packetlogged information.

Normal, 3 Characters Max, No char Difficulty
TestGame1/TestPassword
[code]24 00 03 - Header
02 00 - Request Number
00 - Unused
00 - Difficulty (00 = Normal)
00 00 - Unused
01 - Always 01
FF - Character Difference (FF = None)
03 - Max Players (3)
54 65 73 74 67 61 6D 65 31 00 - Game Name (NT String)
54 65 73 74 70 61 73 73 77 6F 72 64 00  - Game Password (NT String)
00 - Game Description (NT String)[/code]

Nightmare, 4 Characters Max, No char Difficulty
TestGame2/TestPassword
[code]24 00 03 - Header
04 00 - Request Number
00 - Unused
10 - Difficulty (10 = Nightmare)
00 00 - Unused
01 - Always 01
FF - Character Difference (FF = None)
04 - Max Players (4)
54 65 73 74 67 61 6D 65 32 00 - Game Name (NT String)
54 65 73 74 70 61 73 73 77 6F 72 64 00 - Game Password (NT String)
00 - Game Description (NT String)[/code]

Hell, 5 Characters Max, No char Difficulty
TestGame3/TestPassword
[code]24 00 03 - Header
06 00 - Request Number
00 - Unused
20 - Difficulty (20 = Hell)
00 00 - Unused
01 - Always 01
FF - Character Difference (FF = None)
05 - Max Players (5)
54 65 73 74 67 61 6D 65 33 00 - Game Name (NT String)
54 65 73 74 70 61 73 73 77 6F 72 64 00 - Game Password (NT String)
00 - Game Description (NT String)[/code]

I see my original posts for difficulty are correct, it's not 0x00, 0x01, 0x02. In the packets it's 0x00, 0x10, 0x20.

Here's a fixed format.
[code](WORD)      Request Number (By 2...) 0x20, 0x40, 0x60, and so on.
(BYTE)        Unused (0x00)
(BYTE)        Difficulty ('&H0 = Normal, &H10 = Nightmare, &H20 = Hell)
(WORD)      Unused (0x00)
(BYTE)        Always 0x01
(BYTE)        Character Difference (&HFF = No Difference)
(BYTE)        Max Players
(String)      Game Name
(String)      Game password
(String)      Game Description[/code]

You can see above in Ringo's packetlogs that this format supports it, but his format at the end is incorrect.

Hope this helps.
July 9, 2005, 1:24 AM
LivedKrad
My research supports this theory as well - changed on BnetDocs for the time being.
July 9, 2005, 1:56 AM
Arta
Request number looks more like a byte (endianness) - does that second byte ever contain a value?
July 10, 2005, 12:42 PM
Elneroth
Nope, doesn't look like it throughout all of the logs.
July 11, 2005, 2:06 AM
LivedKrad
Theoretically it could, because the request ID increments indefinitely so long as you stay on the same Diablo II session.

At any rate, this packet seems to be answered and reformatted thoroughly, thanks contributors! Unstickied.
July 11, 2005, 2:37 AM

Search