Jump to content

Nirray

Inactive Member
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Everything posted by Nirray

  1. OnUpdate() is executed only when character is dead for this case so don't worry - but you're right with only binary thing. I've forgot about NotifyDeadMainCharacter. I'm going to update this guide, thanks ?
  2. Hello, there is a common error/bug in Metin2 related to the taskbar and character skill window. This error occurs when the skill has the status of "TOGGLE" and somebody or something killed us. When we are killed the game client still thinks that the skill is active somehow not updating its status (right clicking on slot causes the packet to be sent to the server again). What's even more funny, when we kill our character by command or when we've been shot down at once this problem does not occur ? Here are some screenshots explaining the bug: If you are interested in fixing this error, please follow the instructions below: Clientside: Open UserInterface/PythonPlayerModule.cpp and search: { "ClearSkillDict", playerClearSkillDict, METH_VARARGS }, add below: { "DisableToggleSkill", playerDisableToggleSkill, METH_VARARGS }, scroll down and search for: PyObject * playerClearSkillDict(PyObject * poSelf, PyObject * poArgs) add under: PyObject * playerDisableToggleSkill(PyObject * poSelf, PyObject * poArgs) { int iSlotIndex; if (!PyTuple_GetInteger(poArgs, 0, &iSlotIndex)) return Py_BadArgument(); CPythonPlayer::Instance().Disable_Toggle_Skill(iSlotIndex); return Py_BuildNone(); } Now move on to the UserInterface/PythonPlayer.cpp and search for: void CPythonPlayer::ClearSkillDict() add below: void CPythonPlayer::Disable_Toggle_Skill(DWORD dwSlotIndex) { CInstanceBase * pkInstMain = NEW_GetMainActorPtr(); if (!pkInstMain) return; if (!pkInstMain->IsDead()) return; if (dwSlotIndex >= SKILL_MAX_NUM) return; for (dwSlotIndex; dwSlotIndex <= SKILL_MAX_NUM; ++dwSlotIndex) { if (IsSkillActive(dwSlotIndex)) { m_playerStatus.aSkill[dwSlotIndex].bActive = FALSE; PyCallClassMemberFunc(m_ppyGameWindow, "DeactivateSkillSlot", Py_BuildValue("(i)", dwSlotIndex)); } } } after that UserInterface/PythonPlayer.h search: void ClearSkillDict(); // ľřľîÁö°ĹłŞ ClearGame ÂĘŔ¸·Î Ć÷Ç﵃ ÇÔĽö add: void Disable_Toggle_Skill(DWORD dwSlotIndex); UserInterface/PythonPlayerSkill.cpp Search: void CPythonPlayer::ClickSkillSlot(DWORD dwSlotIndex) and under: if (pSkillData->IsStandingSkill()) { if (pSkillData->IsToggleSkill()) { if (IsSkillActive(dwSlotIndex)) { CInstanceBase * pkInstMain = NEW_GetMainActorPtr(); if (!pkInstMain) return; if (pkInstMain->IsUsingSkill()) return; add new if statement: if (pkInstMain->IsDead()) return; like that: Rebuild solution. Python part: root/uitaskbar.py Search in OnUpdate(self): if app.GetGlobalTime() - self.lastUpdateQuickSlot > 500: add at the end: player.DisableToggleSkill(0) Thanks to @filipw1 idea there's no need to use python part anymore. Back to client source: UserInterface/PythonPlayer.cpp: search: void CPythonPlayer::NotifyDeadMainCharacter() and change void to this: void CPythonPlayer::NotifyDeadMainCharacter() { __ClearAutoAttackTargetActorID(); Disable_Toggle_Skill(0); } Rebuild solution. If you want to execute it from python script: player.DisableToggleSkill(skill_startIndex) Final result: [Hidden Content] This is my way to solve this graphic problem. All suggestions are welcome. Have a nice day ?
  3. import background at the top of the python file
  4. Well, then just leave a game with this"fix" minimized in the city full of players or in a place full of mobs (or any .gr2 non-static models [I'm not counting speedtree engine rendered trees]) and come back here with blackscreen bug. Mini-window means that the directdraw is working even when minimized, still performing (carrying out) background calculations and it's not skipping frames like default metin2 client does (default: leave the game in the full window minimized for a few minutes/hours and you will see a framerate drop or freeze + fog draw distance change, shadow level change, LOD errors, .mse unlocking from cache [showing effects like quest arrow, skill effects etc.*) * I mean catching up since minimizing
  5. Yeah, mistakes... to change from false to true ? It's about ddraw library, granny and the way the system creates windows itself, not just "canRender = bool" thing. Minimized fullscreen client with correct fix: [Hidden Content]
  6. Omg - cool - I'm going to use it right now. My feedback: Would you like to add "granny version" option to select when saving from your granny version converter tool ? Before/After save as (tag):
  7. Warrior lord helmet and armor with correct bones: Download: https://mega.nz/#!KxYQyYiI!vCTAZCETBOhKnLhOcPh-jFt3aGKAlDuDp6yTQRkZ7nw
  8. source\gamelib\map\MapOutdoorLoad.cpp search m_matBuildingTransparent._41 = 0.5f; m_matBuildingTransparent._42 = 0.5f; set both to 0.0f (if you want to keep directx matrix scaling transparent for out of camera sign objects [semi-transparent for performance]) or comment whole section //D3DXMatrixScaling(&m_matBuildingTransparent, 1.0f / ((float)ms_iWidth), -1.0f / ((float)ms_iHeight), 1.0f); //m_matBuildingTransparent._41 = 0.5f; //m_matBuildingTransparent._42 = 0.5f; I do not guarantee that there will be no camera bugs (especially on .gr2 bridge meshes) with "fix": without:
  9. Design Table - Set "item_name" field to character set = "cp1250"->"cp1250_polish_ci" or "utf-8"-> "utf8_polish_ci" (but I recommend the first option) and save Same goes with "command" in table "command_log"
  10. It's totally opposite of what he is requesting to ? I guess he's using game 34k or even older ones - not source 40k, especially after what he wrote @alio0o33 Those topics may be useful to you: Anyway, try to search something about "Metin2 source" etc.
  11. It's because the problem lays also in "bool CGraphicFontTexture::UpdateTexture()" and "CGraphicFontTexture::GetCharacterInfomation" I'm trying to fix it too, but all I was able to do was break font even further than it was before (Verdana: 12 [is fixed at 14] with my pFontTexture draw loop edits) Also changed the way the client draw chars to use user windows formating: No dots + cleartype but weird font-color-background - still working on this ? Anyway, thanks @Vanilla for LOGFONT px->pt solution, it helped me a little
  12. [Bold text]: [Hidden Content] You can "force" client codepage by using "@" sign [Hidden Content] I'm using tahoma in my client and it doesn't have 936 codepage so I've tested it on korean 949 one. Also remember that your locale_game.txt and locale_interface.txt in locale must have chinese encoding
  13. Tahoma codepages: If you want to use chinese characters you have to find a font with chinese code page included in it. Link: 939 codepage [Wikipedia] UI_DEF_FONT_SMALL = "掉葡羹:9" UI_DEF_FONT_LARGE = "掉葡羹:16" UI_DEF_FONT = "掉葡羹:12" from chinese Metin2 client
  14. Nirray

    Weapon

    Cool, may I use your model to create two-handed version?
  15. |cff+hexcolor before text ("ff" means color alpha, so you can make text transparent)
  16. [Hidden Content] How it works: When player is trying to use buffs on npc/enemy then mouse target is automatically set to main character VID (You can't buff npc/enemy anyway from server side + You can't change target while using skills) UserInterface/PythonPlayerSkill.cpp Search: bool CPythonPlayer::__UseSkill(DWORD dwSlotIndex) Scroll down and search for: if (!pkInstTarget) { // ľ÷µĄŔĚĆ®ÇĎ°í.. __ChangeTargetToPickedInstance(); // ´Ů˝Ă ľňľîł˝´Ů. if (pSkillData->IsNeedCorpse()) pkInstTarget=__GetDeadTargetInstancePtr(); else pkInstTarget=__GetAliveTargetInstancePtr(); } Under: if (pkInstTarget) Paste this: if ((pkInstTarget->IsNPC() || pkInstTarget->IsEnemy() || pkInstTarget->IsStone() || pkInstTarget->IsStoneDoor()) && pSkillData->IsOnlyForAlliance()) { DWORD TargetVid = pkInstMain->GetVirtualID(); SetTarget(TargetVid, TRUE); } Should look like this: This is my way to solve the problem?
  17. Unable to open file.: sound/ui/click.wav Add sounds pack to your client ?
  18. Replace: if count > 1: for i in xrange(count): net.SendChatPacket(statusPlusCommand) To: if count > 1: net.SendChatPacket("%s %s" % (statusPlusCommand, count)) My test [without your CMD source edit] If it doesn't work, change second %s to %d because you have integer convert set. [count = int(self.inputDialog.GetText())]
  19. game\src\item.cpp Search: bool CItem::EquipTo(LPCHARACTER ch, BYTE bWearCell) scroll down and look for: // ACCESSORY_REFINE StartAccessorySocketExpireEvent(); // END_OF_ACCESSORY_REFINE Comment it with "//" then search: bool CItem::Unequip() and look for: // ACCESSORY_REFINE StopAccessorySocketExpireEvent(); // END_OF_ACCESSORY_REFINE Comment it with "//" Other way - change function void CItem::StartAccessorySocketExpireEvent() to: void CItem::StartAccessorySocketExpireEvent() { return; } You can also remove it from client python root\uitooltip.py for visual client aspects
  20. LODs are for performance boost for GPU/CPU. Yes you can - mostly of the metin .gr2 models have LOD files which are stored inside model or as separated .gr2 files with lod_01/2/3 at the end of the parent model name. For example: c1-009-hotel.gr2 and c1-009-hotel_lod_01.gr2 Or disable loading LODs in client source for granny .cpp/h files Post edit: \GameLib\ActorInstanceData.cpp void CActorInstance::SetShape(DWORD eShape, float fSpecular) \GameLib\Area.cpp __SetObjectInstance_SetBuilding \GameLib\RaceData.cpp CGraphicThing * CRaceData::GetLODModelThing() \EterGrnLib\ThingInstance.cpp void CGraphicThingInstance::UpdateLODLevel() + \EterGrnLib\LODController.cpp static float LODHEIGHT_ACTOR = 500.0f; static float LODDISTANCE_ACTOR = 5000.0f; static float LODDISTANCE_BUILDING = 25000.0f;
  21. Back to the Future Repair your DB tables [Hidden Content] It used to be normal on those files
×
×
  • 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.