Jump to content

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


TMP4

Recommended Posts

10 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.

Is it also necessary to include it in EterBase.vcxproj?

 

Also, if I haven't encountered any problems so far, is this an upgrade that needs to be done?

I noticed that the compilation time has quadrupled

Edited by Nuzzo
Link to comment
Share on other sites

  • Contributor
8 hours ago, Nuzzo said:

Is it also necessary to include it in EterBase.vcxproj?

 

Also, if I haven't encountered any problems so far, is this an upgrade that needs to be done?

I noticed that the compilation time has quadrupled

So the problem came from the latest Visual Studio 2022 (v17.6). (May need a clean install to reproduce)

While disabling Precompiled headers can solve it as I did yesterday, it may not the best solution since it increases build time as you noticed.

After a hour of Google search I finally found this: https://stackoverflow.com/questions/76296911/precompiled-header-errors-in-visual-studio-2022-version-17-6

Quote

To fix this problem, change this setting: Project properties > C/C++ > Language > Build ISO C++23 Standard Library Modules > No.

---

Update: apparently in msvc, the std lib modules replace the precompiled headers! Which makes sense. However, if your code needs to work with other compilers, it might be best not to replace these PCHs too quickly. 

Disabling Build ISO C++23 Standard Library Modules really solves the problem. Is worth to mention manylegged comment as

Quote

You can also fix it by setting 'C++ Language Standard' to 'ISO C++20 Standard (/std:c++20)' or something else besides latest.

That is also true, I just tested it. But I decided to keep using /std:c++latest. Why it works with /std:c++20? because the Build ISO C++23 Standard Library Modules option only affect /std:c++latest!

Edit: Updated the Mega.nz archive again:

2023.06.11: - Re-enabled precompiled headers in client source. To be able to build with pecompiled headers enabled in the latest
              Visual Studio with /std:c++latest which this project uses, we have to select No for the "Build ISO C++23 Standard
              Library Modules" in Project properties -> C/C++ -> Language (in each project in the solution). Longer explanation:
              https://metin2.dev/topic/27610-40250-reference-serverfile-client-src-15-available-languages/page/52/#comment-158117

@Nuzzo @Krynn @gleskpem1 @ricrd

---

@gantretv Try with this (please re-download ClientVS22 just to be sure you have everything right) and check if you can start it now.

Edited by TMP4
Link to comment
Share on other sites

2 hours ago, TMP4 said:

So the problem came from the latest Visual Studio 2022 (v17.6). (May need a clean install to reproduce)

While disabling Precompiled headers can solve it as I did yesterday, it may not the best solution since it increases build time as you noticed.

After a hour of Google search I finally found this: https://stackoverflow.com/questions/76296911/precompiled-header-errors-in-visual-studio-2022-version-17-6

Disabling Build ISO C++23 Standard Library Modules really solves the problem. Is worth to mention manylegged comment as

That is also true, I just tested it. But I decided to keep using /std:c++latest. Why it works with /std:c++20? because the Build ISO C++23 Standard Library Modules option only affect /std:c++latest!

Edit: Updated the Mega.nz archive again:

2023.06.11: - Re-enabled precompiled headers in client source. To be able to build with pecompiled headers enabled in the latest
              Visual Studio with /std:c++latest which this project uses, we have to select No for the "Build ISO C++23 Standard
              Library Modules" in Project properties -> C/C++ -> Language (in each project in the solution). Longer explanation:
              https://metin2.dev/topic/27610-40250-reference-serverfile-client-src-15-available-languages/page/52/#comment-158117

@Nuzzo @Krynn @gleskpem1 @ricrd

---

@gantretv Try with this (please re-download ClientVS22 just to be sure you have everything right) and check if you can start it now.

I upgraded visual studio to the latest version to test.
Compilation works even without this:

 

"- Added StdAfx.h to EterBase\Poly, it just includes the ../StdAfx.h."

"- In Userinterface/Userinterface.rc I changed #include "afxres.h" to #include <Windows.h>"

Is it no longer necessary?

Link to comment
Share on other sites

  • Contributor
1 hour ago, Nuzzo said:

I upgraded visual studio to the latest version to test.
Compilation works even without this:

 

"- Added StdAfx.h to EterBase\Poly, it just includes the ../StdAfx.h."

"- In Userinterface/Userinterface.rc I changed #include "afxres.h" to #include <Windows.h>"

Is it no longer necessary?

  • "afxres.h" to <Windows.h>" only needed if you don't want to install C++ MFC. The launcher does not use MFC so it is totally fine to replace it.
  • Eterbase/Poly's StfAfx.h only needed if you disable Precompiled headers. We're re-enabled them so you don't need them but if you place it, it won't harm you and if you disable precompiled headers for any reason in the future, you'll still be able to compile.

If you can compile you're good. What I reccomend is keep using precompiled headers to have better build time and if you'll have problems with precompiled headers (stdafx.h) then turn off the "Build ISO C++23 Standard Library Modules" as in my previous post.

  • Love 1
Link to comment
Share on other sites

5 hours ago, TMP4 said:

So the problem came from the latest Visual Studio 2022 (v17.6). (May need a clean install to reproduce)

While disabling Precompiled headers can solve it as I did yesterday, it may not the best solution since it increases build time as you noticed.

After a hour of Google search I finally found this: https://stackoverflow.com/questions/76296911/precompiled-header-errors-in-visual-studio-2022-version-17-6

Disabling Build ISO C++23 Standard Library Modules really solves the problem. Is worth to mention manylegged comment as

That is also true, I just tested it. But I decided to keep using /std:c++latest. Why it works with /std:c++20? because the Build ISO C++23 Standard Library Modules option only affect /std:c++latest!

Edit: Updated the Mega.nz archive again:

2023.06.11: - Re-enabled precompiled headers in client source. To be able to build with pecompiled headers enabled in the latest
              Visual Studio with /std:c++latest which this project uses, we have to select No for the "Build ISO C++23 Standard
              Library Modules" in Project properties -> C/C++ -> Language (in each project in the solution). Longer explanation:
              https://metin2.dev/topic/27610-40250-reference-serverfile-client-src-15-available-languages/page/52/#comment-158117

@Nuzzo @Krynn @gleskpem1 @ricrd

---

@gantretv Try with this (please re-download ClientVS22 just to be sure you have everything right) and check if you can start it now.

Well, redownloading haven't helped me. Actually it might be something with my windows files, despite I actually filled them 😕

Edited by gantretv
  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...

I have a database problem as in the attachment, the server deletes the database after 3-4 days and writes the following there. "All your data was backed up. You need to email us at [email protected] to recover your data. (more information: go to xxx) ALLWAYS CHECK YOUR SPAM FOLDER! OR YOU MAY MISS OUR MAILS
If you dont answer we will leak and expose all your data and in 48hs delete it forever from our server."

  • Smile Tear 1
Link to comment
Share on other sites

  • Contributor
5 hours ago, Krynn said:

I have a database problem as in the attachment, the server deletes the database after 3-4 days and writes the following there. "All your data was backed up. You need to email us at [email protected] to recover your data. (more information: go to xxx) ALLWAYS CHECK YOUR SPAM FOLDER! OR YOU MAY MISS OUR MAILS
If you dont answer we will leak and expose all your data and in 48hs delete it forever from our server."

Maybe change the password from 123456789 to somewhat stronger so bots won't do this with you? 😅

Link to comment
Share on other sites

@ TMP4

1.

Type ITEM_QUEST doesnt have any subtype.. So should be 0 in item_proto, because in some case you can got error from syserr and cant run game..
Subtype MATERIAL_LEATHER is for type ITEM_MATERIAL (6)

ITEM_QUEST	MATERIAL_LEATHER

I found it 4x in proto..

2.

Shields have wearflags WEAR_UNIQUE and  UNIQUE items are WEAR_SHIELD.. There is problem in source.. Such a stupid coding.. (Ymir sleep lol.. Dont forgot fix item_proto too)

3. 

In ProtoReader are 2x duplicite arSub29..

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

  • Contributor
3 hours ago, Krynn said:

yes, I understand you, but my server is not active, so only my friend and I are on a vds server, so how should bots know about my server? so i don't know

Bots alyways monitors hosting's ip addresses frequently. Your ip is not new, and they don't care if your metin2 server not opened yet, your virtual dedicated server is live and they can reach it and they know your ip address.

What's more, if you open the windows remote desktop port on your home computer (3389) and have a password for your pc with a strength like 123456789, your computer will be compromised in a few days at max.

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

On 6/22/2023 at 3:57 PM, TMP4 said:

Bots alyways monitors hosting's ip addresses frequently. Your ip is not new, and they don't care if your metin2 server not opened yet, your virtual dedicated server is live and they can reach it and they know your ip address.

What's more, if you open the windows remote desktop port on your home computer (3389) and have a password for your pc with a strength like 123456789, your computer will be compromised in a few days at max.

ah ok i had no idea about this issue thank you i changed my password i'm checking it

Link to comment
Share on other sites

  • 2 weeks later...

Hi, i was trying to make the server over my external ip but it does not work for me... i changed config files, removed the hashtag at the beginning and opened the ports but it will not let me log in. If i put my internal ip in client then i will log in but after i choose the character I will get kicked out. Any help please ?

Link to comment
Share on other sites

  • Contributor
17 hours ago, SweexMan said:

Hi, i was trying to make the server over my external ip but it does not work for me... i changed config files, removed the hashtag at the beginning and opened the ports but it will not let me log in. If i put my internal ip in client then i will log in but after i choose the character I will get kicked out. Any help please ?

Login via public (external) ip and check if your ports are opened succesfully here: https://www.yougetsignal.com/tools/open-ports/

Link to comment
Share on other sites

@ TMP4

parece que encontrei um bug, fiz a instalação do 4 inventario, no inventario 3 e 4 os itens somem ao dar reboot no servidor, alguma maneira de solucionar isso?

os itens funcionaram bem, não obtive outro bug até então. somente esse em que os itens somem. Sou novato ainda, talvez estou reiniciando errado o servidor? se sim alguem sabe ou tem um tutorial de como fazer da forma correta?


"It seems like I've encountered a bug. I installed the 4th inventory, and in inventories 3 and 4, the items disappear upon reboot on server. Is there any way to solve this?"

"Items worked fine for me, and I haven't encountered any other bugs so far. It's just this issue where the items disappear. I'm still a beginner, so perhaps I'm restarting the server incorrectly? If so, does anyone know or have a tutorial on how to do it correctly?" 

The only thing syserr client:

0709 03:14:52923 :: CRaceManager::GetRaceDataPointer: cannot load data by dwRaceIndex 40228 

 

Edit: good after making a recording and analyzing it I verified that possibly the items are not actually disappearing, but a rollback is happening

https://youtu.be/Q-Gbtpsk7Ac

 

Edited by waghoppe
Link to comment
Share on other sites

  • Contributor
1 hour ago, waghoppe said:

@ TMP4

parece que encontrei um bug, fiz a instalação do 4 inventario, no inventario 3 e 4 os itens somem ao dar reboot no servidor, alguma maneira de solucionar isso?

os itens funcionaram bem, não obtive outro bug até então. somente esse em que os itens somem. Sou novato ainda, talvez estou reiniciando errado o servidor? se sim alguem sabe ou tem um tutorial de como fazer da forma correta?


"It seems like I've encountered a bug. I installed the 4th inventory, and in inventories 3 and 4, the items disappear upon reboot on server. Is there any way to solve this?"

"Items worked fine for me, and I haven't encountered any other bugs so far. It's just this issue where the items disappear. I'm still a beginner, so perhaps I'm restarting the server incorrectly? If so, does anyone know or have a tutorial on how to do it correctly?" 

The only thing syserr client:

0709 03:14:52923 :: CRaceManager::GetRaceDataPointer: cannot load data by dwRaceIndex 40228 

 

Edit: good after making a recording and analyzing it I verified that possibly the items are not actually disappearing, but a rollback is happening

https://youtu.be/Q-Gbtpsk7Ac

 

It is not a bug and it has nothing to do with the 4 inventory.

Item flush to db (save to db) time is every 7 minute by default in Metin2. If you reboot the whole operating system (why tho? close.sh is enough to close the server..) then of course the save is not happening.

If you wanna close the server and let items save to db you can do the following:

  • /shutdown then wait at least 7 minute then sh close.sh (or reboot..)
  • Type 'killall game' to the terminal, then with the 'ps' command you keep checking if all cores stopped, then type 'killall db'.

Latter is way faster then waiting 7 minute. You can do the latter with a script if you will, save it as close2.sh or something and use that...

clear

echo -e "\033[31m \n The server is shutting down.. \033[0m"
while pgrep "game"; do
	echo -e "Waiting for game to stop.."
	killall game
	sleep 3
done

while pgrep "db"; do
	echo -e "Waiting for db to stop.."
	killall db
	sleep 3
done

clear

echo -e "\033[31m \n The server shut down successfully!\033[0m"
Edited by TMP4
  • Love 1
Link to comment
Share on other sites

On 7/7/2023 at 3:43 PM, TMP4 said:

Login via public (external) ip and check if your ports are opened succesfully here: https://www.yougetsignal.com/tools/open-ports/

It still does not work... however i have decided to put it on vps... but freebsd no longer supports mysql56. So my question is.. if i will use mysql57, will the server work ? thanks

Link to comment
Share on other sites

  • Contributor
1 hour ago, SweexMan said:

It still does not work... however i have decided to put it on vps... but freebsd no longer supports mysql56. So my question is.. if i will use mysql57, will the server work ? thanks

You missed this part isn't you? "check if your ports are opened succesfully here: https://www.yougetsignal.com/tools/open-ports/"

Anyway in vps you'll be okey. I don't know if it will work with 5.7. Probably not or at least there will be some anomaly. You can install 5.6 if you take the cached package files from 

This is the hidden content, please
from the vm.

Then install with the command: pkg add /path/to/package.txz for example pkg add /var/cache/pkg/mysql56-server-5.6.51.pkg

Edited by TMP4
  • Metin2 Dev 4
  • Eyes 1
  • Good 1
  • Love 5
Link to comment
Share on other sites

14 minutes ago, TMP4 said:

You missed this part isn't you? "check if your ports are opened succesfully here: https://www.yougetsignal.com/tools/open-ports/"

Anyway in vps you'll be okey. I don't know if it will work with 5.7. Probably not or at least there will be some anomaly. You can install 5.6 if you take the cached package files from 

This is the hidden content, please
from the vm.

Then install with the command: pkg add /path/to/package.txz for example pkg add /var/cache/pkg/mysql56-server-5.6.51.pkg

Im pretty sure ports were opened.. but i decided to put it on vps so I did not bother to try it again.. anyway, could you tell me how to install that mysql56 through the way you said ? do i have to download the file and extract it to that route ? or is it already there ? And what should i write in command line after ? thank you very much.

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

  • Contributor
7 minutes ago, SweexMan said:

Im pretty sure ports were opened.. but i decided to put it on vps so I did not bother to try it again.. anyway, could you tell me how to install that mysql56 through the way you said ? do i have to download the file and extract it to that route ? or is it already there ? And what should i write in command line after ? thank you very much.

I just edited my comment and your quote contains how you can install it: "Then install with the command: pkg add /path/to/package.txz for example pkg add /var/cache/pkg/mysql56-server-5.6.51.pkg"

So basicly upload and extract to anywhere then use pkg add command with route for the file.

Spoiler

"Im pretty sure ports were opened.." No, unless you checked, you can't be sure 😅

Edited by TMP4
Link to comment
Share on other sites

11 minutes ago, TMP4 said:

I just edited my comment and your quote contains how you can install it: "Then install with the command: pkg add /path/to/package.txz for example pkg add /var/cache/pkg/mysql56-server-5.6.51.pkg"

So basicly upload and extract to anywhere then use pkg add command with route for the file.

  Reveal hidden contents

"Im pretty sure ports were opened.." No, unless you checked, you can't be sure 😅

So if I try to install it.. it say wrong architecture.. i have freebsd 13.1 86_64.. do I have to have i386 version to do this ?

Link to comment
Share on other sites

  • Contributor
13 hours ago, SweexMan said:

So if I try to install it.. it say wrong architecture.. i have freebsd 13.1 86_64.. do I have to have i386 version to do this ?

Yes they were 32bit packages since the vm is 32bit.
Luckily I have an x64 vm too where I had the packages so here you are: 

This is the hidden content, please

FAQ.txt also modified about this MySQL5.6 deprecation issue.
(I may have a look in MySQL5.7 in the future but not promising anything.)

Edited by TMP4
  • Metin2 Dev 50
  • Eyes 6
  • Think 2
  • Scream 1
  • Good 24
  • Love 5
  • Love 50
Link to comment
Share on other sites

Announcements



×
×
  • 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.