• Welcome to Valhalla Legends Archive.
 

Diablo II Game-Server (Hopefully simple)

Started by Win32, June 18, 2007, 07:26 AM

Previous topic - Next topic

Win32

Hi,

I'm writing a game server for open Diablo II games, pretty much simulating the built-in server features included within the game as a project for uni.

Funnily enough I've reached a stumbling block before I've been able to get anywhere. Taken from the information contained in BnetDoc's after a TCP connection is established with the game-server a packet containing 0xAF 0x1 is to be sent to the client. Well it appears as soon as this is done the connection is immediately closed (gracefully) by the client. Does anyone know the reason for this? I have noticed after monitoring the typical traffic of a open game that the (TCP) checksum's are incorrect, does Diablo II possibly implement a customized TCP system?

Any help would be much appreciated.


Cheers,
Matt.

ShadowDancer

first: this subforo isn't for discussion.
second: Hi, I was writing a d2 serv in the past i can help u if u want.
Quote from: MyndFyre-vL
No. We help people who help themselves.
http://sourceforge.net/projects/d2gs
http://assembla.com/space/d2gs

Win32

Not sure what a "subforo" is, but anyway...

Sure that would be great! Any information would be appreciated. Most notably that on which I described... can't really go anywhere before I get over this hurdle.

brew

Quote from: Win32 on June 18, 2007, 01:21 PM
Not sure what a "subforo" is, but anyway...
I think he typo'd and didn't read his post. Maybe he ment "this Sub Forum isn't for this kind of discussion"?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Ringo

Quote from: Win32 on June 18, 2007, 07:26 AM
Hi,

I'm writing a game server for open Diablo II games, pretty much simulating the built-in server features included within the game as a project for uni.

Funnily enough I've reached a stumbling block before I've been able to get anywhere. Taken from the information contained in BnetDoc's after a TCP connection is established with the game-server a packet containing 0xAF 0x1 is to be sent to the client. Well it appears as soon as this is done the connection is immediately closed (gracefully) by the client. Does anyone know the reason for this?
Any help would be much appreciated.


Cheers,
Matt.

hi
Just a side note, D2 when connecting to open/lan games, will connect to then disconnect from the host before bringing up the character screen, to check that the adress is listening on that port.
When you select a character, it will connect/login as normal.
Could that be what your seeing here?

Win32

#5
! Haha you're right. Man, thanks alot you saved me alot of time. I'm surprised such a thing isn't documented (or is it?)

One question, when is the 0xAF packet sent? During the initial test connection? Or on the primary?

[No matter, figured it out].

It seems the current info on BnetDocs is outdated, it would appear the initial acceptance protocol is as so; (Ignoring 0xAF)

C>S -- 0x68
S>C -- 0x5C
C>S -- 0x6D (Ping. I presume you're meant to echo this back)
C>S -- 0x6C (This packet doesn't appear to be documented)

Win32

#6
Hmm. Is there any documentation available for 0x6C (C>S) and 0xF1 (S>C)? It would seem they relate to character item data.


I have noticed something that I don't believe has been mentioned anywhere:

Ping 0x6D (C>S) is always responded to with a compressed packet, ID 0x1F with data "0x7F 0xFF 0xFF 0xFF 0xC0"


EDIT:
It appears that 0x5C (S>C) which is said to be in response to 0x68 no longer occurs, but is replaced with compressed packet 0x7A... which is of variable length. Is there any information on this packet?

Ringo


Win32

Thanks, I've actually been reading through those posts. But really wasn't sure they were up-to-date due to them being timestamped "2003" :S, thanks for the clarification.

I appreciate your help very much, would you mind assisting me along the way with other questions I may have? If not, that's fine, just let me know :)

Ringo

Im not very active these days, so your best bet is to post questions here, or to take up ShadowDancers offer :)
There are alot of users who could answer questions on D2GS in the botdev forum, probly where this topic will end up :P