Jump to content

Sneaky

Inactive Member
  • Posts

    10
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Sneaky

  1. vor 13 Stunden schrieb VegaS™:

    (2.5) Questions & Answers specific rules

    • Don't modify your thread (or reply to it) to mark it solved, and not explain the solution to the issue.

    For those who want this, you can do something like: [Not tested]

    • uiToolTip.py
    
    # Search for:
    	def __SetSpecialItemTitle(self):
    		self.AppendTextLine(item.GetItemName(), self.SPECIAL_TITLE_COLOR)
    # Add after:
    	def __GetRarityTitleByAttr(self, attrSlot):
    		attrCount = len([slot for slot in attrSlot if slot[1]])
    
    		if attrCount in range(1, player.ATTRIBUTE_SLOT_NORM_NUM + 1):
    			return localeInfo.TOOLTIP_ITEM_TITLE_COMMON
    		elif attrCount in range(player.ATTRIBUTE_SLOT_NORM_NUM + 1, player.ATTRIBUTE_SLOT_RARE_END + 1):
    			return localeInfo.TOOLTIP_ITEM_TITLE_RARE
    		return None
    
    # Search for:
    				self.__SetSpecialItemTitle()
    # Add before:
    				rarityTitle = self.__GetRarityTitleByAttr(attrSlot)
    				if rarityTitle:
    					self.AppendTextLine(rarityTitle, self.CONDITION_COLOR)
    • locale/uk/locale_game.txt
    
    TOOLTIP_ITEM_TITLE_COMMON	Common
    TOOLTIP_ITEM_TITLE_RARE	Rare

     

     
    I'm sorry for breaking the rules.
    Hey Vegas, Thank you for your solution!
    
  2. hey i try to add rarity in the uitooltip via AddItemData for the attributes. For example, 1 to 5 is common and 6-7 is rare
    I tried So
    Does anyone have a solution?

    greetings
    if player.ATTRIBUTE_SLOT_RARE_START >=1 and player.ATTRIBUTE_SLOT_RARE_START <=5:
        self.AppendTextLine("Common", self.CONDITION_COLOR)

    33arVAV.png

  3. vor 21 Stunden schrieb Johnny69:
    
    // Add this function prototype to public in item.h
    		void		ChangeAttributeValue();
    // Add this function in item_attribute.cpp or item.cpp
    void CItem::ChangeAttributeValue()
    {
    	int attrCount = GetAttributeCount();
    	if(attrCount == 0)
    		return;
    	
    	int iAttributeSet = GetAttributeSetIndex();
    	if (iAttributeSet < 0)
    		return;
    
    	for(int k = 0; k < attrCount; k++)
    	{
    		int attr_idx = GetAttributeType(k);
    		
    		const TItemAttrTable & r = g_map_itemAttr[attr_idx];
    		int nLevel = number(1, r.bMaxLevelBySet[iAttributeSet]);
    		long lVal = r.lValues[MIN(4, nLevel - 1)];
    		
    		if (lVal)
    			SetAttribute(k, attr_idx, lVal);
    	}
    }
    
    // In char_item.cpp just go to the item you want to be the changer and replace:
    item2->ChangeAttribute
    // With
    item2->ChangeAttributeValue();

     

    Thanks duded ?

  4. Peace!
    
    The following question: Is it possible to rewrite the Attr Change / Add function so that the Switcher only switches the values and not equal to Type and Values?
    If the maximum attribute you can have on a weapon (etc), the particular attribute wanted to be able to change only the values through a "switcher".
    My problem is that the general problem of the function is that the types & values are set to (0) and calculated by "int i = 0; i <cnt; ++".
    I would like to let the guys on it so that only the values are changed.
    But if I remove the query, IG does not happen anymore.
    
    For level 1 through 5, ask which bonus level can be used, just "(rand ()% 4) + 1" for random generation.
    
    My snippet currently looks like this.
    Maybe one of the Big Brains has an idea.
    I thank you in advance !!
    sorry for my bad English.. xP
    
    Greetings.
    
    
    Spoiler

    XrKZNMp.png

    oCjg1Eu.png

    
    
    
    • Metin2 Dev 1
×
×
  • 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.