Beiträge von Karbust

    good idea, for the people who want to self host check out Bitte melden Sie sich an, um diesen Link zu sehen.

    That will be basically the same as using a normal webhost, you will still be constricted by the available bandwidth, which usually isn't greater than 1Gbps and players will still have slower download speeds.


    But if you have the infrastructure to deploy MinIO, go for it, a kubernetes cluster is the way to go.

    Hello guys


    So, now that Cloudflare R2 is in general availability, it's time to talk about it and how it can improve your metin2 servers, more specifically, the patcher.


    Tradicional CDNs and block storage are expensive and charge a lot for egress bandwidth, but Clouldflare, as always, doesn't charge for bandwidth, at all. Here is the pricing: Bitte melden Sie sich an, um diesen Link zu sehen.


    Storage: 10GB/month (free), then $0.015/GB-month
    Class A Operations: 1 million requests/month, then $4.50/million requests
    Class B Operations: 10 million requests/month, then $0.36/million requests


    On Class A, the more important operations for the patcher are: PutObject, and, if you use cloudflare's dashboard, ListBuckets and ListObjects (or the equivalent AWS S3 commands on the script at the bottom).
    On Class B, the more important operations for the patcher are: GetObject, and, again, if you use cloudflare's dashboard, UsageSummary (or the equivalent AWS S3 commands on the script at the bottom).


    I made a small PowerShell script to download a lot of files from the storage:

    Code
    1. For ($i = 0; $i -lt 1000; $i++) {
    2. $ProgressPreference = 'SilentlyContinue'
    3. $combinedVariable = "C:\Users\Karbust\Desktop\test\metin2_$i.exe"
    4. $Response = Invoke-Webrequest -Uri https://<my custom domain>/metin2.exe -OutFile $combinedVariable
    5. }

    This was the usage metrics:

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    They barely change, the 20 class B requests are basically all from UsageSummary (refreshing the page), and the Class A are ListBuckets and ListObjects.


    Why is that? Because by using a custom domain it will cache the requests. This is good to prevent GetObject flooding requests. Cloudflare, on free accounts (until Enterprise), can cache up to 512MB per file.


    Instead of relying on the default cache rules, you can change them, to something like this:

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    When you make an update, you need to purge the cache, either purge it all or just the files you want.




    Tutorial


    Go to your cloudflare dashboard and access the R2 tab:

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    There you will be asked to enable it. You will need to have a payment setup in the account.


    Then, after that's done, create a bucket, you can call it whatever you want:

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Then go you Settings and scroll down to the Domain Access section and add one:


    The domain must be in the same cloudflare account as the bucket.

    Bitte melden Sie sich an, um dieses Bild zu sehen.

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    Now you can use that domain to access the files in the bucket. If you change the cache settings, you must do it on the domain you added.


    When you upload a file (or a folder), it will be something like this:

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    To access that file, you do https://<domain>/metin2.exe, like this: Bitte melden Sie sich an, um diesen Link zu sehen.

    If you have folders, just do https://<domain>/folder_name/file_name.


    If you use my patcher:

    Bitte melden Sie sich an, um diesen Link zu sehen.


    You just need to edit this variables:

    Code
    1. export const patchlistUrl = 'https://<domain>/files.json'
    2. export const patchlistFolder = 'https://<domain>/files/'
    3. export const patchSliderUrl = 'https://<domain>/slider.json'
    4. export const patchSliderImages = 'https://<domain>/slider/'


    Since you can't upload more than 100 files at the same time with the dashboard, I made a script in typescript to help with that:

    Bitte melden Sie sich an, um diesen Link zu sehen.


    The instructions are in the repository, but I will say this, add the files inside the uploads folder, then run the script. If try to upload a file which already exists and the MD5 hash matches, it will not be uploaded and will return a http error code 412.


    The end


    I decided to make this tutorial since many servers use either one or multiple VPS to have more bandwidth, and downloads can become slow if many players are downloading at the same time, and because Cloudflare doesn't charge for used bandwidth, and has a generous free tier can is more than enough for almost all server owners.


    Enjoy

    Hello


    Since most of the work I do is in NodeJS (JavaScript and TypeScript), I needed to make a script to access the Metin2 API.


    GitHub: Bitte melden Sie sich an, um diesen Link zu sehen.


    It has a JavaScript and a TypeScript version.


    To use just edit either file and set your server's data. This code is synchronous, meaning, it will block while waiting for a response from the server. It can be made asynchronous with Promises.


    On both files there's also a list of the most useful commands available, you can create more on the game source.


    You can find how to use it on the GitHub repository.


    Hope it's useful to someone.

    Hi guys


    I'm sharing my metin2 patcher made with Electron.


    You can find a tutorial in English on my GitHub: Bitte melden Sie sich an, um diesen Link zu sehen.


    Hope anyone finds it useful.


    Bitte melden Sie sich an, um dieses Bild zu sehen.

    Hello,


    I've tried to implement the arrows quiver system on my server, but it doesn't do any damage (either on hit or skill) and the effect doesn't show.


    A little video:


    Bitte melden Sie sich an, um diesen Link zu sehen.


    I already check the tutorial 3 times, but I can't seem to find anything wrong...


    If anyone knew the solution, I would appreciate.


    Thanks

    I have a small bug...


    The absorption rate or the bonus (after absorbed) doesn't show under the on the tooltip when over the item, but if it is on the absorption or combination window the bonus apear


    Bitte melden Sie sich an, um dieses Bild zu sehen.Bitte melden Sie sich an, um dieses Bild zu sehen.Bitte melden Sie sich an, um dieses Bild zu sehen.Bitte melden Sie sich an, um dieses Bild zu sehen.


    And on COSTUME_MOUNT shows this:


    Bitte melden Sie sich an, um dieses Bild zu sehen.


    I've already tried some things on uitooltip.py, but none worked...


    Any tips?


    Thanks


    EDIT: Solved!


    On dum_proto I had COSTUME_MOUNT and then COSTUME_ACCE, on the source I had the opposite, after a few attempts to solve I finally figured it out...