Jump to content

TMP4

Contributor
  • Posts

    1112
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    100%

Posts posted by TMP4

  1. On 2/9/2023 at 7:54 AM, TMP4 said:

    Speaking of that etc folder, I may modify the etc folder structure to the ../extern/include-lib as most source have their folder structure in that way.
    It's not changing anything, just folder structure.

    Meg archiva updated.

    2023.02.11: - Libdevil, libmysql, cryptopp and boost was in the /usr/metin2/src/etc folder. I modified these extern stuffs
                  folder stucture to the commonly used /usr/metin2/src/extern/include and lib layout. By doing that, the src
                  folder moved a folder upper to /usr/metin2/src/server, don't forget to modify the aliases paths in root/.cshrc.
                - Libmysql removed, it was the old 5.1.35 version from Kraizy.tgz while we're using 5.6 in the vm. We don't need
                  seperate libmysql because when we install mysql it installs the lib and include files too to /usr/local/lib/mysql
                  and /usr/local/include/mysql. Now we're using that in game's, db's and libsql's Makefile.
                - Mysql 5.6 lib needs OpenSSL so OpenSSL libs linked in game's and db's Makefile. (Look for # OpenSSL)
                - Added $(MAINOBJ) to game's Makefile's clean command so you don't need to manually delete main.o after you
                  do gameclean command. Ymir just forgot it when they made the Makefile.

    To do this update here's a little tutorial:

    Spoiler

    1. If you use the VM then modify root/.cshrc content (check below) and reboot.

    alias start	"cd /usr/metin2/server && sh start.sh"
    alias close	"cd /usr/metin2/server && sh close.sh"
    alias clean	"cd /usr/metin2/server && sh clean.sh"
    alias backup	"cd /usr/metin2/server && sh backup.sh"
    alias questcompile	"cd /usr/metin2/server/share/locale/english/quest && python2.7 make.py"
    alias dbcompile	"cd /usr/metin2/src/server/db/src && gmake -j9"
    alias dbclean	"cd /usr/metin2/src/server/db/src && gmake clean"
    alias dbdep	"cd /usr/metin2/src/server/db/src && gmake dep"
    alias gamecompile	"cd /usr/metin2/src/server/game/src && gmake -j9"
    alias gameclean	"cd /usr/metin2/src/server/game/src && gmake clean"
    alias gamedep	"cd /usr/metin2/src/server/game/src && gmake dep"

    2. Create a new folder called server in the /usr/metin2/src folder.

    3. Move all contant of /usr/metin2/src to /usr/metin2/src/server.

    4. Then take these files and folders from mega:
    /usr/metin2/src/extern
    /usr/metin2/src/server/game/src/Makefile
    /usr/metin2/src/server/db/src/Makefile
    /usr/metin2/src/server/libsql/src/Makefile

    5. Recompile libsql:
    cd /usr/metin2/src/server/libsql
    gmake clean
    gmake dep
    gmake

    6. Recompile db
    dbclean
    dbdep
    dbcompile

    7. Recompile game
    gameclean
    gamedep
    gamecompile

    If you find any bug (for example related to the mysql 5.6 include and lib in the src) then report it to me so I can have a look & fix.

    • Good 1
    • Love 3
  2. 42 minutes ago, Nuzzo said:

    First of all, I thank you for what you do.

    However, I think there is an error in the tutorial you put for the mirrod2db function.

    By comparing the files and looking at the tutorial I noticed that in this point:
    "Search 2x:"
    "%d, %d, %d, %d, "

    it is actually only the second search that needs to be modified, not both times

    Do you mean this part  "%d, %d, %d, %d, %d, " I say search for 2x, but it is there in 4x in the cpp? Yes, I'll clarify the tutorial soon about this, thanks.

    Edit: https://pastebin.com/4HVQ7dRt

  3. 5 hours ago, Chaussette said:

    I 've a VM on virtual box with Hamachi, i used this "[40250] Reference Serverfile By TMP4" package

    1. This tutorial is outdated, there is a newer version with a better code: 

    However you do not need to install it because I did it. Just configure your IP in the CONFIG files. 

    Please read Karbust topic or my FAQ.txt file where you downloaded the serverfile to get more information how to use it. And don't forget to revert the changes you made from this topic.

    • Good 1
  4. 19 hours ago, nazox said:

    Hello, I have this error when i change MakeFile and DeviIL(i can't dw files again i have modifications), i try put  -lssl -lcrypto but don't work >.<

     

    Have a look at 2023.01.11 changelog and take these files:

    /usr/metin2/server/src/etc/libmysql
    /usr/metin2/server/src/etc/libdevil
    /usr/metin2/server/src/game/src/Makefile
    /usr/metin2/server/src/db/src/Makefile
    /usr/metin2/server/src/libsql/src/Makefile
    /usr/metin2/server/src/Makefile (optional)

    Be aware of symlinks and don't forget to make dbdep gamedep and in libsql folder gmake dep (because there's no alias for that) if you want to recompile that too.

    ---

    Speaking of that etc folder, I may modify the etc folder structure to the ../extern/include-lib as most source have their folder structure in that way.
    It's not changing anything, just folder structure.

    • Love 1
  5. Mega archive updated, as I promised here's the fix for the DevIL glitch:

    2023.02.07: - DevIL had a glitch with uploading guild marks. It's not about the recent change that I linked it
                  statically, it existed before, the bug is in the DevIL 1.8.0 itself. Marty helped me to fix the bug, check
                  his commit here: https://github.com/martysama0134/libdevil-patched/commit/0d0c155e3c9945a3ef2e6d474b41a0e373719a3e
                  If you want to fix this bug, please take these files & folders:
                  /usr/metin2/server/src/etc/libdevil (whole folder) and /usr/metin2/server/src/game/src/Makefile
                  Be aware of symlinks in libdevil folder, because if you extract it in windows, you'll loose symlinks.
                  Here is a tgz of the libdevil folder which you can extract in FreeBSD to keep symlinks:
                  https://www.mediafire.com/file/w6ruq6w7u65iqi2/libdevil.tgz/file
                  And here is the Makefile for the game/src if you don't want to redownload the sf: https://pastebin.com/4rUd2xmY
                - CH1-2 CONFIG files had "127.0.0.1" in the DB_ADDR, while CH3-4 CONFIG files had "localhost" in it.
                  I changed the latter to "127.0.0.1" just to be uniform.
                - The mirrod2db function does not mirror item_proto's specular and mob_proto's mob_color column to the
                  database by default, because they just skipped them at saving. I added them, so now the item/mob_proto.txt
                  and item/mob_proto table is the same. If we want to be strict, this was not a bug, but I decided to fix it.
                  Here is a tutorial: https://pastebin.com/AVd8feg3

    I know the previous update was about DevIL static lib, but it is not related to that, but DevIL version 1.8.0 itself.
    If you downloaded this serverfile when I updated to FreeBSD 13.1 you do have the bug because pkg version of DevIL was 1.8.0 in that FreeBSD version already, so if you downloaded the serverfile after 2022.05.21 you 100% have this bug and you should apply the fix.

    My Q&A topic of this bug: https://metin2.dev/topic/30324-changing-guild-mark-problem-devil-180/ There you can find a video and explanation about the bug.

     

    • Love 2
  6. 19 minutes ago, nazox said:

    Thanks for tell the problem, actually I don't see this problem (i don't check), if you can't put the fix, give me few hours and when I come house i can upload. Btw I don't know is me or not but I have problems with msm. If i put new armour , and if add New shapeIndex not work, but if  remove other armour and put low shapeindex armour this working. Of course i know how put new armours, i check values, etc. One Day I can read maybe need change the máx value on src for msm, I want ask if you have this problem, I think too maybe is DumProto, regards 😄.

     

    The max value is in the msm file, not the src 🙂Increase it, it'll work.

    asd.png

    • Metin2 Dev 1
    • Love 1
  7. 7 hours ago, nazox said:

    Yes, is the best "src clean 40k with source" for working, and it's nice files, working great, shit code remove, c++ update, you can use without problems 😄

    Thank you 🙂

    "without problems" Actually there is 1 problem currently regarding DevIL.

    Here's a fix: 

    If anyone can't do it, I'll release a new version including this fixed DevIL either today late afternoon/night or tomorrow. This week I have office days so having very less time to do anything.

    • Love 2
  8. 13 hours ago, martysama0134 said:

    I found the bug on the v1.8.0:

    They save the direction in the .tga:

    sjA0DEa.png

    When MarkImage.cpp loads the .tga it does ilOriginFunc(IL_ORIGIN_UPPER_LEFT); and it gets flipped.

    By commenting these lines directly in the IL src, it gets resolved.

    This is the hidden content, please

    Thank you, it seems now working fine 🙂Many thanks

    ---

    I have 2 question, 1. related to DevIL, 2. to cryptopp.

    1. We don't need to link /usr/lib/liblzma.a with your libdevil, right?
    2. I see your patched cryptopp 

    This is the hidden content, please
     Is there any reason you chose version 7.0.0? Currently I'm using 8.4.0 (because Mali's clientside have 8.4.0 too) while I'm not experiencing any issue and nobody reported me anything, I just curious to avoid future bugs like this DevIL one.

    Edit: We talked in Discord, liblzma.a is not needed unless it asks for it (probably won't) and cryptopp 8.4 is fine if it does not crash at login.

    • Metin2 Dev 24
    • Good 1
    • Love 1
  9. 21 minutes ago, martysama0134 said:

    In game/src/guild_manager.cpp

    // change:
    	rkMarkMgr.LoadMarkIndex();
    	rkMarkMgr.LoadMarkImages();
    	rkMarkMgr.LoadSymbol(GUILD_SYMBOL_FILENAME);
    
    // to:
    	if (!rkMarkMgr.LoadMarkIndex())
    	{
    		rkMarkMgr.SaveMarkIndex();
    		rkMarkMgr.SaveMarkImage(0);
    	}
    	else
    		rkMarkMgr.LoadMarkImages();

     

    I think if the image .tga is missing, it will glitch it on the top when it gets resized the first time, so I'm regenerating it when it attempts to load it the first time.

    i.e. LoadSymbol is unused code.

     

     

    In game/src/MarkImage.cpp, if you want to read the correct save position:

    // change:
    printf("PutMark pos %u %ux%u\n", posMark, colMark * SGuildMark::WIDTH, rowMark * SGuildMark::HEIGHT);
    // to:
    sys_log(0, "PutMark pos %u %ux%u\n", posMark, colMark * SGuildMark::WIDTH, rowMark * SGuildMark::HEIGHT);

     

    Check if it solves the issue.

    It's still the same. It places the uploaded mark to the last line of the tga. Then I restart the server. Then I upload another one, the previous will be moved to the first line (correct location) and after a server restart, it'll show the 1. logo since that is in the correct location.

    Just as I showed in the video 😕

    But in the meantime I recompiled DevIL 1.7.8 to get clean static libs, it works fine. So it's only wrong with DevIL 1.8.0.
    If I can't fix it, I'll just use 1.7.8. The newer version doesn't even give any advantage, I only used it because the pkg and ports got updated to that version...

  10. 3 hours ago, martysama0134 said:

    Maybe you forgot to delete mark/mark_index as well. I'm using libdevil (1.8.0) as static (server-side) for 9 years I guess. Either 32bit or 64bit, c++98 / c++20. Never got a crash about it. 

    You can also use IL without dependencies (libpng & co) server-side, because they are not needed.

    This is the hidden content, please

    Even so, I checked an 8 years old mark_0.tga. The mark_index is incremental for every new guild created. If a guild doesn't upload the flag, it remains black. It never started from the bottom (like in your case).

    For the lzo1x_compress crash, I'd check if they uploaded a 0kb logo, or something like that.

     

    First of all thanks for your answer 🙂

    I did not forget to delete mark_index. I have guild id 1 and 2.
    I downloaded and compiled and linked static your libdevil but it's the same.

    Here is a video about my bug:

    It placed the 1. logo to the last line of the mark tga, and when I uploaded another logo, it moved the previous one to the first line (the right location) and placed the current logo the the last line. Please watch the video because it sound silly but it really does this.

    I replaced DevIL libs with older precompiled ones (1.7.8 from Mali's older FreeBSD12.0 VM) and then it works fine, it never places to the last line.
    Ofc it's dirty, I just did it for testing.

    By knowing that, should the source be modified to be compatible with 1.8.0?

    • Metin2 Dev 1
  11. Today someone reported me a crash about guild marks: https://metin2.dev/topic/27610-40250-reference-serverfile-client-src-15-available-languages/page/44/#comment-155036
    and while I couldn't reproduce it I found another bug with guild marks.

    Basicly the problem is, when I change the guild mark, sometimes it starts filling from the bottom. I attach a picture to explain. Please read by the numbers 1. 2. 3. 4.

    K-perny-k-p-2023-02-06-150219.png

    I recently changed DevIL to static. But I took 1 years old backup to test and the problem exists there too. So it's probably not about changing DevIL libs from shared object to static.

    I'm using this: 

     

    This is the hidden content, please

    I'm not sure If I fcked up something or it's bad by default.

    DevIL version is 1.8.0 from pkg (pkg install devil)

    • Metin2 Dev 23
    • Scream 2
    • Good 3
    • Love 1
    • Love 2
  12. Just now, .Kuja said:

    @ TMP4 OK Thanks  a question come with your files still updates from the Gameforge of Metin2 still pure?

    "My goal was to make a reference r40250 serverfile as official as possible compared to what GF had back when their files got leaked in early 2014.
    No new systems added, only bug fixes."

    The 40k src got leaked (actually stolen xD) in late 2013 and got published to everyone (i think in epvp's forum) in early 2014. It's based on that, nothing new system or so added.

    This is meant to use as a base to build your own project, add your (own) systems etc.

  13. 3 hours ago, TheGamer said:

    Img

    I already had this error more times but I deleted the src folder and uploaded it, it solved it or create freebsd again and it solved it but now it's always and the last update I made in the source a long time ago and it's been working fine until this happened.

    Thanks,  it's about the guild mark. Recently I changed DevIL libs to static what the source use to work with guild mark images.

    If you find out exactly when the crash happens, please write me.

    I may change back the DevIL libs to dynamic if we can't figure it out.

  14. 11 hours ago, banuliciraul123 said:

    I fixed that,i have this : usr/local/bin/ld -lmysqlclient , and i have these files..

    gl02cQO.png

    By default you have something like this in your MakeFile:

    ifeq ($(BSD_VERSION), 7)
    INCDIR += -I../../libmysql/7.x-5.1.35
    LIBDIR += -L../../libmysql/7.x-5.1.35
    else
    INCDIR += -I../../libmysql/5.x-5.1.35
    LIBDIR += -L../../libmysql/5.x-5.1.35
    endif
    
    LIBS += -lmysqlclient -lz

    This means it will lokk for libmysqlclient.a in ../../libmysql/5.x-5.1.35/libmysqlclient.a
    (the ../ means one folder back, you probably knows it but anyway..)

    Is the file there? Check your makefile because yours may reads from another location.

    Also you can link it directly (I prefer that way), for example here's mine:

    LIBS += ../../etc/libmysql/libmysqlclient.a /usr/lib/libz.a

    I have that lib in ../../etc/libmysql/libmysqlclient.a

  15. 19 hours ago, garofolo said:

    hello friend, when you leave the server online only for you to perform tests, it will not generate any game.core, have you already published a server with these files with large-scale players?

    because that is my point here.

    of course it could be some system I added but it was such simple modifications and I already have a few years of experience with metin2. I'm here posting an identified failure and just trying to find solutions.

    thank you anyway.

    Disable ENABLE_GOTO_LAG_FIX for testing and when it crash copy here your bt and bt full. Copy full log from your PuttY, do not take just a picture.

    Then we cand find out what made your server crash and where.

    I ask this because your last crash was a ENABLE_GOTO_LAG_FIX's line what I'm not intended to check and test. But if the crash happens pointing to a default line then yes of course I can take a look.

    ----

    Quote

    of course it could be some system I added but it was such simple modifications and I already have a few years of experience with metin2.

    By the way just in your char.cpp from the other topic I see

    ENABLE_SWITCHBOT
    ENABLE_FLOOD_PRETECTION
    ENABLE_HUNTING_SYSTEM
    ENABLE_PICKUP_FILTER

    These aren't simple nor small modifications. And it's just one of your cpp file. Still you can copy bt log, but you'll need to upload the files where it will point to otherwise I can't see your lines to check.

  16. 3 hours ago, garofolo said:

    Hello everyone after makes some tests and put server online with beta i found a serius bug in the game is CRASH CORE!

    I really recommend nobody to use these files as base for some server.

    Proves?

    spacer.png

    this is related when player use teleport and is random. 

    So entity_view.cpp:19 is an empty line by default:

    K-perny-k-p-2023-01-30-200719.png

    But you did install this because I just checked your profile and your recent activity:

    So your line 19 is:

    K-perny-k-p-2023-01-30-200908.png

    Should I explain further?

    Disclaimer: I'm not saying Ikarus's fix is bad. I just saying you installed something what caused you problems, and you came here to blame.

    • Good 1
  17. 8 hours ago, TheGamer said:

    @ TMP4 my game99 crash and syserr show nothing 

     

     

    Sorry but what do you expect from me in this situation with this little information?
    I just warped to the OX map (game99) and even started an event, did not crash for me. Warped to another game99 map (gm_guild_build), did not crash.

    I don't know when it crash for you, what do you do when it crash, or is it crash because of a modification you made.
    To find out or at least to have a clue why it crashed for you, do a gdb and copy the output of bt and / or bt full here.

    cd /usr/metin2/server/game99
    gdb
    file game
    core game.core
    bt
    bt full
    quit

    But if you see it's coming from a new system then please kindly open a new topic in q&a.

  18. 10 hours ago, Ciprian said:

    Hello,

    When I tried to modify something in Navicat, for example at 70038 item, I want to change value1 from 20 at 100. I change this value and save, after that when I give reboot at server and check again the db from SQL, the value is on 20... also I tried to export the intem_proto from Navicat and put intem_proto.txt in WinSCP, than I tried to start the client and connection is refused in this case... What I did do wrong? 

    A metin2 server by default reads the item_proto from item_proto.txt (unless you use very old serverfile, or you or your serverfile's author did not modify it). So if you change anything in the mysql, it gets overwritten every time you start your server.

    "I tried to export the intem_proto from Navicat and put intem_proto.txt in WinSCP"
    It's a bad approach since an sql file and the item_proto.txt (csv just with tabs) are totally different file. If you exported it to csv, that's bad too because while you have numbers on item_proto table, you have names in item_proto.txt (for example antiflags ANTI_DROP, ANTI_MYSHOP vs number like 1,4,8,16 etc).

    Edit item_proto.txt directly, and forget about the mysql proto.
    If you want to use mysql proto (I'm not advising it) then: 
    https://metin2.dev/topic/3198-db-no-txt/

     

  19. Quote

    But it's standing next to it

    Do you have the mount system renewal? Then your problem isn't realted to custome mount, but the mount system renewal.
    I quickly checked the code, that system does not mount you, it's only summoning it by default.

    char.cpp in void CHARACTER::CheckMount()

    mountSystem->Summon(mobVnum, mountItem, false);

    You can try to extend this with

    mountSystem->Mount(mobVnum, mountItem);

    Not tested. 

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