pvpgn / pvpgn-server

Next generation of PvPGN server
https://pvpgn.pro
GNU General Public License v2.0
541 stars 155 forks source link

HRTL support #16

Open khanduras opened 10 years ago

khanduras commented 10 years ago

Is it possible to get HRTL client support built into PvPGN?

http://khanduras.net/repo/pvpgn-src-1_8_5_with-mysql-5_0_91hrtl-rar/

RElesgoe commented 10 years ago

What's wrong with it?

khanduras commented 10 years ago

It doesn't exist.

https://github.com/HarpyWar/pvpgn/blob/master/src/common/tag.h

No support for HRTL client.

RElesgoe commented 10 years ago

Well the first link said that the HRTL client code is accepted..

khanduras commented 10 years ago

Yes, that was done by me and it doesn't work. Also I'm no expert so I wanted confirmation that it was done correctly and then merged with the master.

RElesgoe commented 10 years ago

In the world of programming, you'll get no help with the words "it doesnt work" Explain with more detail

khanduras commented 10 years ago

I don't think I added HRLT support correctly, I'm not knowledgeable enough to say how it's done. And Hellfire client doesn't have Battle.net support natively and I don't know how to add it.

RElesgoe commented 10 years ago

If Hellfire doesn't have native Battle.net support, then it needs to be programmed to send and receive packets for PvPGN

khanduras commented 10 years ago

Yeah that's what we figured. We tried to use Diablo's battle.snp but none work. I don't know if it's because HRTL support in PvPGN is incorrectly programmed or if the battle.snp from Diablo is a dud.

http://khanduras.net/forums/pvpgn-developments/hellfire-and-pvpgn/

You can see in there what the snp file format looks like. It's a dll file and a mpq file.

HarpyWar commented 10 years ago

@xboi209 is right. Hellfire client must have Battle.net support, then it will be added to PvPGN.

khanduras commented 10 years ago

How can we get that added?

HarpyWar commented 10 years ago

There are code dependencies in PvPGN that can be searched by "DRTL" in whole project files. Tag HTRL should be added the same way. Also new characters have to be added in code: barbarian, bard, monk (near the code with: warrior, rogue, sorcerer).

What about Hellfire - I don't know how to upgrade client to get it working with PvPGN.

khanduras commented 10 years ago

I was shown this: https://github.com/bwapi/bwapi/tree/master/bwapi/SNP_DirectIP It gives Starcraft a Direct IP method of playing online. DragonKing got it it work with Hellfire, perhaps there's something there?

HarpyWar commented 10 years ago

May be. Does Hellfire initially support multiplayer between players or not? I can modify PvPGN to support Hellfire, but not vice versa.

RElesgoe commented 10 years ago

I think from what I read, Hellfire had bnet support in 1.00 but the option was removed in 1.01 The network code is probably still there to handle packets

khanduras commented 10 years ago

Incorrect, Hellfire has never had Battle.net ever. It has UDP multiplayer but nothing more, I don't think it officially had multiplayer, it was a standard.snp file from Starcraft that gave Hellfire UDP.

RElesgoe commented 9 years ago

@khanduras can I get your email address for further discussion

khanduras commented 9 years ago

Yeah sure, danieljames@chiefqualakon.net 

RElesgoe commented 8 years ago

With DxWnd on Windows 10, and using Diablo 1's Battle.snp from patch 1.04(using Battle.snp from any newer patch causes an error about not finding an ordinal, Storm.dll has to be replaced too I guess, I haven't tried yet), I was able to get into the Battle.net screen. There was a popup box with no text in it however, and notably no way to select a server to connect to(Battle.net used to be one server). hellfirebnet

I looked into Hellfrui.dll and could safely assume that there is code for full Battle.net support because of these dialogs: image image

I believe this really is a matter of enabling everything, we'll just need someone who's good at reverse engineering here.

RElesgoe commented 8 years ago

I redirected requests to exodus.battle.net to 127.0.0.1 using my Hosts file and then started PvPGN on my computer and got this screen when trying to connect: hellfirebnet2 I believe the missing text problem is a bug with Windows 10 because StarCraft has some problems with displaying text as well(not exactly the same problem though), it may be because of DxWnd but I don't know. Maybe Hellfire doesn't have the text at all, either way it's probably the same Unable to connect to Battle.net ... message that StarCraft has: image

PvPGN also shows abnormal packets coming through: image This might be the protocol ID byte that clients send to indicate the type of connection they want. Why is Hellfire sending a UDP packet to begin a connection?

After removing packet checks in PvPGN, this is what I'm getting: image Note the packet type keeps changing whenever I recompile PvPGN and try connecting again...

What could a UDP packet of 1 byte possibly be?

RElesgoe commented 8 years ago

Instead of removing packet checks, I modified t_udp_header's struct to use bn_byte instead of bn_int which then required changing the packet_set_type() function in packet.cpp to support bn_byte. bn_int_set(&packet->u.udp.h.type, type); -> bn_byte_set(&packet->u.udp.h.type, (uint8_t)type);

The one byte of data that Hellfire is sending to the server is a hexadecimal value of 0x20. PvPGN shows the packet type to be 0xcdcdcd20, that doesn't seem right but whatever. StarCraft Beta also uses the same protocol. The packet should be handled in handle_udp_packet() by adding a new case to the switch-case statement but how should PvPGN respond to this? The protocol is very ancient so BNETDocs is of no help.

Note: Winsock 1.1 is used

RElesgoe commented 8 years ago

I just tested with StarCraft 1.00 and found out that 1) it uses the same protocol as Hellfire/StarCraft Beta and 2) Battle.net still supports this protocol and therefore allows it to connect(although wants it to upgrade to the latest patch).

I think I'll need a second computer to host a PvPGN server since Winsock's bind() function is failing when the client is connecting to my server which is on the same computer, must be because both the server and client are using port 6112. When the bind() function fails, the client sends 0x20 in a UDP packet however when the function is successful, the communication is very different.

Since I can monitor how the client and server communicates using this protocol, I can now implement the protocol in PvPGN and hopefully get Hellfire to connect.

khanduras commented 4 years ago

Hello folks,

Looking to get this re-addressed. We now have the source code for Hellfire. Along with the source for PvPGN, it makes sense to me that we should be able to get Hellfire support. Is this something someone is willing to take a look at?

I'll drop the link to the source here: https://archive.org/details/hellfire_source

I'm not too sure what I'm looking at yet, I'm hoping there's a smarter wizard out there. 😁

HarpyWar commented 4 years ago

A manual with first steps to who can do it https://github.com/pvpgn/diablo-hellfire

khanduras commented 4 years ago

Appreciate the share HarpyWar. I guess there are some folks that doubt the legality and if your repo gets DMCA'd then we'll know Actiblizzard's stance on the matter.

@RElesgoe Is this something you can pick up again? Hope all is well in your little world right now. If you wanted to see anything from the old Khanduras site, there are some archives here: https://web.archive.org/web/20161213050735/http://khanduras.net/forums/pvpgn-developments/hellfire-and-pvpgn/

I have a copy of the files and such so if you need something else let me know. Ever so grateful

RElesgoe commented 3 years ago

@khanduras For some reason, I can't get hellfire to load Battle.snp. Are you able to?

Maxpire commented 3 years ago

Oh wow! I would like to see Hellfire battle.net finally! I've made tutorials and stuff online on discord so people can setup Hellfire Multiplayer and a fixed version from Mordor, and some tweaks from a friend of mine on Discord. We use Zerotier to play with ipx (ipx wrapper thank you) And some people don't play because of no battle net. That would please me greatly.