Jump to content

Nirray

Inactive Member
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by Nirray

  1.  

    A slightly different idea than mine that I wrote a long time ago, but the effect is the same 😄 
    Remember to use along with this:
    https://metin2.dev/board/topic/22783-fix-skybox-cloud-clipping/

    Otherwise, sky clouds clipping will be visible when logging in aaaand very annoying 😞 

     

    4 hours ago, Summex said:

    I've had the idea for quite a while to use this rendered background not only at the login but also at the character (or empire) selection. There you could load in the map (or even position) where the character last logged out. Would be a pretty cool feature in my opinion 🙂

    14 minutes ago, FBI said:

    My dear, nice system i like it!

    There is one "bug". You can zoom in & zoom out on login screen.

     

    To fix that, you need to do same thing what "Item Shop" window does - disable mouse scroll when window is opened.

    • Metin2 Dev 2
    • Love 3
  2. M2 Download Center

    This is the hidden content, please
    ( Internal )

    This is the hidden content, please
    ( GitHub )

     

     

    12

    dropimage

     

    About:

     

    Whenever I was playing on any server that had far too many drop items from monsters — I wondered — how am I going to find myself in this pile of scrap? You click on one item and pick up a completely different one, thus littering your inventory. With my solution, your players don't have to worry about it anymore.

     

    As a player:


    Pros:

    • You don't have to worry about items gained by other players;
    • The alphabetical list will allow you to easily find the acquired item;
    • The dynamic list cleans and completes itself on a regular basis;
    • You can still pick up items directly from the floor;
    • You can show and hide the window whenever you want to use it;
    • If the item isn't yours then your player name in ownership color will be red instead of yellow;
    • You do not have to worry that your list will be flooded with items that have been lying on the ground for a long time — only the items you have acquired will go to the list; You can double-click on the name of the item and the character will automatically move towards it with the intention of picking up;
    • You can refresh the list by yourself;
    • You can select an item from the list and pick it up from the ground with one button.

     

    Min:

    • You still need to be close to the item to pick it up — but it's probably fair;
    • Sometime you must click twice on item name because of too far distance (by default).

     

     

    Github repository:

    This is the hidden content, please

    Compatibility: I am curious about your opinions

     

    Have a nice day

    Author@Nirray (Back to the past)

    • Metin2 Dev 20
    • kekw 1
    • Confused 1
    • Good 7
    • Love 1
    • Love 7
  3. 12 hours ago, kaJaMrSimple said:

     

    Hi guys,

    Im using no txt db. I want to change the socket0 value. but txt has no socket0 column. How to change socket0 value?

    My item_proto.txt column names;

     

    
    ITEM번호	ITEM_NAME(K)	ITEM_TYPE	SUB_TYPE	SIZE	ANTI_FLAG	FLAG	ITEM_WEAR	IMMUNE	ìƒì  íŒë§¤ê°€	ìƒì ì—ì„œ ì‚´ ë•Œ	REFINE	REFINESET	MAGIC_PCT	LIMIT_TYPE0	LIMIT_VALUE0	LIMIT_TYPE1	LIMIT_VALUE1	ADDON_TYPE0	ADDON_VALUE0	ADDON_TYPE1	ADDON_VALUE1	ADDON_TYPE2	ADDON_VALUE2	VALUE0	VALUE1	VALUE2	VALUE3	VALUE4	VALUE5	SOCKET0	Specular	SOCKET	ATTU_ADDON

     

     


    121846ex.PNG

    ¿Que?

  4. 6 hours ago, MrQuin said:

    Easy around solution would be to add a new currency that is not used ingame just to use it for viewing the item and call it [Viewing item]?


    There is an easier way than what you suggested ?
    Just pick random number from range 0 to GOLD_MAX (higher number should be more "user-friendly")
    and if price==your_number:
    return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY;

    The rest is just python part with interface (uishop) and so on

    https://metin2.download/picture/FqIC1d611oE87t0128eZi9URw638cFFe/.gif

    I'm not a big fan of adding new solutions when you can use already implemented ones ?

    • Love 1
  5.  

    22 hours ago, Gurgarath said:

    2. Any character being automatically attacked by another character is unable to move, to run away or to attack

     


     This bug is practically caused by clientside
    Rewrite this:

    void CRaceMotionData::SetName(UINT eName)

    In RaceMotionData.cpp

    and

    bool CActorInstance::__CanPushDestActor(CActorInstance& rkActorDst)

    +
     

    void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill, BOOL isSendPacket)


    In ActorInstanceBattle.cpp
    Especially for those animations that are used in flying after external force and after damage-hit.

    ➡️ https://metin2.download/picture/2RgNs1N831t4nv36JT1SOA8B0R2ViSeG/.gif

    After fix you are able to set free even from this:
    ➡️ https://metin2.download/picture/hM8f8qTnimgg4n7yA1DRA5nN44zYCIxv/.gif

    • Love 3
  6. 8 hours ago, CristianDragan said:

     

    Nothing has changed, unfortunately. Thanks for the reply.

     

    I solved it like this:

    self.AppendTextLine(localeInfo.TOOLTIP_AUTO_POTION_REST + "%d" % (100.00 - ((usedAmount/totalAmount) * 100.00)), self.POSITIVE_COLOR)

     

    spacer.png

     

    Do you or anybody know to make it like on official servers? Like 99,99.

    Thanks.


    Change

    %d

    to 

    %.2f%%

     

    • Love 1
  7. 16 minutes ago, Mafuyu said:

    is it just for me or does armor shining is now very fast? like 11299 the normal shining effect is very fast.

    here is what i mean

    spacer.png


    UserInterface\PythonApplication.cpp
    Search

    double g_specularSpd=0.007f;

    Change to:

    double g_specularSpd=0.00017f;

     

    • Love 1
  8. 15 minutes ago, xHeaven said:

     

    This is my code for the clouds.

    DWORD dwCurTime = CTimer::Instance().GetCurrentMillisecond(); m_fCloudPositionU += m_fCloudScrollSpeedU * (float)( dwCurTime - m_dwlastTime ) * 0.001f; if (m_fCloudPositionU >= 1.0f) m_fCloudPositionU = 0.0f; m_fCloudPositionV += m_fCloudScrollSpeedV * (float)( dwCurTime - m_dwlastTime ) * 0.001f; if (m_fCloudPositionV >= 1.0f) m_fCloudPositionV = 0.0f; m_dwlastTime = dwCurTime;

    
    DWORD dwCurTime = CTimer::Instance().GetCurrentMillisecond();
    
    m_fCloudPositionU += m_fCloudScrollSpeedU * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
    if (m_fCloudPositionU >= 1.0f)
    	m_fCloudPositionU = 0.0f;
    
    m_fCloudPositionV += m_fCloudScrollSpeedV * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
    if (m_fCloudPositionV >= 1.0f)
    	m_fCloudPositionV = 0.0f;
    
    m_dwlastTime = dwCurTime;

     

     

    • Love 3
  9. 3 hours ago, HITRON said:

     

    You can use pc.get_wear(20) example for Costume Hair (20) is the equip cell for the specific item etc.


     

    local c_Equipment_Body		= 0;	
    local c_Equipment_Head		= 1;
    local c_Equipment_Shoes		= 2;
    local c_Equipment_Wrist		= 3;
    local c_Equipment_Weapon	= 4;
    local c_Equipment_Neck		= 5;
    local c_Equipment_Ear		= 6;
    local c_Equipment_Unique1	= 7;
    local c_Equipment_Unique2	= 8;
    local c_Equipment_Arrow		= 9;
    local c_Equipment_Shield	= 10;

    example:

    if (pc.get_wear(c_Equipment_Wrist) == 14009) then -- Wooden Bracelet +9

     

  10. self.RetryButton.SetEvent(ui.__mem_func__(self.RetryButton))
    self.RecvButton.SetEvent(ui.__mem_func__(self.RecvButton))
    https://docs.python.org/2/reference/datamodel.html

    Change function names to something like def OnClickRetryButton and def OnClickRecvButton, they cannot be the same like button names

    For example:

    self.serverSelectButton.SetEvent(ui.__mem_func__(self.serverSelectButton))

     Instead of:

    self.serverSelectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectServerButton))


    Is going to throw same AttributeError which is stated as:
     

    0323 01:00:01004 ::   File "introLogin.py", line 714, in __LoadScript
    
    0323 01:00:01005 ::   File "ui.py", line 82, in __init__
    
    0323 01:00:01005 :: AttributeError
    0323 01:00:01005 :: : 
    0323 01:00:01005 :: 'Button' object has no attribute 'im_func'
    0323 01:00:01005 :: 

     

    • Love 1
  11. 2 minutes ago, Sendalone said:

    this is my atlasinfo

     

    startovni_mapa    444400    444400    2    3
    aronix_smallpurpletown    735500    1125000    3    3
    aronix_smallgreentown    525500    725500    2    3

     

    at coordinates 0,0 of maps i have BLOCK Zone, and "00" too


    Change BasePosition then to something like (clientside and serverside):

    startovni_mapa    409600    409600    2    3
    aronix_smallpurpletown    716800    1024000    3    3
    aronix_smallgreentown    512000    716800    2    3

    (I'm not sure if they're not colliding with each other, you need to check it by yourself)
     

    • Confused 1
  12. 1 hour ago, Sendalone said:

    Ehm, i must create server_attr on WE, with basic coord x 0 anyd y 0 ? 

    1. i see on syserr of WE, but in syserr is nothing about coord

    2. Try - I generate new server_attr wirh basic coord 0,0, but no changes (bug stays)

    3. Try - I again generate shadows using F6, klick on reset attr_map, and Save server_attr (bug stays)

     

    Can help me generate server_attr with other program ? Nope, i test it 

     

    Thx for help, what now ?


    https://metin2.download/picture/XXS5l10EY1479LBMmUKVgS2rIxInvWR9/.gif

    Remember, your map location in serverfiles and clientside must be (x*1024 + "00" && y*1024+"00") %2 == 0
    7355/1024 ~= 7,1826171875
    1125/1024 ~=1,0986328125
    Change your atlasinfo.txt, generate new server_attr with blocked cords x=0, y=0.
    BLOCK on those coordinates will always teleport player to coordinates in town.txt map folder file after player warp.

  13. 3 hours ago, Kafa said:

    Hey guys, i really need a function to  get the item name from vnum, can someone help me? Official added it here is how they call it: item.GetItemNameByVnum(changelookvnum)


    PythonItemModule.cpp

    PyObject * itemGetItemNameByVnum(PyObject * poSelf, PyObject * poArgs)
    {
    	int iIndex;
    	if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
    		return Py_BadArgument();
    
    	if (!CItemManager::Instance().SelectItemData(iIndex))
    	{
    		TraceError("Cannot find item by %d", iIndex);
    		return Py_BuildNone(); // or
    		// CItemManager::Instance().SelectItemData(60001);
    	}
    
    	CItemData * pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
    	if (!pItemData)
    		return Py_BuildException("no selected item data");
    
    	return Py_BuildValue("s", pItemData->GetName());
    }

    and 

    { "GetItemNameByVnum",					itemGetItemNameByVnum,						METH_VARARGS },

     

    • Love 2
  14. root/uitooltip.py

    Find:

        def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum)

    Replace whole function:
     

    Spoiler
    
    	def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):
    		ACCESSORY_SOCKET_MAX_SIZE = 4
    
    		cur=min(metinSlot[0], ACCESSORY_SOCKET_MAX_SIZE)
    		end=min(metinSlot[1], ACCESSORY_SOCKET_MAX_SIZE)
    
    		affectType1, affectValue1 = item.GetAffect(0)
    		affectList1=[0, max(1, affectValue1*10/100), max(2, affectValue1*20/100), max(3, affectValue1*40/100), max(4, affectValue1*60/100)]
    
    		affectType2, affectValue2 = item.GetAffect(1)
    		affectList2=[0, max(1, affectValue2*10/100), max(2, affectValue2*20/100), max(3, affectValue2*40/100), max(4, affectValue1*60/100)]
    
    		affectType3, affectValue3 = item.GetAffect(2)
    		affectList3=[0, max(1, affectValue3*10/100), max(2, affectValue3*20/100), max(3, affectValue3*40/100), max(4, affectValue1*60/100)]
    
    
    		mtrlPos=0
    		mtrlList=[mtrlVnum]*cur+[player.METIN_SOCKET_TYPE_SILVER]*(end-cur)
    		for mtrl in mtrlList:
    			affectString1 = self.__GetAffectString(affectType1, affectList1[mtrlPos+1]-affectList1[mtrlPos])		  
    			affectString2 = self.__GetAffectString(affectType2, affectList2[mtrlPos+1]-affectList2[mtrlPos])
    			affectString3 = self.__GetAffectString(affectType3, affectList3[mtrlPos+1]-affectList3[mtrlPos])		  
    
    			leftTime = 0
    			if cur == mtrlPos+1:
    				leftTime=metinSlot[2]
    
    			self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2 ,affectString3, leftTime)
    			mtrlPos+=1

     

    Then search:
     

    	def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", custumAffectString3="",leftTime=0):

    And also replace:
     

    Spoiler
    
    def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", custumAffectString3="",leftTime=0):
    
    		slotType = self.GetMetinSocketType(metinSlotData)
    		itemIndex = self.GetMetinItemIndex(metinSlotData)
    
    		if 0 == slotType:
    			return
    
    		self.AppendSpace(5)
    
    		slotImage = ui.ImageBox()
    		slotImage.SetParent(self)
    		slotImage.Show()
    		
    		## Name
    		nameTextLine = ui.TextLine()
    		nameTextLine.SetParent(self)
    		nameTextLine.SetFontName(self.defFontName)
    		nameTextLine.SetPackedFontColor(self.NORMAL_COLOR)
    		nameTextLine.SetOutline()
    		nameTextLine.SetFeather()
    		nameTextLine.Show()
    
    		self.childrenList.append(nameTextLine)
    
    		if player.METIN_SOCKET_TYPE_SILVER == slotType:
    			slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub")
    		elif player.METIN_SOCKET_TYPE_GOLD == slotType:
    			slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub")
    
    		self.childrenList.append(slotImage)
    
    		if localeInfo.IsARABIC():
    			slotImage.SetPosition(self.toolTipWidth - slotImage.GetWidth() - 9, self.toolTipHeight-1)
    			nameTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 2)
    		else:
    			slotImage.SetPosition(9, self.toolTipHeight-1)
    			nameTextLine.SetPosition(50, self.toolTipHeight + 2)
    
    		metinImage = ui.ImageBox()
    		metinImage.SetParent(self)
    		metinImage.Show()
    		self.childrenList.append(metinImage)
    
    		if itemIndex:
    
    			item.SelectItem(itemIndex)
    
    			## Image
    			try:
    				metinImage.LoadImage(item.GetIconImageFileName())
    			except:
    				dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" %
    					(itemIndex, item.GetIconImageFileName())
    				)
    
    			nameTextLine.SetText(item.GetItemName())
    		   
    			## Affect
    			affectTextLine = ui.TextLine()
    			affectTextLine.SetParent(self)
    			affectTextLine.SetFontName(self.defFontName)
    			affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    			affectTextLine.SetOutline()
    			affectTextLine.SetFeather()
    			affectTextLine.Show()
    			   
    			if localeInfo.IsARABIC():
    				metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight)
    				affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2)
    			else:
    				metinImage.SetPosition(10, self.toolTipHeight)
    				affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2)
    
    			if custumAffectString:
    				affectTextLine.SetText(custumAffectString)
    			elif itemIndex!=constInfo.ERROR_METIN_STONE:
    				affectType, affectValue = item.GetAffect(0)
    				affectString = self.__GetAffectString(affectType, affectValue)
    				if affectString:
    					affectTextLine.SetText(affectString)
    			else:
    				affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT)
    		   
    			self.childrenList.append(affectTextLine)
    
    			if custumAffectString2:
    				affectTextLine = ui.TextLine()
    				affectTextLine.SetParent(self)
    				affectTextLine.SetFontName(self.defFontName)
    				affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    				affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
    				affectTextLine.SetOutline()
    				affectTextLine.SetFeather()
    				affectTextLine.Show()
    				affectTextLine.SetText(custumAffectString2)
    				self.childrenList.append(affectTextLine)
    				self.toolTipHeight += 16 + 2
    
    			if custumAffectString3:
    				affectTextLine = ui.TextLine()
    				affectTextLine.SetParent(self)
    				affectTextLine.SetFontName(self.defFontName)
    				affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    				affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
    				affectTextLine.SetOutline()
    				affectTextLine.SetFeather()
    				affectTextLine.Show()
    				affectTextLine.SetText(custumAffectString3)
    				self.childrenList.append(affectTextLine)
    				self.toolTipHeight += 16 + 2
    
    			if 0 != leftTime:
    				timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftTime))
    
    				timeTextLine = ui.TextLine()
    				timeTextLine.SetParent(self)
    				timeTextLine.SetFontName(self.defFontName)
    				timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
    				timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
    				timeTextLine.SetOutline()
    				timeTextLine.SetFeather()
    				timeTextLine.Show()
    				timeTextLine.SetText(timeText)
    				self.childrenList.append(timeTextLine)
    				self.toolTipHeight += 16 + 2
    
    		else:
    			nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY)
    
    		self.toolTipHeight += 45
    		self.ResizeToolTip()

     


    Should work now ?

    • Love 1
  15. Hello DEVs 🥰
    I understand that most people use cloudless skyboxes in these times, but there is a graphic glitch (usually when the player teleports/dragging a game window) with "jumping" clouds.


    ▶️[Preview with glitch - slow cloud speed]

    This is very annoying with fast moving clouds:
    ▶️[Preview with glitch - fast cloud speed]
    and warping:
    ▶️[Preview with glitch - warping]

    Fix:
    Client source: \EterLib\SkyBox.cpp

    void CSkyBox::RenderCloud()

    replace whole:

    	DWORD dwCurTime = CTimer::Instance().GetCurrentMillisecond();
    	
    	m_fCloudPositionU += m_fCloudScrollSpeedU * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
    	if (m_fCloudPositionU >= 1.0f)
    		m_fCloudPositionU = 0.0f;
    	
    	m_fCloudPositionV += m_fCloudScrollSpeedV * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
    	if (m_fCloudPositionV >= 1.0f)
    		m_fCloudPositionV = 0.0f;
    	
    	m_dwlastTime = dwCurTime;

    with:

    	if (m_fCloudPositionU >= 1.0f)
    		m_fCloudPositionU = 0.0f;
    	
    	
    	if (m_fCloudPositionV >= 1.0f)
    		m_fCloudPositionV = 0.0f;
    	m_fCloudPositionU += m_fCloudScrollSpeedU  * 0.030f;
    	m_fCloudPositionV += m_fCloudScrollSpeedV *  0.030f;

    like that:
    code.png

    > * 0.030f is optimal
    I have no idea why they decided to use ms timer for scrolling clouds in the rendering function that already has own clock and frameskip settings (now it just scales with game fps counter).

    With fix (when dragging client window)
    ▶️[Preview without glitch - slow cloud speed]

    ▶️[Preview without glitch - fast cloud speed]
    Warping:
    ▶️[Preview without glitch - warp]

    Have a nice day ❤️

    • Metin2 Dev 16
    • Think 1
    • Lmao 1
    • Good 4
    • Love 25
×
×
  • 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.