Jump to content

NegativeOne

Members
  • Content Count

    13
  • Joined

  • Last visited

  • Days Won

    2

NegativeOne last won the day on December 30 2019

NegativeOne had the most liked content!

Community Reputation

16 Fine

1 Follower

About NegativeOne

  • Rank
    Indium Shaman

Previous Fields

  • Favorite pizza topping
    Jalapeno
  • Why do you want to join DarkMatters?
    Lobby Emulator

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Very great, you said you wanted to get the domain and now you have it. This will make more people play online again. Opennet is not closenet but it is better than using a vpn to play the lan mode.
  2. That sounds good. I'll try your updated lobby soon. The important question about the lobby to get answers for is if my changes work with multiple players in the lobby because I could only test it with 2 accounts on the same computer. I'm currently trying to understand how the buddy list and ignore list work, but so far I can't get it to work in the lobby. EDIT: Here is a small fix for the warning you get when multiple people log in to lobby chat: https://pastebin.com/w5BD1pmJ
  3. That was closed net and I don't think we will get that working. If you start the game server with parameters for closed net you will see an error message that states it's not supported. They probably had special servers for closed net and unless someone figures out what the differences are we have to stick to open net servers.
  4. @xrystal Here is a diff with all the changes I made so far: https://pastebin.com/y7ag25RV It must be applied to commit 6e4113c8a3a689a3e76e548d9a5fcd9a3756091f "initializes repo with source code from cocomed" in your repository or you will get merge conflicts. I needed to use the sqlite version for my tests and you have to look into updating the new chat stuff to mysql. I can't test anything with mysql until next week, so for the moment I only cared about getting it to work with sqlite. For the future I want to look into having both mysql and sqlite support in the code and switch between them with a config option. I also had to touch all payloads to make this work, so the diff is pretty long. The changes in this diff between the @cocomed source code and my stuff: Unlist servers that disconnect or crash Lobby port and chat server port can also be changed in ip.cfg Support password protected servers Simple chat implementation for lobby screen Show number of players on servers Fixed a crypto problem with server session keys (required for password protected servers) Right now the chat system is very simple, it only supports the lobby chat and the 2 hardcoded channels that are required to make it work at all. New channels can't be created and trying to add players to the buddy list or ignore list will hang the game and disconnect the player from the lobby. Format for ip.cfg: [PUBLIC LOBBY IP ADDRESS] (default: localhost) [LOBBY SERVER PORT] (default: 6800) [CHAT SERVER PORT] (default: [LOBBY SERVER PORT + 1] / 6801) Example: 192.168.100.10 7000 7100 I'll be back next year. Post any problems here if anything with my changes is not working correctly and I'll look at it when I come back.
  5. That's the strange thing about those packet logs. They contain recent dates, so they are not very old. But some of the packets I see in these logs are not made with the lobby we got. To me it looks like a more complete lobby exists somewhere and the logs were probably made using it. The packets in the logs that are showing chat server communication for instance they are what I'm using to somehow figure out how to get chat to work but there is no code in the lobby emulator to handle them, otherwise I would not have to do this work. I'll try to get more information from Coco, hopefully I'll get a reply. If it's possible for us to get longer packet logs we could get a better understanding of the whole chat protocol. As I said before the chat system is more complicated than the other things I see in the lobby, there are 2 different ways to send and receive packets in chat and for every type I need to experiment to figure out how it needs to be sent to make it work.
  6. I'm mostly throwing stuff blindly at a wall hoping that something sticks. But having the payloads helps a lot to guess how things work and the details can be discovered in the DLL files. The old packet logs from Coco are also very useful. In some of them are packets between game and chat server. It would help if we had longer packet logs with more games connected to a lobby and chat server but right now I have to work with what we have.
  7. I'm currently trying to get this bit to work: https://I.imgur.com/JRdvKZb.png and as you can see I made a little bit of progress already. It's a mess and only half working so far, whoever designed that part of the system made it very complicated for some reason and every step takes me 3 or 4 attempts and failures before I get it right. I hope to have the core part of it working in a few days and I'll post the changes here as soon as it works good enough for a first public test.
  8. This is probably not the correct way to do it, but it kind of works: https://pastebin.com/bf7JFdkq Password protected servers are showing with a small lock symbol in the list and you are asked to enter the password for the server when you try to join it. If the password is correct, all works well, but if the password is wrong it kicks you out of the lobby as if your login password was wrong. Should still be good enough for now. I still want to figure out how to decode the cipher that is sent by password protected servers, I assume that there is more information that can be used to improve the password checks in the lobby UI. @xrystal I don't have an account for Github and don't want to make one just for this. As long as the diffs work, I'll keep working this way and you can decide if you want to take the changes into your repo.
  9. I figured it out. Took a moment but I think I got it right, so with this diff the lobby server will notify the game UI and remove server that are closed or crashed. Please integrate this diff into your repo and then merge or rebase it with your latest changes: https://pastebin.com/iYnPJPCN The diff should be applied to the older commit 6e4113c8a3a689a3e76e548d9a5fcd9a3756091f in your repo
  10. That's great. I'll clone the github repository later. I'll also try to get everything to work on Linux with MySQL and post the results here when everything works.
  11. I tried a lot of things to run the lobby emulator on Linux and found this solution in the end: Install Mono Copy the lobby emulator into a directory Download the source code and the mono version from https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki Compile the SQLite interop libary (on Linux) following the guide I found on http://blog.wezeku.com/2016/10/09/using-system-data-sqlite-under-linux-and-mono/ Copy the compiled sqlite interop libraries (SQLite.Interop.dll, libSQLite.Interop.so) into the server emulator directory Replace System.Data.SQLite.dll in the lobby directory with the Mono version downloaded earlier Run the lobby with the command: mono S2Lobby.exe I did this all on the Linux server and so far it seems to work well. So there is no need to run a Windows server anymore, both the lobby emulator and the game servers run fine using wine and mono. If you find a nice way to replace sqlite with mysql or postgresql, please share. I don't have much time to experiment with that at the moment.
  12. I also wanted to test it with the CM Patch for Sacred 2 Gold, so I made this to enable the buttons on the multiplayer screen: https://www.dropbox.com/s/0kawzl5zkn99pwh/Sacred 2-CM-OpenNet-UI.7z?dl=1 It's for CM Patch 1.60 and if you unpack it into the game directory, it will create this file: Sacred 2 Gold\pak\Windows\OutGameMenu\Internet.xml
  13. Hey, long time lurker here. I just had to sign up to post a huge THANK YOU for this. I agree that this is the best thing that happened for the game in the last few years. I also tried it and it really works. One thing I noticed when I had some problems trying the compiled exe in your download. It looks like the version in the bin directory was compiled with a different port. Instead of 6800 as is in the source code and the readme file, the exe is compiled with port 7365 for the lobby. That's why I didn't get it to work at first. When I compiled it myself it worked immediately and then I used ILSpy to look at the exe you included and it showed this: After I set the port in default options to 7365, the included exe worked as well as the version I compiled myself. I can't wait for a community hosted lobby to appear. And this should answer one of your questions, xrystal, when I checked the included files with some anti virus programs, I noticed that the version information in the exe states it's public domain. Right click on the exe and check the properties, on the details tab is this: After looking at the included source code, I wonder what the almost 200 unknown payloads are used for. It's great the only very few are needed to make the lobby work, but what are the other payloads for? I'll post more information here if I find out more, for now I want to experiement with some of the unknown payloads, send them to the game or gameserver and maybe there are hidden functions that deal with some of them in interesting or useful ways.
×
×
  • Create New...