Jump to content

Artvr3

Inactive Member
  • Posts

    12
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Artvr3

  1.  

    InstanceBase.cpp

     

    void CInstanceBase::Render()
    {
    	if (!__CanRender())
    		return;
    
    	++ms_dwRenderCounter;
    
    	m_kHorse.Render();
    	m_GraphicThingInstance.Render();	
    
        //Try this code to hide all effects even DustGap	<<<---------
    	CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance();
    
    	for (auto ptr = rkChrMgr.CharacterInstanceBegin(); ptr != rkChrMgr.CharacterInstanceEnd(); ++ptr)
    	{
    		CInstanceBase* pkInstEach = *ptr;
    
    		if (pkInstEach)
    		{
    			if (pkInstEach->IsAffect(AFFECT_EUNHYEONG) || pkInstEach->IsAffect(AFFECT_INVISIBILITY))
    			{
    				if (CPythonPlayer::Instance().IsMainCharacterIndex(pkInstEach->GetVirtualID()))
    					continue;
    
    				pkInstEach->m_GraphicThingInstance.HideAllAttachingEffect();
    			}
    		}
    	}

     

  2. @EnKor this code will solve the problems 
     

    		#Cannot find item by 'xxx'
    		if item.GetItemType() != item.ITEM_TYPE_ARMOR and item.GetItemType() != item.ITEM_TYPE_WEAPON:
    			return

    @avertusssI have adapted the code to the font size , good for those who use dynamic font
     

    Preview:  https://metin2.download/video/7PY3NxZw6WpdkmH72T8q5Q1SyjCLkCO8/.mp4


    here is the complete code

    Spoiler
    	def __CalculateToolTipWidth(self):
    		if item.GetItemType() != item.ITEM_TYPE_ARMOR and item.GetItemType() != item.ITEM_TYPE_WEAPON:
    			return
    
    		affectTextLineLenList = []
    		metinSocket = self.metinSlot
    		
    		if metinSocket:
    			for socketIndex in metinSocket:
    				if socketIndex:
    					item.SelectItem(socketIndex)
    
    					affectType, affectValue = item.GetAffect(0)
    					affectString = self.__GetAffectString(affectType, affectValue)					
    					if affectString:
    						affectTextLineLenList.append(len(affectString))
    	
    			if self.itemVnum:
    				item.SelectItem(self.itemVnum)
    			self.metinSlot = None
    
    		if self.toolTipWidth == self.TOOL_TIP_WIDTH:
    			if affectTextLineLenList:
    				FontSize = int(''.join(filter(str.isdigit, localeInfo.UI_DEF_FONT)))	#Tested on Tahoma font
    				if FontSize <= 12:
    					self.toolTipWidth += max(affectTextLineLenList) + 25	# the gaps can be adjusted by yourself
    				elif FontSize <= 14:
    					self.toolTipWidth += max(affectTextLineLenList) + 25 + FontSize*2.5
    				elif FontSize <= 16:
    					self.toolTipWidth += max(affectTextLineLenList) + 25 + FontSize*3
    				elif FontSize == 17:
    					self.toolTipWidth += max(affectTextLineLenList) + 25 + FontSize*4
    				elif FontSize == 18:
    					self.toolTipWidth += max(affectTextLineLenList) + 25 + FontSize*4.5
    				else:
    					self.toolTipWidth += max(affectTextLineLenList) + 25 + FontSize*8
    
    		self.AlignTextLineHorizonalCenter()

     

     

    I also shares a modification for resize a ToolTip/SkillToolTip  but it is not perfect and may have errors
    if you want to use it go ahead , this is done quickly to check the effect


    Previewhttps://metin2.download/video/OO2cIBUk0K1Q1bidKF49BvTONh8atFJh/.mp4

    Spoiler
    #found 
    	def AppendTextLine(self, text, color = FONT_COLOR, centerAlign = TRUE):
    
    #change it
    
    	def AppendTextLine(self, text, color = FONT_COLOR, centerAlign = TRUE):
    		textLine = ui.TextLine()
    		textLine.SetParent(self)
    		textLine.SetFontName(self.defFontName)
    		textLine.SetPackedFontColor(color)
    		textLine.SetText(text)
    		textLine.SetOutline()
    		textLine.SetFeather(FALSE)
    		textLine.Show()
    
    		if centerAlign:
    			textLine.SetPosition(self.toolTipWidth/2, self.toolTipHeight)
    			textLine.SetHorizontalAlignCenter()
    		else:
    			textLine.SetPosition(10, self.toolTipHeight)
    
    		self.childrenList.append(textLine)
    
    		(textWidth, textHeight)=textLine.GetTextSize()
    
    		textWidth += 20
    
    		if self.toolTipWidth < textWidth:
    			self.toolTipWidth = textWidth
    
    		self.toolTipHeight += self.TEXT_LINE_HEIGHT
    		self.AlignTextLineHorizonalCenter()
    		return textLine
          
    #if you use:  self.AppendTextLine("[Vnum: %d]"
    
    # Search @ class ItemToolTip @ def AddItemData
    		if not item.GetItemDescription():
    			self.__CalculateToolTipWidth()
    
    # Add above
    		if chr.IsGameMaster(player.GetMainCharacterIndex()):
    			self.AppendTextLine("[Vnum: %d]" % itemVnum, ToolTip.SPECIAL_TITLE_COLOR)

     

     

    • Good 2
  3. On 9/7/2022 at 11:52 AM, Tuckii said:

    anyone having something like this?

    spacer.png

    Check that you have the same case-sensitive " initplayersettingsmodule " .

    UserInterface.cpp / StdAfx.h / PythonPlayerSettingsModule.cpp

  4. V1.

    https://metin2.download/video/2dFazlnccNIV2vgPcOeeYsTR4l9XAyBn/.mp4

    Spoiler

    First open IntroCreate.py

     

    Find:

    SLOT_COUNT	= 4

    Change to:

    SLOT_COUNT	= 2

     

    Find:

    		self.__MakeCharacter(0, 0, playerSettingModule.RACE_WARRIOR_M)
    		self.__MakeCharacter(0, 1, playerSettingModule.RACE_ASSASSIN_M)
    		self.__MakeCharacter(0, 2, playerSettingModule.RACE_SURA_M)
    		self.__MakeCharacter(0, 3, playerSettingModule.RACE_SHAMAN_M)
    
    		self.__MakeCharacter(1, 0, playerSettingModule.RACE_WARRIOR_W)
    		self.__MakeCharacter(1, 1, playerSettingModule.RACE_ASSASSIN_W)
    		self.__MakeCharacter(1, 2, playerSettingModule.RACE_SURA_W)
    		self.__MakeCharacter(1, 3, playerSettingModule.RACE_SHAMAN_W)
    
    		self.__SelectGender(app.GetRandom(MAN, WOMAN))
    		self.__SelectShape(0)
    		self.__SelectSlot(app.GetRandom(0, 3))

    Change to:

    		self.__MakeCharacter(0, 0, playerSettingModule.RACE_WARRIOR_M)
    		self.__MakeCharacter(0, 1, playerSettingModule.RACE_SURA_M)
    
    		self.__MakeCharacter(1, 0, playerSettingModule.RACE_ASSASSIN_W)
    		self.__MakeCharacter(1, 1, playerSettingModule.RACE_SHAMAN_W)
    
    		self.__SelectGender(app.GetRandom(MAN, WOMAN))
    		self.__SelectShape(0)
    		self.__SelectSlot(app.GetRandom(0, 2))

     

     

    V2.

    https://metin2.download/video/aE3L9g5Z5eo3LhW2acaH4764lWG7Iv0Q/.mp4

    Spoiler

    First open IntroCreate.py

    Find and remove or comment:

    			self.genderButtonList = []
    			self.genderButtonList.append(getChild("gender_button_01"))
    			self.genderButtonList.append(getChild("gender_button_02"))
    
    
    			self.genderButtonList[0].SetEvent(ui.__mem_func__(self.__SelectGender), MAN)
    			self.genderButtonList[1].SetEvent(ui.__mem_func__(self.__SelectGender), WOMAN)

    Find:

    		self.__MakeCharacter(0, 0, playerSettingModule.RACE_WARRIOR_M)
    		self.__MakeCharacter(0, 1, playerSettingModule.RACE_ASSASSIN_M)
    		self.__MakeCharacter(0, 2, playerSettingModule.RACE_SURA_M)
    		self.__MakeCharacter(0, 3, playerSettingModule.RACE_SHAMAN_M)
    
    		self.__MakeCharacter(1, 0, playerSettingModule.RACE_WARRIOR_W)
    		self.__MakeCharacter(1, 1, playerSettingModule.RACE_ASSASSIN_W)
    		self.__MakeCharacter(1, 2, playerSettingModule.RACE_SURA_W)
    		self.__MakeCharacter(1, 3, playerSettingModule.RACE_SHAMAN_W)
    
    		self.__SelectGender(app.GetRandom(MAN, WOMAN))
    		self.__SelectShape(0)
    		self.__SelectSlot(app.GetRandom(0, 3))

    Change to:

    		self.__MakeCharacter(0, 0, playerSettingModule.RACE_WARRIOR_M)
    		self.__MakeCharacter(0, 2, playerSettingModule.RACE_SURA_M)
    
    		self.__MakeCharacter(0, 1, playerSettingModule.RACE_ASSASSIN_W)
    		self.__MakeCharacter(0, 3, playerSettingModule.RACE_SHAMAN_W)
    
    		self.__SelectShape(0)
    		self.__SelectSlot(app.GetRandom(0, 3))

    Find and remove or comment: in  def Close(self):

    		self.genderButtonList = []

    Find and add on end file in def __MakeCharacter(self, page, slot, race):

    		for i in xrange(SLOT_COUNT):
    			chr.SelectInstance(self.__GetSlotChrID(0, i))
    			chr.Show()

    Find and remove or comment whole code: in  def __SelectGender(self, gender):

    	def __SelectGender(self, gender):		
    		for button in self.genderButtonList:
    			button.SetUp()
    
    		self.genderButtonList[gender].Down()
    
    		self.gender = gender
    
    		if gender == MAN:
    			for i in xrange(SLOT_COUNT):
    				chr.SelectInstance(self.__GetSlotChrID(0, i))
    				chr.Show()
    			for i in xrange(SLOT_COUNT):
    				chr.SelectInstance(self.__GetSlotChrID(1, i))
    				chr.Hide()
    		else:
    			for i in xrange(SLOT_COUNT):
    				chr.SelectInstance(self.__GetSlotChrID(0, i))
    				chr.Hide()
    			for i in xrange(SLOT_COUNT):
    				chr.SelectInstance(self.__GetSlotChrID(1, i))
    				chr.Show()	

    Find and remove or comment code: in def OnKeyDown(self, key):

    		if 59 == key:
    			self.__SelectGender(MAN_PAGE)
    		if 60 == key:
    			self.__SelectGender(WOMAN_PAGE)

     

    Now open uiscript/createcharacterwindow.py

     

    Find and remove or comment:

    				{
    					"name" : "character_gender",
    					"type" : "text",
    
    					"x" : 43,
    					"y" : 247,
    
    					"text" : uiScriptlocale.CREATE_SEX,
    
    					"text_horizontal_align" : "center",
    				},
    				{
    					"name" : "gender_button_01",
    					"type" : "radio_button",
    
    					"x" : 79,
    					"y" : 247,
    
    					"text" : uiScriptlocale.CREATE_MAN,
    
    					"default_image" : ROOT_PATH + "Middle_Button_01.sub",
    					"over_image"	: ROOT_PATH + "Middle_Button_02.sub",
    					"down_image"	: ROOT_PATH + "Middle_Button_03.sub",
    				},
    				{
    					"name" : "gender_button_02",
    					"type" : "radio_button",
    
    					"x" : 139,
    					"y" : 247,
    
    					"text" : uiScriptlocale.CREATE_WOMAN,
    
    					"default_image" : ROOT_PATH + "Middle_Button_01.sub",
    					"over_image"	: ROOT_PATH + "Middle_Button_02.sub",
    					"down_image"	: ROOT_PATH + "Middle_Button_03.sub",
    				},

     

     

  5.     

    @Creo
    my previous message was for the user @eeevil123 bcs I have some problem with that bracket.

    You should check the files  InstanceBase.h and just double check all.

    #ifdef ENABLE_SHINING_SYSTEM
    		//2-Dimensions for Left & Right sided effects
    		DWORD					m_weaponShiningEffects[2][CItemData::ITEM_SHINING_MAX_COUNT];
    		DWORD					m_armorShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT];
    #endif


    Also core function is in instanceBase.cpp  you should focus on this file to find the problem

    					//Check for double sided weapons or fan which is attached on both sides when mounted.
    #ifdef ENABLE_WOLFMAN
    					bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN) || bSubType == CItemData::WEAPON_CLAW;
    #else
    					bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN);
    #endif
    					if (twoSidedWeapon)
    					{
    						__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT");
    					}
    					__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON");


    I use the same system and works perfectly fine after a few changes because I had to adjust it to my files

    https://metin2.download/picture/3MY406p4yQ8bdK65bxFO0LDM3F41dE7H/.gifv
     

    • Metin2 Dev 7
    • Not Good 1
    • Think 1
    • Good 4
    • Love 4
    • Love 1
  6. 16 hours ago, ASIKOO said:

     

    If you have used the archive on Metin2 Download, it's probably (not yet) up to date.

    The code on the GitHub is working, tested, and trusted.

    I always try to use GitHub if it is available . 

     

    spacer.png

     

  7. after adding the system -  dynamic weather I have some problem with client when I do 1 login everything is fine but when I do teleport then client crash
    and also is snowing but textures the same. 

    ErrorLog

    
    0x1e11621c	C:\Users\XxX\Desktop\test\python27.dll
    0x0055b0f8	C:\Users\XxX\Desktop\test\Metin2- TEST.exe
    0x760cfa29	C:\Windows\System32\KERNEL32.DLL
    0x77207c7e	C:\Windows\SYSTEM32\ntdll.dll
    0x77207c4e	C:\Windows\SYSTEM32\ntdll.dll

     

  8. 21 minutes ago, Mali61 said:

     

    
    OXEventStatus::OXEVENT_OPEN
    OXEventStatus::OXEVENT_FINISH

    Replace like this

    Thank You Mali . 

    for others who will have same problem: Change  COXEventManager::instance().SetStatus(OXEVENT_OPEN);  >>  OXEventStatus::OXEVENT_OPEN; 

  9. Version of Files Ephelion2

    Hi 

     

    1. Description of the problem / Question :

    I had a problem with cryptopp but I solved it

    then I installed OpenSSL  (pkg install openssl ) 

    now I have a problem that I can't solve  (look picture) 

     

    game Makefile : https://pastebin.com/nZA1G62L

     

    2. Screenshots 

    https://metin2.download/picture/n4SV77tP6cEos45g4WG5V5w5ZazqSRn0/.png

     

    Thanks, Sincerly,
    Artvr3

     

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