Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/03/19 in all areas

  1. M2 Download Center Download Here ( Internal ) Hello, thanks to @masodikbela ideea about motions i could find a way of how to improve the loading of players. You must follow the tutorial exactly as it is. 1. Open root/playersettingmodule.py and replace all RegisterCacheMotionData with RegisterMotionData 2. Open \UserInterface\PythonCharacterManagerModule.cpp Search for PyObject * chrmgrRegisterMotionData(PyObject* poSelf, PyObject* poArgs) Replace this line pRaceData->RegisterMotionData(iMode, iMotion, c_szFullFileName, iWeight); With const char * c_szFullFileName = CRaceManager::Instance().GetFullPathFileName(szFileName); CGraphicThing* pkMotionThing=pRaceData->RegisterMotionData(iMode, iMotion, c_szFullFileName, iWeight); if (pkMotionThing) CResourceManager::Instance().LoadStaticCache(pkMotionThing->GetFileName()); 3. Open \EterLib\ResourceManager.cpp and replace int g_iLoadingDelayTime = 1; const long c_Deleting_Wait_Time = 3600000*4; const long c_DeletingCountPerFrame = 1; const long c_Reference_Decrease_Wait_Time = 3600000*4; Search for and comment it (not really necessary, it's your will ) //m_pCacheMap.clear(); Search for GameLib\RaceData.cpp void CRaceData::RegisterMotionMode(WORD wMotionModeIndex) comment //pMotionModeData->MotionVectorMap.clear(); This is what will load for cache at your first login [Hidden Content] What will fix this: When your walk and see new players screen freeze whould be way shorter or not happening at all. Recommended after this tutorial to update the granny in the source and the gr2 models (except the buildings).
    15 points
  2. The original topic got updated/changed over time but I will not update this comment, so its normal to feel confused while reading it. I've run through the method you chose, and I have some notes about them. c_Reference_Decrease_Wait_Time is unused right now, because the client is not using other thread for background loading by default, so m_RequestMap will be empty always, so ms_loadingThread.Fetch(&pData) will return false always. Moreover, the whole ProcessBackgroundLoading function is unused right now, since it only do things if the mentioned background stuff is enabled. Editing g_iLoadingDelayTime in that file is probably pointless, since it will be overwritten by the config file. You should remove that option from the metin2.cfg. Editing __DestroyCacheMap is pointless aswell, since it will only run when you close the client. Also I would put a very very big red exclamation mark here, since you commented out m_pCacheMap.clear(). In theory (ofc it will never happen because the function runs only when you close the client so nobody will give a fck about that cache map anymore) this could lead to huge crashes since in CReferenceObject::Release a deallocation could happen (its possible that it won't, because its possible that at that point something is using that actual file for some reason, so the reference count will still be higher than 1). And after that since you don't clear the cache map, the next time when the system would try to use the cache map, it would receive a corrupt memory address, since we deallocated the object from that address. So anyway if you still want to make sure that nothing will call that function, just put a return to its beginning. About the last edit: I would put an even bigger red exclamation mark there. This requires some further explanation tho, so get ready for it. So first of all, let me talk about memory pools. So as you may know, our processors work better (talking about performance) if the memory addresses are close to each other. Also it works even better, if the affected memory block it needs to read is inside its cache. Also, allocating/deallocating memory runtime is an expensive operation. So long ago programmers came up with an idea: Lets allocate a big chunk of memory when we start our program, so we can put our instances inside it, so the data will be in one place close to each other, and we don't even have to bother with allocation and deallocation. So memory pooling was born. Now that we know this, lets talk about the implementation of CDynamicPool. So as you can see, we have 2 vectors inside it. m_kVct_pkData and m_kVct_pkFree. The first one contains all the ADDRESSES of the given object's instances (even if they are not used at the moment). The second one contains ADDRESSES of those objects that are no longer in use. (As you can see it contains ADDRESSES, so this type of implementation does not solve the problem with the "data in one place" problem, because its possible that we will get an address far far away from the previous one, but its irrelevant right now.) If you take a closer look, you will see new operator, but you won't see delete operator. (This is a possible memory leak factor tho, but since you don't remove those memory addresses from the union of those two vectors, its not the case in reality.) Moreover, if you check the Free function, you will only see that we just simply put an address to the pkFree vector. It means, that the destructor of the given object will not get called. (This could and probably do (in some cases) lead some actual memory leaks, but again, this is not what I want to talk about right now.) Okay, now lets say that we have 2 allocated instances, so we have 2 already-in-use addresses in pkData vector. Lets say that one of them gets "deleted". The Free function will put its address to the pkFree vector. Then, we say that uhhhh ummmmm wait wait, I need a new instance. Okay, we call Alloc. Lets see what will happen: pkFree is not empty, so it will not allocate a new instance, just simply gives the last free address back from pkFree. Looks safe and simple right? Yes, thats the case if you are aware that NO CONSTRUCTOR WILL BE CALLED THERE. Whats the problem with it you may ask... The problem is that we didn't change the content of that instance during this Free and Alloc call. (Sure if we've called some cleanup function outside of the CDynamicCache this is not the case like I said, but then it means you were aware of this problem.) So what you did when you commented out that pMotionModeData->MotionVectorMap.clear(); part was removing this correct cleanup. So what could happen (at least in theory)? Lets say we have a male warrior. This male warrior go away and all the data gets deleted after 4 hours, and you just simply stand still and no other characters appear. The game will remove the unused motions from the CDynamicCache. Then suddenly out of nowhere someone summons a wild dog. It will receive the same exact stuff from the pkFree vector that we just removed. So that wild dog will have 240+ motions loaded instead of 4 or something like that. Sadly we can state that our new wild dog won't run with the male warrior's animation, since in NEW_RegisterMotion that animation will be overwritten, so there will be no visual defects. I'm not sure about the chrmgrRegisterMotionData changes, but probably those don't add much to the final result. My opinion is that changing c_Deleting_Wait_Time to a much higher value was the only thing you did and actually helps in this problem. So basically what you did was: You changed that the unused files don't get deleted over time (or just after 4 hours), which means that in this specific case if you go to somewhere alone, and no other player appears for 4 hours (instead of the original 30 second) and after that someone with other type of character (so you are a warrior and the other player is not a warrior) appears, you will still have the same lag like before. Conclusion: Disregarding the wrong/useless parts, it doesn't solve the main problem. In the gif you shared its clearly visible, that not all the motions load during the loading screen. Example (what you should see) for female assassin (241 motions in total): Because of this, when you login the first time, and you meet a different type of character, you will still have the same lag as before. (The first time I had some doubts in myself tho, so I tested this one to be sure, and I was right, so this is the case.)
    4 points
  3. If only everyone were as friendly as you are, I really thank you for this release beautiful work. Now only a solution against the lagg which occurs when minimizing Metin2 is needed.
    2 points
  4. It's tested on a live server since yesterday. Something was missing from tutorial. Check again.
    2 points
  5. M2 Download Center Download Here ( Internal ) Hello guys.. So much people got problem with this system then i do FULL TuT exclusive for metin2dev All is tested and all works TuT included in all FILES.. New Link: Pass: When you find some bug post it here.. I will try to fix it.. Have Fun //EnZi EDITED: #New Link UPDATE cmd_general.cpp - Added some new code char_battle.cpp - Added some new code ProtoReader.cpp - Added some new code questlua_pc - Repaired code item_proto - Query for navicat Quest added UP LINK UPDATED fixed quest: [Hidden Content]
    1 point
  6. M2 Download Center Download Here ( Part 1 - Internal ) Download Here ( Part 2 - Internal ) This package was created more than 3 years ago. So here u can find a lot of published models, where a lot of them aren't more available for download (dead links). DL models: [Hidden Content] scan virustotal: [Hidden Content] Small update: [Hidden Content] scan virtustotal: [Hidden Content] Dl maps: [Hidden Content] scan virtustotal: [Hidden Content]
    1 point
  7. This should be what you are looking for: [Hidden Content] I dont know who made the system but it's working.
    1 point
  8. Hi there, You shouldn't have problems with vrunner as long as: - The db core don't crash. If it crashes, all the cached items / players will be erased without being saved, so, you'll get a rollback. - The informations cached and shared between the channels are well loaded again so when your channel core crash it doesn't load bad or old informations. See ya !
    1 point
  9. yes, but will create problems. After a week of using it your players will lose items when evolving them. And a vrunner is trying to open channels every second, while my script tryed each 10 minutes and still on longtime use will cause problems. If your server has players will have problems. Only solution it's a laptop with password, something cheap,slime without weight and a phone for hotspot if you fear you are not at home. freebsb sh file #!/bin/sh cd /home/game/channels/db/ && ./db & sleep 600 cd /home/game/ && sh start_cron.sh & sleep 2 echo "Done"
    1 point
  10. When you try to start database and channels with server online after hours of online you will increase the risk of game having crashes with strange errors pointing to things that have nothing wrong. Don't use vrunner and if you have crash cores it's better to fix them.
    1 point
  11. @Dobrescu Sebastian lol man u deserve nobel prize for this. Thanks a lot
    1 point
  12. I'm glad is working for you too. @Syriza i think we can't do much there, windows cuts the resources when a window it's minimized.
    1 point
  13. Thank you very much for this Solution ! it works like a charm for meleys
    1 point
  14. In ConstInfo.py: DONT_REMOVE_LOGIN_ID_PASSWORD_AFTER_WRONG_TRY = 0 Intrologin.py change the function SetPasswordEditLineFocus def SetPasswordEditLineFocus(self): if constInfo.DONT_REMOVE_LOGIN_ID_PASSWORD_AFTER_WRONG_TRY: if self.idEditLine != None: #0000862: [M2EU] 로그인창 팝업 에러: 종료시 먼저 None 설정됨 self.idEditLine.SetText("") self.idEditLine.SetFocus() #0000685: [M2EU] 아이디/비밀번호 유추 가능 버그 수정: 무조건 아이디로 포커스가 가게 만든다 if self.pwdEditLine != None: #0000862: [M2EU] 로그인창 팝업 에러: 종료시 먼저 None 설정됨 self.pwdEditLine.SetText("") else: if self.pwdEditLine != None: self.pwdEditLine.SetFocus()
    1 point
  15. I Love you so much for this i searching a solution for that for Months ! and i think some other Persons here can write somenthing over that too here. hope you will made it public to run metin2 better.. without lags and such stuff.. Edit: omg its running so smooth ingame now i love it working like a charm ?
    1 point
  16. #There was a litle mistake. Topic Updated.
    1 point
  17. If you would pay attention to what Python is trying to message you, you would love it even more ? At line 178 you have OPTION_FOG_ON variable which should be in locale_interface.txt but clearly you are missing it.
    1 point
  18. 1 point
  19. Thank you! It worked now
    1 point
  20. Amm my bad, you actually have to multiply coordinates by 100... I modified source to avoid this so I thought it is like that originally. Your function should look like this: d.new_jump (MAP_INDEX, 4411 * 100, 12282 * 100)
    1 point
  21. And you are the most thankful person i met in this board
    1 point
  22. d.new_jump(map_index, (map_base_x + x_coordinate) * 100, (map_base_y + y_coordinate) * 100) Map base coordinates without 00 at the end.
    1 point
  23. Do it better. Cythonize your lib PYTHON and make this static.
    1 point
  24. M2 Download Center Download Here ( Internal ) Hello guys ! I want to share an old set of weapons whose i changed their gloss. The file contains : Icons Textures Models Before the modification : After the modification :
    1 point
×
×
  • 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.