Jump to content

Recommended Posts

  • Honorable Member

This is the hidden content, please

Metin2 Download (Source code)

 

 

This is the hidden content, please

This is the hidden content, please

Spoiler

.png
.png

It's uses config.ini and locale_list.txt from official client.

The language option is stored in the loca.cfg file. It's a silly name, but I did it because it's official did as well. You can change file name.

Target Framework: .NET Framework 4.8

  • Metin2 Dev 369
  • kekw 1
  • Eyes 5
  • Flame 1
  • Dislove 1
  • Think 4
  • Confused 1
  • Scream 1
  • Lmao 1
  • Good 103
  • muscle 1
  • Love 23
  • Love 212

 

Link to comment
https://metin2.dev/topic/28927-configopen-source/
Share on other sites

  • 10 months later...

Thank you for the release in first of all! This is something I was looking for. I'd like to mention the fact that I'm not a programmer, but more an enthusiast who likes to play with the code. I'd like to kindly ask you for few clarifications in relation with the implementation/modification of this application. 

1. Not sure where do I find config.ini (is this the config.cfg file that we find in the client folder?), neither locale_list.txt (do I have to create it in locale path on the client side?), loca.cfg(where do I find it, or where I should create this cfg file?)

2. I'd also like to learn the way I can comment few settings in the config as I have permanently dezactivated few of them on the client/source.

Your response will be much appreciated! 

  • Metin2 Dev 1
  • Smile Tear 1
Link to comment
https://metin2.dev/topic/28927-configopen-source/#findComment-155007
Share on other sites

  • 9 months later...
  • Active+ Member

Amazing! Thanks for this.

I made a translated locale_list.txt in case someone may want it:

English 1252 en
العربية 1256 ae
Français 1252 fr
Deutsch 1252 de
Dansk 1252 dk
Ελληνικά 1253 gr
Español 1252 es
Italiano 1252 it
Nederlands 1252 nl
Magyar 1250 hu
Polski 1250 pl
Português 1252 pt
Română 1250 ro
Русский 1251 ru
Türkçe 1254 tr
Čeština 1250 cz

I tested it and it works like a charm without any changes

  • Good 1
Link to comment
https://metin2.dev/topic/28927-configopen-source/#findComment-161365
Share on other sites

  • 8 months later...
  • Active+ Member
On 2/5/2023 at 1:11 PM, Platinum said:

Thank you for the release in first of all! This is something I was looking for. I'd like to mention the fact that I'm not a programmer, but more an enthusiast who likes to play with the code. I'd like to kindly ask you for few clarifications in relation with the implementation/modification of this application. 

1. Not sure where do I find config.ini (is this the config.cfg file that we find in the client folder?), neither locale_list.txt (do I have to create it in locale path on the client side?), loca.cfg(where do I find it, or where I should create this cfg file?)

2. I'd also like to learn the way I can comment few settings in the config as I have permanently dezactivated few of them on the client/source.

Your response will be much appreciated! 

@Platinum Download the official metin2 game and in the files you'll find the config.ini along with the locale_list. put them in your game folder along with the binary from the solution compiled with VS and done. will work like a charm. 

 

Thank you Mali, btw!

  • Love 1
Link to comment
https://metin2.dev/topic/28927-configopen-source/#findComment-166457
Share on other sites

  • 7 months later...
  • Contributor
12 hours ago, maviekran said:

Any chance you could re-post the link?

You may whitelist your ip in the discord server via ticket in order to use metin2.download. Check announcement in the discord.
But here it is 

This is the hidden content, please

  • Metin2 Dev 32
  • Eyes 2
  • Good 4
  • Love 5
Link to comment
https://metin2.dev/topic/28927-configopen-source/#findComment-169848
Share on other sites

  • 11 months later...
  • 3 weeks later...
  • 1 month later...
  • Active Member

This is a little guide for add a language selector for the config.ini:
In FormConfig.cs search for

private const string m_StringINIFileName = "config.ini";

and transform into: 
 

private string m_StringINIFileName = "config.ini";

After the modified text, add
 

        public void SetupLanguagePath()
        {
            string cfgPath = "locale.cfg"; // change with ur name
            string langCode = "en";        // backup language

            try
            {
                if (File.Exists(cfgPath))
                {
                    string content = File.ReadAllText(cfgPath).Trim();
                    if (content.Length >= 2)
                    {
                        
                        langCode = content.Substring(content.Length - 2).ToLower();
                    }
                }
            }
            catch { /* backup on en */ }

            // Change with your directory
            m_StringINIFileName = Path.Combine("config", langCode, "config.ini");
        }

Now search 

InitializeComponent();

And add under 
 

SetupLanguagePath();

Done!:default_happy: Now all you have to do is create a “config” folder in your client and add the various subfolders (for example, config/en/config.ini) containing the .ini files translated into different languages.

Link to comment
https://metin2.dev/topic/28927-configopen-source/#findComment-175358
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.