Jump to content

[40250] Reference Serverfile + Client + Src [15 Available Languages]


TMP4

Recommended Posts

  • Contributor
15 hours ago, gleskpem1 said:

What is the reason for the increased "game % value" in the first login and teleports?

Sh1t code made by Ymir 20 years ago? :kekw:

  • Ram/CPU increase at first player login is pretty normal, the server is working and loding stuffs there.
  • At teleport there is a little ram/CPU increase for a sec, but it goes back after teleport ends. Some people thinks it only happens on 40k game core but not, it's always been like that, I tried with a 2089m game file from 2011, it did the same thing. It could certainly be optimized, but that was not the purpose of this server file.

Since nowdays cheap VPSs have 8GB of ram, I think you won't have a problem because of these.

Edited by TMP4
Link to comment
Share on other sites

14 hours ago, TMP4 said:

Sh1t kodu 20 yıl önce Ymir tarafından mı yapıldı? :kekw:

  • İlk oyuncu girişinde Ram artışı oldukça normaldir, sunucu çalışıyor ve orada bir şeyler kaybediyor.
  • Işınlanmada bir saniye için küçük bir koç artışı vardır, ancak ışınlanma sona erdikten sonra geri döner. Bazı insanlar bunun sadece 40k oyun çekirdeğinde olduğunu düşünüyor ama değil, her zaman böyle oldu, 2089'den 2011m oyun dosyasıyla denedim, aynı şeyi yaptı. Kesinlikle optimize edilebilirdi, ancak bu sunucu dosyasının amacı bu değildi.

Günümüzde ucuz VPS'lerin 8GB ram'i olduğundan, bunlardan dolayı bir sorun yaşamayacağınızı düşünüyorum.

i know. i mean, on some servers these values do not increase. Are there any places that we need to deactivate to at least optimize? It increases from 1% to 6%.  can we reduce the increment amount? In addition, when the server is started for the first time, the game, db values see 60% and then drop, what is the reason for this? Note: I'm asking because I'm curious. I appreciate the work

Edited by gleskpem1
Link to comment
Share on other sites

  • Contributor
1 hour ago, gleskpem1 said:

i know. i mean, on some servers these values do not increase. Are there any places that we need to deactivate to at least optimize? It increases from 1% to 6%.  can we reduce the increment amount? In addition, when the server is started for the first time, the game, db values see 60% and then drop, what is the reason for this? Note: I'm asking because I'm curious. I appreciate the work

"when the server is started for the first time, the game, db values see 60% and then drop, what is the reason for this?"

It's loading stuffs, for example reads every table from db, read files like drops, quests, mirror protos etc etc..
The % depends on your pc (or virtual server) resources.

"It increases from 1% to 6%.  can we reduce the increment amount?"

As I said, memory/CPU increase for a sec at teleport is present on every file. I think it's normal, game-db is working there. The 5% may looks a little high but I don't know your specs, or if you talk about cpu or memory. (Probably cpu) Last year on Discord we talked about this with Gurgarath, he showed some footage of his dedicated server, he had cpu increase of 0.7->1.3% at warp on his dedicated server. I having about 3% on my vdi at home. % depends on the machine and resources.

I don't think I can help you optimize metin2's memory and processor management. But that was not the purpose of this server file. I recommend opening a topic here if you want to continue with this matter.

Edited by TMP4
  • Good 1
Link to comment
Share on other sites

# Boost
INCDIR += -I../../../extern/include/boost

Is this not needed in the makefile in the game folder?

 

This :

typedef boost::unordered_map<DWORD, TCubeResultList> TCubeMapByNPC;

Gives me this error when I compile:

no template named 'unordered_map' in namespace 'boost';

 

Edited by Nuzzo
Link to comment
Share on other sites

  • Contributor
12 minutes ago, Nuzzo said:

# Boost
INCDIR += -I../../../extern/include/boost

Is this not needed in the makefile in the game folder?

 

This :

typedef boost::unordered_map<DWORD, TCubeResultList> TCubeMapByNPC;

Gives me this error when I compile:

no template named 'unordered_map' in namespace 'boost';

 

1. In the last version boost is in extern/include so 

# Miscellaneous external libraries
INCDIR += -I../../../extern/include
LIBDIR += -L../../../extern/lib

includes boost. You don't need + /boost to your include unless you have boost/boost folder structure.

2. Use std::unordered_map

typedef std::unordered_map<DWORD, TCubeResultList>				TCubeMapByNPC;				// °˘°˘ŔÇ NPCş°·Î ľî¶˛ °É ¸¸µé Ľö ŔÖ°í Ŕç·á°ˇ ąşÁö...
typedef std::unordered_map<DWORD, std::string>					TCubeResultInfoTextByNPC;	// °˘°˘ŔÇ NPCş°·Î ¸¸µé Ľö ŔÖ´Â ¸ń·ĎŔ» Á¤ÇŘÁř Ć÷¸ËŔ¸·Î Á¤¸®ÇŃ Á¤ş¸
  • Love 1
Link to comment
Share on other sites

@ TMP4 After formatting my computer, I am getting this error even though I installed the necessary package. What is the reason. https://metin2.download/picture/u4PGypf1Y32W4q0vLJKUriMI4okSKOu2/.png

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor
3 hours ago, gleskpem1 said:

@ TMP4 After formatting my computer, I am getting this error even though I installed the necessary package. What is the reason. https://metin2.download/picture/u4PGypf1Y32W4q0vLJKUriMI4okSKOu2/.png

I don't speak that language. But if it's say stdafx.h missing, then that's part of the C++ MFC for latest v143 build tools what you have to install seperately (Readme.txt in ClientVS22.zip).

Edit: That's not for stdafx.h but afxres.h, sorry.

Edited by TMP4
Link to comment
Share on other sites

  • Contributor
2 hours ago, gleskpem1 said:

 i already installed.

(To my previous answer: It was actually true for afxres.h, so it's irrelevant here.)

So I used a image to text extractor and translated your error message. It was about precompiled headers. When I have such error, clean build usually solves it. Try to rebuild the solution. Click on "Build" on top menu, and select "Rebuild solution" (or the equivalent in Turkish).

Link to comment
Share on other sites

2 hours ago, TMP4 said:

(To my previous answer: It was actually true for afxres.h, so it's irrelevant here.)

So I used a image to text extractor and translated your error message. It was about precompiled headers. When I have such error, clean build usually solves it. Try to rebuild the solution. Click on "Build" on top menu, and select "Rebuild solution" (or the equivalent in Turkish).

Thanks for your reply, I already cleaned the solution and then got the build again. If the Rebuild command is different from the clean solution -> build solution commands, I haven't tried it. But when I changed afxres.h to windows.h and used vs 142 tools and started compiling, the problem disappeared. I will use it like this. i'm passing.

  • Metin2 Dev 1
  • Good 1
Link to comment
Share on other sites

On 6/7/2023 at 9:55 PM, gleskpem1 said:

Thanks for your reply, I already cleaned the solution and then got the build again. If the Rebuild command is different from the clean solution -> build solution commands, I haven't tried it. But when I changed afxres.h to windows.h and used vs 142 tools and started compiling, the problem disappeared. I will use it like this. i'm passing.

I literally have the same problem as you (also have MFC installed and other stuff) and those changes you make also solve it for me.

Edit: I have the 0xc00007b error when trying to launch Metin2Distribute.exe.

Edited by gantretv
Link to comment
Share on other sites

15 hours ago, gantretv said:

I literally have the same problem as you (also have MFC installed and other stuff) and those changes you make also solve it for me.

Edit: I have the 0xc00007b error when trying to launch Metin2Distribute.exe.

Okay I repaired the 0xc00007b just by uninstalling python-3.11 x64 (which is weird), but now while trying to launch the Metin2distribute.exe nothing happens, even errorlog.txt is not created.

Link to comment
Share on other sites

  • Contributor
14 hours ago, Krynn said:

You are using vs2019 in the video, but it says vs22 in the rar, I have the same build problem. for client

I can't get build even though I do windows.h vs2022 is installed

The Video is 2 years old. I did countless update in the meantime including upgrade for vs2022 if you check changelog.

As I stated in the topic, I did not make the base SRCs. This release using Mali's. 

If you guys having problem, better to ask there. But do not annoy him in DM or in any way.

Currently I'm not able to reinstall my windows just to reproduce your problem. I'm using latest Windows 11 and just updated my VS to latest. Can build fine and can start the game fine.

Edited by TMP4
Link to comment
Share on other sites

  • Contributor
1 hour ago, Krynn said:

It's a pity not to get help from you

Just to be clear, I owe you literally nothing for using my free server file.

2023.06.10: - In Userinterface/Userinterface.rc I changed #include "afxres.h" to #include <Windows.h> since the launcher
              does not use MFC, so you no longer required to install C++ MFC while installing Visual Studio.
            - Disabled precompiled headers in all project to be able to build them in latest Visual Studio. You can do it by 
              right click on a project and select properties, then in Configuration -> C/C++ -> Precompiled Headers select 
              "Not using Precompiled Headers" for Precompiled Header. You have to do this for each project in the solution.
            - Added StdAfx.h to EterBase\Poly, it just includes the ../StdAfx.h.

In Mega.nz. Tested on a freshly installed Windows 11 and Visual Studio 2022.

  • Love 1
Link to comment
Share on other sites

11 hours ago, PATRON2 said:

Nah, I've got all of the DLLs, directXs, frameworks in here. It is surely a problem with visual compilation. I've got one metin.exe extracted from the .rar that works fine and one metin2.exe compiled with my visual that doesn't work. As I mentioned first I had the 0xc00007b that I repaired ny uninstalling python 3.11 x64 and now while clicking in my metin2.exe compiled with my visual nothing happens.

Link to comment
Share on other sites

3 minutes ago, gantretv said:

Nah, I've got all of the DLLs, directXs, frameworks in here. It is surely a problem with visual compilation. I've got one metin.exe extracted from the .rar that works fine and one metin2.exe compiled with my visual that doesn't work. As I mentioned first I had the 0xc00007b that I repaired ny uninstalling python 3.11 x64 and now while clicking in my metin2.exe compiled with my visual nothing happens.

I do not think so

Link to comment
Share on other sites

2 hours ago, TMP4 said:

Just to be clear, I owe you literally nothing for using my free server file.

2023.06.10: - In Userinterface/Userinterface.rc I changed #include "afxres.h" to #include <Windows.h> since the launcher
              does not use MFC, so you no longer required to install C++ MFC while installing Visual Studio.
            - Disabled precompiled headers in all project to be able to build them in latest Visual Studio. You can do it by 
              right click on a project and select properties, then in Configuration -> C/C++ -> Precompiled Headers select 
              "Not using Precompiled Headers" for Precompiled Header. You have to do this for each project in the solution.
            - Added StdAfx.h to EterBase\Poly, it just includes the ../StdAfx.h.

In Mega.nz. Tested on a freshly installed Windows 11 and Visual Studio 2022.

I was having the same issue, but now it seems to be solved, thank you so much! ❤️

  • Good 1
Link to comment
Share on other sites

Announcements



  • Similar Content

  • Activity

    1. 0

      Metin2 effect script files (MSE and MSA file) how can convert

    2. 10

      Multi Language System

    3. 0

      We are looking for a C++ and Python programmer

    4. 0

      [Quest Scheduler Request] Is there a way to make a quest run independet of player events? Lets say start quest automatically at server startup?

    5. 111

      Ulthar SF V2 (TMP4 Base)

    6. 0

      Quest function when 102.kill definition whereabouts help

    7. 5

      [M2 FILTER] Customized Client Filter

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.