Jump to content

Gurgarath

Forum Moderator
  • Posts

    345
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Posts posted by Gurgarath

  1. 1 hour ago, Tatsumaru said:

    Is there a solution to this problem?

    So far there isn't any "clean" fix, just workarounds that will not work in any cases. This is caused upon resetting DirectX device like ElRenardo said. Only publicly fixed bug is the number 3

  2. You can find it in cmd_general for the command "do_in_game_mall". It will pretty much send you to a specific URL which contains an encrypted string that is then uncrypted to get your character on the item shop.

    You just need to have a final command of "mall https://%s" specifying "g_strWebMallURL.c_str()" (which is the url you set-up in your config file).

     

     

  3. You are doing a big misunderstanding here. I will try to explain the best as I can. There is no memory leak "as-is" in FreeBSD. Otherwise it will mostly get fixed really soon because it is considered critical in (mostly) any specifications. What you probably want to do is to remove any "bloatware" in FreeBSD and long-story-short, there isn't any.

    Of course there are services that you would most likely want to disable (like SendMail), but original FreeBSD iso (FreeBSD boot-only iso too) doesn't have anything that takes a lot of memory or CPU usage altogether and trying to remove things "the hard way" will most of the time result in damaging the OS. What you ask sounds like "I want to remove everything on Windows that isn't necessary to run the Office suite", it doesn't make sense as you will also (if you do the things correctly) end up installing additional stuff such as MySQL, IPFW, Screen maybe or whatever suits your needs.

    Like Karbust shown, his FreeBSD takes up to 617Mb and 1 to 2% of CPU usage, which is really fine (this is less than any modern browser). Additionnaly, you probably run a 32bits game and db, which will never use more than 2 to 4gb of Ram per core and if you have configured your MySQL reasonably, it will never go really high unless you have done something wrong.

    Tldr; even if you save 200Mb of RAM (which is 1/3 of what the system is using, this is absurdly huge if we keep the ratio), you will probably never make a good use of it and will have way more issues than what 200mb of RAM could possibly cause.

  4. 1 hour ago, TMP4 said:

    So first of all only the 3rd line is a real 'error':

    1126 22:25:14406 :: CEffectManager::RegisterEffect - LoadScript(D:\Ymir Work\effect\monster2\yellowred1_big.mse) Error

    That effect file is missing in every client, Ymir/Webzen forgot to include it.

    The 1st, 2nd and 4th line is not an error. It is just a notice that it will try to find in another path ("Will Find Another Path." in english). And it actually finds.
    If you are bothered with that syserrs I suggest you to either comment out from the source or move to logs.txt what are only presents in debug mode.
    I'm not gonna remove that syserr because it is a reference release.

    About that effect file, since Ymir/Webzen forgot to include it, I can't really conjure it up for you 😅
    You have 2 option:

    1. Remove it from flame_npc.msm: https://pastebin.com/0hbbAyvW
    2. Use yellowred1_great.mse because that is exists, but maybe different.

    About this effect, it was actually in some clients back then (2015 for example) but it was removed a few years ago. I have no clue why, but whe should be able to find it if we dig a bit. It is the effects on his legs.

    Spoiler

     

     

    • Good 3
  5. 20 hours ago, Aerrow said:

    Frist of all thank you for the release, it is nice system.

    Just I can remember more than 10 years before when I played on GF my lvl 10-15 character was not able to go to the Monkey dungeon, the port simple did nothing when I wanted to go in. But when I reached higher level (at least 20) I was able to go inside. So I believe some kind of level check should already exist in the source. Or I'm wrong? Maybe they completely removed this feature or just my memories not correct?

    If I am not mistaken, it was until late 2007 (15-16-17 December of 2007). But the portal was just here as a prop, it had no warp capability. There was a Guardian before it that could allow you to go into the dungeon, you had 20 minutes to roam around (and kill the boss) and if you failed, you were warped back to your main city empire, turned as a monkey. That's as far as I remember (and I've looked for it as much as I could because I remembered the same thing as you).

    The NPC is still in our files, with the ID of 20350. However, there was no level limit, the portal was just a prop and the guardian allowed everyone inside but once every hour.

    • Sad 1
    • Good 1
    • Love 3
  6. This is the best community project driven so far, TMP4 gives a lot for everyone, mostly his time and his experience and he evens fixes the bug that are getting reported. He does a marvel out here and I don't get why people get angry about things they can mostly do by themselves (porting on a more modern BSD or add x64) as well as to share.

    I'm looking forward to see this project on a clean repository to allow for a more easier community interraction as well as easier updating for people who need it.

    Big thank you (and everyone involved) for this!

    • Good 1
    • Love 3
  7. This is just a local hack that displays the effect. You can add whatever check on the server and it won't change anything except for LOW_WIZARD and WIZARD ranks. Your code is actually doing this:

    if(GetGMLevel() >= GM_HIGH_WIZARD && GetGMLevel() <= GM_IMPLEMENTOR)
    {
    	m_afAffectFlag.Set(AFF_YMIR);
    	m_bPKMode = PK_MODE_PROTECT;
    }

     

  8. You can add Sura skill to Warrior kinda easily, I think that even the animations will fit.

    However, creating a whole new race is tricky, you will need a 3D modeler (or someone who adapts it from another game) for the animations, armors and so on. Also you will need someone who will adapt all the existing costumes and hairstyle to this specific character. Regarding the code, it's not that hard to do, I think the hardest part will be to make it blend with the other races.

  9. I am working currently on quest revamp of course of event flags and this topic is useful to see what to keep before looking at the code.

    I want to talk a bit about the "pre_event_hc". This is a part of Metin2 Europe (& US) history that is not really well-known. There was a HUGE teasing (biggest ever as far as I know) regarding the Grotto update that brought so much to the game and there was special events as well. So, before the Grotto of Exile was added to the game, there was a pre_event. The Heaven Cave pre-event (hence the HC). This is really linked to the "hc_drop" flag as you need the 30178 item for this specific pre_event.

    This pre-event made Heuk-Young spawn in every Map2. You were able to exchange to her the item 30178 "Glyph Stone" (that you could drop on monsters) to get a "Dragon God Amulet" that allowed you to teleport right before the very entrance of the Grotto of Exile. This event were never to return as far as I know and got forgotten for the most part. But it made me nostalgic to rewind to these times.

    Edit : We can find the quest "pre_event_heavens_cave" which is the event (and a bit more?) and it pretty much says the same as I did, with actually more stuff inside that I forgot.

    • Good 2
  10. I can give you a few hints :

    - Prepare your linux environment (or Debian) like you would for FreeBSD (find equivalence but usually everything is maintained)

    - Check what need to be changed on the spot.

    - Change BSD exclusive functions to their Linux equivalent, wherever you find a WIN32 define you most likely have to dig around these.

    If you have any crashes, you will need to debug these and the result output should be eloquent enough to give you hints.

  11. That is a very brilliant fix! I just finished doing all the changes I could and ended up with pretty good results! I haven't fully finished yet (have to find a way for CopyDragonSoulItemGrid function), but the results so far are good.

    I also noticed a bug, it can be from my side but I prefer to report it for anyone, I am sometimes unable to switch an equipment part, on my warrior it was the weapon and the helmet, on my shaman it was only the armor. It doesn't happen when I revert my changes. (Edit : Do not bother trying, it was me. I was tired != != ==)

    Spoiler

    Before:

    unknown.png

    After :

    unknown.png

     

  12. 50 minutes ago, Lead0b110010100 said:

    I tested it and got like 44% RAM usage reduction. But I had to do some changes in order to not get exceptions when running the server on windows. (Due to unintialized usage of map) + I changed way more lines of code to do that, but the idea is absolutely correct.

     

    260105p6Utzb9.gif

     

    • Lmao 4
    • Love 1
  13. 10 hours ago, TMP4 said:

    Can we edit the playable area? I think the best method to solve the height problem is to subtract some pixel, if it's possible.
    (So the taskbar will not hide the bottom of the client)

    As far as I remember, this topic fixes it and play around with the playable area.

     

    11 hours ago, HaiosMotan said:

    isn't there any way of using

    HWND taskBar = FindWindow(L"Shell_traywnd", NULL);

    to find the exact height of the taskbar? some use big taskbar(default) others use "Use small taskbar buttons".

    tried 2 ways from the comments and both leave gaps between m2 client and taskbar(ofcourse,i can increase the number of pixels for me,but it could make it worse for others)

    I personnally use this to get my metrics. Note that I am using W11 and that Taskbar isn't really easy to tweak without going into regedit. Only available option is to hide it and the metrics catch it greatly.

    Spoiler
    			RECT work_area{0,0,0,0};
    			SystemParametersInfo(SPI_GETWORKAREA, 0, &work_area, 0);
    
    			// Get Screen Size with Taskbar
    			const int32_t work_area_width = work_area.right - work_area.left;
    			const int32_t work_area_height = work_area.bottom - work_area.top;
    			
    			// Get Application (caption) Size
    			const int32_t caption_height = GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CXPADDEDBORDER);
    
    			// Get Maximum Available Resolution
    			const int32_t screen_width = GetScreenWidth();
    			const int32_t screen_height = GetScreenHeight();
    
    			// Get Metin2.cfg desired size
    			const int32_t window_width = m_pySystem.GetWidth();
    			const int32_t window_height = m_pySystem.GetHeight();
    
    			// Get Taskbar Size
    			const int32_t taskbar_height = GetScreenHeight() - work_area_height;
    			
    			TraceError("Caption Height %d", caption_height);
    			TraceError("Taskbar Height %d", taskbar_height);
    			TraceError("Screen Resolution %dx%d", screen_width, screen_height);
    			TraceError("Maximum Available Resolution %dx%d", work_area_width, work_area_height);
    			TraceError("CFG Resolution %dx%d", window_width, window_height);

    unknown.png

     

    • Love 3
  14. 9 minutes ago, ReFresh said:

    So why did you mention this? I don't really understand then. 

    Because someone I've talked with had an issue with his width in the metin2.cfg. This is the main issue as width is the issue and I wanted people to double-check that they had no issue there. Height on the contrary has nothing to do with the bug, that's why I've kept it normal in my example. Also, the width of the client should be your full monitor width, unless you have your sidebar on the side.

     

    • Good 1
  15. 1 hour ago, ReFresh said:

    I don't know why it happens, but my metin2.cfg is not able to save the 1920x1080 resolution. Everytime when I start the client, the metin2.cfg is overwritten by 1920x1010 resolution. Can someone tell me why it happens or how to make it starting with the saved resolution? Thanks

    I did it like this to make the window centered:

      Reveal hidden contents

    But I'm little bit confused about the 1920x1010 resolution in metin2.cfg everytime when I start the client.

    It is the size of the "playable area", not the size of the whole application.

    For example: unknown.png

    Spoiler

    unknown.png

     

  16. 12 minutes ago, Maze said:

    I have it like this, but only the first window is centered on me, the second keeps appearing further to the side

    Oh, yes, this isn't a bug this is a feature. Ymir did that on purpose. You can use @Abel(Tiger) fix for this, every window will open on the center of the screen (which is what most modern games do).

  17. On 9/20/2021 at 2:29 PM, Abel(Tiger) said:

    Those ~5px are for the shadows if I'm not mistaken.

    Also the ideea made by Ymir to open the client in two diferent position is stupid.

    I consider opening the windowed client on the center it's the best solution:

    		if (Windowed)
    		{
    			m_isWindowed = true;
    
    			RECT rc;
    			GetClientRect(&rc);
    		
    			int windowWidth = rc.right - rc.left;
    			int windowHeight = (rc.bottom - rc.top);
    		
    			// 80 is the gap for the taskbar, you can increase it
    			CMSApplication::SetPosition((GetScreenWidth() - windowWidth) / 2, (GetScreenHeight() - windowHeight - 80) / 2);
    		}
    		else
    		{
    			m_isWindowed = false;
    			SetPosition(0, 0);
    		}

     

    I've talked about this with Intel and yeah, the whole check is clumsy, it works only for the second window and if you open it during a specific timestamp. However the fact that it opens at the opposite of the second one is an approach I could understand, but centering it would erase any clumsyness

    On 9/20/2021 at 5:04 PM, Maze said:

    how do I fix the second window position?

    I personally had no issue with the second window, but here you are. Undo the original tutorial and do this (it will render the whole if useless though so you can as well remove it):

    unknown.png

     

  18. 8 minutes ago, martysama0134 said:

    8px is too much. I see 1px in the other monitor. I suggest you -7.

    zmvMP5u.png

    Thanks for your share but that's what I said, to adjust to your needs. At first I was going for 7 then needed 8, Haios needed 9 for example.

    j9pC6pkmoJlXAAAAABJRU5ErkJggg.png

    Also, you can add it into "bAnotherWindow" condition if you have the bug more than once with multiple clients.

    unknown.png

     

     

    • Metin2 Dev 2
  19. On 2/3/2021 at 7:07 PM, displayjokes said:

    Thank you! Works perfectly!

     

    Do you know by any chance where do you fix the client window position aswell?

    My client always opens with margin left of around 7 pixels

    Screenshot:

      Reveal hidden contents

     

    It's windowed, max size, a bit of the window shows up in my second monitor..

    That thing bothers me everytime and i have to drag it everytime..

     

    Thanks in advance! 

     

    • Good 1
    • Love 1
  20. Hello!

    Many people complained about a "7 pixel bug" on some clients. For example the client will open a few pixels too far from the left-side of the screen. Usually between 7 and 9 pixel on the right.

    I still do not know why it happens for some people and not for other. I thought about a visual studio toolset, a screen configuration or whatever but it turns out to be harder to know why it actually happens, I also had only two people talking about this so I cannot get accurate data. Anyway, let's get started it's really easy.

    The bug looks like this, take from the official client it looks like 1 or 2 pixels only. But it looks almost exactly like it at some moments.

    First, make sure your metin2.cfg is correct and does not display a weird resolution (like 1913 * 1080).

    BcbiMfXxP8V5POQotw34jLiw0bPDJde1APmVhG4Q

    Then just add this small line in PythonApplication.cpp:

    This is the hidden content, please

    Right after this one:

    AdjustSize(m_pySystem.GetWidth(), m_pySystem.GetHeight());

    EDIT:

    If you happen to have it on the second window as well, move the line under the bAnotherWindow check. Just like this:

    Spoiler

    unknown.png

    And voilà, it's fixed. Don't hesistate to add or remove one pixel if needed.

    It's really small and looks like a workaround but I did it really quickly. I didn't test this fix on clients / computers not having the actual bug. If it is a client issue it shouldn't cause any problems, if it's a computer issue, I might need more data to fine-tune the fix. Don't forget to share some data if you have.

    • Metin2 Dev 96
    • Eyes 1
    • Facepalm 1
    • Think 1
    • Good 28
    • Love 5
    • Love 37
×
×
  • 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.