Jump to content

xrystal

Sacred Game Modder
  • Posts

    59
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by xrystal

  1. 1 hour ago, jedijimi said:

    Thank you for info. My spidey senses are telling me it's a port forwarding issue. I will use your links cause the one's I"ve been using aren't what you gave me. You gave me better info. I will report back with more if need.

     

    Hi @jedijimi, yes, that error is related to ports. If you are both in the same network you are correct that you should be able to play the multiplayer over "LAN", thus not needing the stuff I posted in the linked thread about actual online playing via "Open Net". Please check if the system hosting your server has an active firewall - you would have to allow sacred2.exe or the dedicated s2gs.exe there. For testing purposes, you can also just deactivate the firewall on the host (prefered solution would of course be to allow only the sacred2 gameserver ;)). Also, some Antivirus- software tends to bring it's own firewall, if you have one installed on the host it's worth to look into the control panel there, too. By default your game should be accessible over port 7011 or whichever you have selected instead.

    Are you on windows 10? These instructions should do it for you (first link I found, but looks fine ;)), on step 5. select "UDP" and the local port "7011" if your issues are related to the windows firewall. You will probably need to restart the game/server before these changed rules apply.

    • Appreciation 1
  2. 3 hours ago, r00ster said:

    [...] I would add those servers/ports to the main post, they were somewhere around page 4-5.

    It made me laugh, nostalgia from back then, had to switch between the two lobbies, and Ascaron's test servers.

    Does it matter all the servers say EU/DE? Are we all on one lobby however we connect? Whichever domain used? I didn't see any 'US' server names, just unsure.

    [...]

    Hi @r00ster,

    yes, all old lobby addresses known to me redirect now to the same, globally shared lobby.
    Everyone installing a fresh copy of sacred2 should afaik get an address like *.sacred2.net for his default confiugration and thus should find this one without further doing.
    Therefore, server ports and lobby addresses are not mentioned in the opening post anymore, I did not want to make it looking more complicated than it currently is, just scares away people :D

    So you had the test servers as your lobby defined previously? May I ask, which address they are? I did not even knew those :D

    The location of the lobby does not matter technically. For the servers however, from your location for example latency while playing of course might be a bit worse, the current EU servers are all hosted in germany. Makes hammering the spacebar in tense boss fights occasinally even more of a duty for you... :D 

    But if someone in the US or another popular location not covered has a server with a bit computing power unused laying arround and wants to provide a few servers from there, I would gladly help setting them up. Right now the majority of servers run inside docker containers on the same linux server which also provides the lobby. A few are running separated on a second server I use for testing and beeing able to confirm myself, that it is actually possible to connect servers from outside to it whenever someone has issues with that (according to the server logs and also a bit discussion here and there with some people, hosting their own servers at home seems to be a bit too involved in general, because of port redirects and NAT and whatever complicates the network at home ;)), but that one is also located in germany.

    • Appreciation 1
  3. Hey, just want to ask since it has been a while, do you think there is a possibillity of getting the email notifications back at some point? Or is it still not possible to solve the speed issue otherwise or would it be too much of a hassle to fix? I really miss these wonderful notifications which spared me from checking things myself, you start to notice how great things are once they are gone... :P

  4. Hi @Ellie, sorry for my late reply, I didn't noticed your post earlier: I am not sure about the EEserver, but could reproduce the issue on another game mode and just restarted the whole stack of servers and lobby which seems to solve it for me.

    For your other issue: Error 61 means your server is not accessible by the outside world, which usually means the ports used by your server are not accessible over the internet.

    • Appreciation 1
  5. Fyi, if you encounter a bug or have feature requests of any kind, you can of course post them here, but also in case you are used to github, you could as well put those directly in it's related issue section. I track every known bug or possible improvements in the usual feature branch workflow manner there. Not only, to keep it transparent and easy to get into it or to get a quick overview of "construction sites" in case somebody is interested in joing the codeing, but even more as a reliable reminder to myself about what I actually wanted to do every now and then*... :P

    As you can see there are a few things I still want to change and most of them are related to server side infrastructure, I.e. easier deploy and better monitoring of server health and status. Quality-of-life stuff for hosting in general.

    For the client side, the currently rather static server list (docker .env file) is sometimes not optimal. Because for example, due to most players playing with new characters, at some peek times at weekends the bronze or silver campagin servers were either full or not usable for everyone because the single server beeing active for a selected difficulty was not of their alignment (for example having a shadow char but everyone else plays light and thus "blocks" the campaign server for shadow players).

    Accordingly, the thing I am working on right now is a small daemon which will start additional instances of server configurations on demand saving me from having to keep more servers open than actually needed by default, but still being able to have more room whenever needed. Since this is technically optional and I dont want to pollute the lobby code more than neccassary with my additional requirements, that daemon will run in a separate process. As a nice side effect, because I need a communication layer between those two and feel like a separete database will fullfill that purpose better than a direct api, it will most likely be possible to use that additional database to provide an external list of servers on some web page as well with the same list of servers as ingame but viewable in your browser.

    *btw. now working on it again, I finally did the small change from the text config file to a xml file - just to notice that the .config files for .NET applications really lack flexibillity and even if they are an improvement I still don't really like them, but well, better than before at least... :D 
     

    • Like! 1
  6. Hey, just a little update on a short notice as I just got the email notificiation I have been waiting for a very long time:

    sacred2-domain-transfer.png.0a51206f38dab7ec0f70c7264f6ae9d0.png

    Of course after all this time it had to happen of all things on a monday morning! :B6nFRAh:
    But this evening when I am back from work I should be able to finally get it ready and update quite a bit of outdated information. After that domain is configured then, no one will need to change a URL in his config files anymore, it will just work because that domain I finally got registered is the original offical lobby address, which will very soon point to the emulated one. It is all coming back together, horray! :D

     

    • Respect! 1
  7. 8 hours ago, azukaar said:

     - If I create a game myself, and my friend tries to connect (and vice versa) we get a 61 error code, "login failed" (not a port issue, same thing with DMZ activated)

     - If I try to join any online server, the game just crash

    Hi azukaar,

    I have just looked into it and can confirm there was a server-side issue with joining. I didn't notice it as it caused no entry in the log files. Sorry for the inconvenience, if you don't mind, please try again to join a gamserver and report back if it works now as expected.

    For the self hosted server, maybe that was related to the same issue as well, if you are sure about the port redirection beeing fine. Usually, this error arises if the server cannot be reached from the client which tries to connect to it.

    • Appreciation 1
  8. 5 hours ago, firelite91 said:

    I'm looking forward to work on the server side storing of characters. If you're used to any kind of instant messaging platform, I'd like to join you for leading me through better understanding on the server protocol used by gs for working on this subject.
     

    Yeah sure, even through I am not entirely confident I will be able to actually help you with that undertaking in detail as I am not that deep into the reverse engineered code and I don't think ClosedNet will be an easy task. Actually, I am already amazed OpenNet works this good. Otherwise, a few months earlier even that seemed impossible, so... ;)

    Anyway, for everything I can give support for, just write me a private message with the name of the messenger you prefer and your contact data, I will just install & setup that one (because currently I just use things like Steam/TS3 for communication as none of my friends has used IRC and alike messenging for years rendering it kind of pointless for me even through I really liked those things... :P). Since I have tinkered the whole night with my server (luckily I have holidays right now :)), I will probably sleep over the day and be back online sometime in the evening, maybe ~10 hours from the time of this post or something like that.

    Btw., the Lobby URL has been updated from hex41.de to s2cm.png.3c7737f746c567841115421f1e672879.png (this is an image because the forum messes around with this specific address) as I finally put most things together on the new server which did nothing but idle for the last three months - good to have been reminded of the things which had to be done ;). The old domain is currently still working, because I will continue to use it for testing and have not restricted the access, but it will probably not be usable anymore someday in the future, so use the new one instead from now on, please. That one will stay online.

    • Thanks! 1
  9. Hello @NegativeOne, after all this distracting Christmas and new-year stuff I have finally merged your changes... :)

    In the development branch they are now usable with the Mysql setup, too. However, since I see that Mysql might just be an additional hassle for most users - especially for those who just want to host a lobby directly under windows right out of the box -, I will make a patch soon which will render Mysql an configurable option but keep Sqlite as default database driver. So you don't need to setup Mysql but can keep working on your base or the branch I put your changes into . I will put everything together in case anything diverges afterwards and also try to make the configuration files a bit nicer to use.

    Those lobby changes will be applied to the testing server probably later today. I am currently setting up the new server which will replace the testing server in the long run and should have a few more mods supported.

    Edit: The changes are now on the lobby server and I have some issues with the lobby chat which sometimes is not connecting (still have to figure out depending on which condition the connections works or does not work). Since it locally seems fine, I assume the issues are solely related to networking in my hosting instance or might be related to my Mysql-merge, not your original diff. Also I noticed yesterday I totally oversaw you already wrote about the SqLite/MySql topic. I was too focused on your list of changes apparently, forgive me my ignorance. But good to read we think the same about that :wink:. Anyway that improved lobby looks already very nice, thank you.

    • Respect! 1
  10. 1 hour ago, Kadolek said:

     I am playing this game unmodded on steam, and it is on the latest update (2.65.2). I followed the steps given here, but still can't select the "OpenNet" option on the multiplayer menu.

    Hello Kadolek, "can't select" as in the OpenNet Button is greyed out and unclickable or as in the complete button does not exist? If it is the later one and you are sure your game is unmodded I.e. not community patched which would require the file from step 4, I would try to validate the game files via steam to restore from potential file changes as it really should be there in the default installation. If it is just grayed out, the button should be clickable if you enter your credentials. In a vanilla installation with the additional file "OptionsCustom.txt", it should look like this for you.

    If that still does not work, please be patient until we have a better setup guide ready or if you find something which differs on your screens from mines post again and we might figure it out ;)

    • Like! 1
  11. Are you sure these are actually old? From the date I saw for example in the packet data of "net_dump - 3.txt" I guessed he had created them with his lobby code in progress just recently, not back in the days and thus we should be able to create the same kind of packets with our lobby instances. The client actions on game servers should at least produce unhandled packages logged by the debugging compilation of the lobby.
    I am not sure, If it would help you, but after Silvester I could try to install tcpdump (I just have to see if I can kind of pre-filter it because I don't want private stuff in there or have to wait a few days more for the new server which would be cleanly separated) to the test server and make it accessible as a wire shark packet capturing source to you, too for remote debugging together with the log of unhandled packages. That way there would at least be some additional package data from a few players and different servers a day to the testing input we do ourselves on purpose on our local development environments.

    • Like! 1
  12. 37 minutes ago, NegativeOne said:

    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.

    Honestly, it is a joy seeing you work, you're making visible progress so fast even with these difficult things and thanks to you the usability of the lobby has already improved a lot in a short time (and judging by that screenshot, it will improve even further).

    I suspect it will take me about a week more until I will finally able to contribute something useful on the code part again, too, but at least in the meanwhile I am making a bit progress on the infrastructure stuff:
    In probably a few days I will have access to my new slightly more powerful server which - other than the current testing one - will be dedicated to the purpose of sacred 2 only now that I can roughly estimate performance usage and am sure this all will turn out nice and is worth the investment. Hosting the lobby and 20 servers (vanilla + cm) currently boils down to roughly 33% of cpu usage on an i7-6700k. On the new System, I should be able to host most of the Mods listed by Flix additionally, depending on how much performance I want to reserve for load caused by user hosted servers to the lobby and depending on the capability of the lobby to handle that many servers (if I remember right, back in the days there never have been so many servers registered to just one lobby). From my observations, players on a server don't increase cpu usage much compared to their idle state (also, there will never be that many players as there are slots on servers), so you don't have to arrange for many resources in spare (I will try to target around 80% of load on my server without players and see how that works out).

    Only one thing that really bothers me: For a few weeks now, I have tried to purchase the old lobby domain (because that of course would make setup even easier for the clients, because they would not have to do anything), but until now, the seller never responded despite me offering to pay his desired price. Probably inactive on that domain selling platform. I hope that will change someday, but for now it seems like we will have to stay entering our own domains as lobby ip.

    • Like! 1
  13. @NegativeOne: Yes sure, your diffs are good to work with, thank you, I'll just keep merging them into the repo to have it all together.

    And imho that behavior of your patch is already very nice - even if the player is kicked out of the lobby after a wrong password attempt, because of the symbol and question for the password before he knows why he was kicked and thus should not be confused anymore.

    @Flix: Thanks for the overview. In case Fallen Angel is actually still used without all the patches, I'll have to see if I can find & install my old retail disk version to get game servers up for that one, too. However, as all the other mods you mentioned seem to be based on Sacred 2 Gold version, I would suggest to split the Fallen Angel Lobby to another lobby address & list from the Gold Edition list hinting in both the setup instructions and the lobby welcome message of FA that there is a newer version with patches out as probably most players will be found there.

  14. 10 hours ago, NegativeOne said:

    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

    That's looks very promising, thank you - I will try that out in a few hours and merge it afterwards. Also in case you have been wondering and send me the diff because of that: the development branch is locked for direct commits because I know and like that workflow from work, but if you want to push something every user can create pull requests from a feature branch to development in that repository. The only restriction is that every pull request has as least to be approved by one other person (doesn't matter which one) before it is possible to merge it into development.

    Edit: Yes, works fine. I have merged the diff and updated the test servers with that bugfix of yours.

    Ah, and aside from that: merry christmas! ;)

  15. Known Issues:
    - player count of logged in players is not displayed in the server browser
    - chat probably only works ingame right now but not in the lobby
    - servers which shutdown are not removed from the lobby until the lobby is restarted
    - servers with password don't ask for a password and are thus inaccessible

    Currently, the issues with the player count and the one with the private servers which are not unregistered cleanly again from the lobby are imho currently the most important ones to solve, as the first bug makes it more difficult to find other active players on the servers and the second one spams the lobby with unusable servers or forces me to schedule restarts for the lobby which otherwise would not be necessary.

    @gogoblender Yeah, that would be a nice idea after it's ready. Also, at some point before, I will try to reorganize all the information spread over the discussion in this thread into the opening post.

  16. On 12/22/2019 at 12:33 PM, Androdion said:

    @xrystal - Let me just thank you for all your work with this, I've stickied the thread for it to be readily available at all times. Keep it up! :thumbsup:

    That gratitude belongs to cocomed, he did the actually difficult and time consuming part. I am just happy to be able to work with his lobby code now... ;)

    On 12/22/2019 at 11:10 PM, JJDynomite said:

    Just wanted to let you know I followed your instructions from the Steam discussion to connect to the lobby and it worked for me, thanks for your hard work!

    Thanks for testing, nice to hear it's working so far.

    ---

    I have a few more general questions I am sure everybody has an opinion about:
    1) Since I have not recently played with any mods beside the CM-Patch but am still seeing many to me unknown ones in the modding section, I am wondering: Which ones are played currently, maybe are already known to work in LAN mode and might be of interest regarding providing online servers for them?
    2a) What regions have the most active player base or the worst connection to the servers which I currently host in Germany? Where in the world would we have to put additional servers up if everything runs fine?
    2b) And if we knew where to put additional servers, are there maybe community members which have server capacity with unused resources in those regions on which they maybe would want to host a few game servers in the future and could ensure their availability?
    3) How would you prefer the lobby to be organized: Everything in one lobby including different countries and mods? Different lobbies by country like the original lobby had? Or split by mod? I personally would prefer to have everything in one big list, but it would be a quite long scrollable list with all possible permutations of server/mod configurations. However, assuming most people are able to communicate in English and might want to find each other and play together, splitting an already small community even further seems counterproductive to me which is why I would currently tend to just dump everything in one big list as long as the lobby server can handle it in terms of performance.

    ---

    Besides that - only for those who want to setup their own lobby on Linux, too, not only game servers - I have added the files I am currently using for hosting to my github repo. It still requires a bit of effort to get it up and running and will hopefully be more convenient someday, but for now it should do.

    precondition
    - docker and docker-compose installed and ideally you already know what it is and how to use it
    - all necessary ports open (see in compose files port mappings which ones are used)

    configuration
    - I have not uploaded the server files themselves for copyright reasons, but added a file serverfiles.txt with the lists of files you need to copy from your games installation folder and where to put them. If you want to play another modded version of Sacred2, just add the files to a new sub folder next to vanilla and cm160hf and try if it works for you
    - There are two files, one to start the lobby with it's database and a separate one to start one or more game servers which will register to the lobby
    - In the lobby.docker-compose.yml I have used local-persist driver (https://github.com/MatchbookLab/local-persist) volumes. You may want to replace these with "normal" docker volumes in case you don't want to install an additional docker plugin to your system.
    - Configure everything in the .env file - see the comments in the file for details. With local-persist volumes, you have to create the folder you have specified for "CONTAINER_VOLUME" first, create three sub folders db for the database, gs with the game server files and  lb for the lobby files there and ensure your docker user has full permissions at that location. Copy the lobby files to the lb folder and ensure that you have set the same values as in the db.cfg file which you have saved in the .env file. The db.cfg then should look like this:

    172.68.0.2
    3306
    s2lobby
    root
    YOUR_MYSQL_PASSWORD

    The address in the ip.cfg has to be 127.0.0.1

    - If you want to have multiple game servers, in the gameserver.docker-compose.yml copy the sacred-gameserver1 service as many times as you need it with another name and add environment variables for each individual configuration in .env accordingly

    usage
    - First start the lobby:

    docker-compose -f lobby.docker-compose.yml up -d


    - Then the gameserver(s):

    docker-compose -f gameserver.docker-compose.yml up -d


      If a game server service keeps restarting or is listed in the lobby but cannot be joined you most likely have port configuration issues.

     

    • Respect! 1
  17. On 12/9/2019 at 10:49 AM, NegativeOne said:

    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.

    Are you trying to set that up on Linux with some scripts or in a container? If it is the later one, I could share my current work-in-progress files for a docker-compose.yml after I am back from work. They seem to run fine for the lobby and database so far, however for the game servers there seems still to be a port forwarding issue or something alike I have not yet solved if running from wine within docker instead of running just via wine (I.e. servers are listed, but can't connect from client side if hosted via docker, but can connect if started solely with wine but I would prefer to have everything contained for easier deployment on servers). I assume this has to do with the external IP parameter of the s2gs.exe and my understanding of it or it's just a mistake in my port/network configuration I have not found yet... ;)

    Edit: I Finally found the time to search for and find my mistake: For some odd reason I expected the gameservers to be UDP traffic and mapped it instead of TCP inside my containers (which obviously was pretty dumb of me... ;)). I will put up a test server (with lobby and game servers in the EU-region) up today or tomorrow for vanilla and cm-patch game and after that also clean up and attach the related dockerfiles.

  18. 53 minutes ago, Dax said:

    Stupid question, but can someone explain the matter to me in a few simple words?

    Asking is not stuipid at all, this turned into a quite chaotic thread ;)
    The core matter is, that the user cocomed programmed a replacement for the Open Net Sacred2 Lobby which officially ceased to operate many years ago. This will allow us for example to host Sacred 2 servers which can be joined and played on together without all the sometimes quite technical hassle of previous workarounds for the no more existing online multiplayer. Currently we are just exchanging ideas on how to make best use of this new situation (on a rather technical level:P).

    • Appreciation 1
×
×
  • Create New...
Please Sign In or Sign Up