Jump to content

Debloat

Member
  • Posts

    108
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Debloat

  1. 15 hours ago, Vaynz said:

    Debug and is simple.

    Marty tutorial 

    This is the hidden content, please
    .

    Good luck !

    Oh sir thank you so much! So this is the bugged part. However, this doesn't seem easy to understand to me... How can I trace this error in the actual code?

    spacer.png

     

    P.s nevermind I applied the next step and it worked.

    • Good 1
    • Love 1
  2. I have installed Mali's official inventory expansion and the system is functional. However, the inv expansion item can only be moved on the top row, can't go any down. And the amount number is above the item instead of below the item as it should be. What might cause that? Other items move fine and the numbers are in the right place.

    Since there's no syserr, I don't know which file to share, if you have an idea, let me know and I will share that file with you.

    spacer.png

     

  3. Hi Mali! There might be an issue in the code. I'm using your latest source update "c++2b" and I can't compile "exchange.cpp"

    spacer.png

     

    Compile error in FreeBSD:

    exchange.cpp:303:83: error: implicit instantiation of undefined template 'std::array<std::unique_ptr<CGrid>, 4>'
            std::array<std::unique_ptr<CGrid>, static_cast<const int>(INVENTORY_PAGE_COUNT)> s_grid;
    
            ^
    /usr/include/c++/v1/__tuple:219:64: note: template is declared here
    template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;

     

    P.s solution:

    #include <array>

    Thank you for all the care Mali ❤️❤️ 

    • Love 2
  4. Hi all, wish you all a great day. I have installed ShopEX Renewal by Mali and I would like to ask some silly questions. As you can see in the screenshot the item picture is not centered. Why could that be?

    Also I would like to edit the tooltip in a way that everything show up in a single line like on Aeldra. How may I do that.

    How it is now:

    spacer.png

     

    How I want it to be:

    spacer.png

     

    My uitooltip for ShopEX

    	if app.ENABLE_RENEWAL_SHOPEX:
    		def SetShopItemByShopEx(self, slotIndex, type):
    			itemVnum = shop.GetItemID(slotIndex)
    			PriceVnum = shop.GetItemPriceVnum(slotIndex)
    			if itemVnum == 0 or (PriceVnum == 0 and type == shop.SHOPEX_ITEM):
    				return
    			price = shop.GetItemPrice(slotIndex)
    			self.ClearToolTip()
    			self.isShopItem = True
    			metinSlot = []
    			for i in xrange(player.METIN_SOCKET_MAX_NUM):
    				metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
    			attrSlot = []
    			for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
    				attrSlot.append(shop.GetItemAttribute(slotIndex, i))
    			self.AddItemData(itemVnum, metinSlot, attrSlot)
    			self.AppendSpace(5)
    			if type == shop.SHOPEX_ITEM:
    				self.AddSHOPEXItem(PriceVnum, price)
    			else:
    				self.AppendTextLine(localeInfo.TOOLTIP_BUYPRICE  % (localeInfo.NumberToShopEXP(price)), self.GetPriceColor(price))
    
    		def AddSHOPEXItem(self, itemVnum, price):
    			self.AppendTextLine(localeInfo.SHOPEX_PRICE)
    			item.SelectItem(itemVnum)
    			name = "%dx %s" % (price, item.GetItemName())
    			self.AutoAppendTextLine(name, self.NORMAL_COLOR)
    			itemImage = ui.ImageBox()
    			itemImage.SetParent(self)
    			itemImage.Show()			
    			itemImage.LoadImage(item.GetIconImageFileName())
    			itemImage.SetPosition(75, self.toolTipHeight)
    			self.toolTipHeight += itemImage.GetHeight() - 10
    			self.childrenList.append(itemImage)
    			self.ResizeToolTip()

     

  5. Hi Mali, thank you for the awesome release! I have tested the system and its working great. Just one thing that seems off is that when I click the clear button in debug mode, debug window spams "CGraphicTextInstance::Update - ã¨ã«░í ╝│┴ñÁÃ┴÷ ¥╩¥Ê¢└┤¤┤┘" endlessly until I type something again. Is that okay?
     

    And I have edited the clear 1 png to make add the missing detail

    Before: spacer.png

    After: spacer.png

    Download

    • Metin2 Dev 6
    • Cry 1
    • Love 3
  6. Hi everyone, wish you all a great day.
    I upgraded my source code to Clang 14 / C++2b following Mali's guide. With the new Clang / c++ version, a lot of warnings have emerged while building the game and db. And I am here to ask your help because I don't know how to code and mr. google didn't help at all ?
     

    These are the new warnings that came with the new Clang / c++ while building game:

    -Wdeprecated-enum-enum-conversion
    -Winvalid-source-encoding
    -Wunused-private-field
    -Wambiguous-reversed-operator
    -Wmisleading-indentation
    -Wunused-const-variable
    -W#pragma-messages
    -Wdeprecated
    -Wdeprecated-anon-enum-enum-conversion

    These are the new warnings that came with the new Clang / c++ while building db:

    -Winvalid-source-encoding
    -Wunused-const-variable
    -Wtautological-pointer-compare
    -Wdeprecated-enum-enum-conversion
    -Wunused-private-field

    I had to suppress -Winvalid-source-encoding warnings since they were literally spamming on the console. Every single file with Korean characters throw this error now. I tried to change the encodings of those files to UTF-8 from EUC-KR, and it really got rid of the warnings, however, after that the game didn't start. It gave an error like:

    "ReadSpecialDropItemFile: ReadSpecialDropItemFile : there is no item 돈꾸러미 : node 금장보물상자"

    Another almost spamming warning is the -Wdeprecated-enum-enum-conversion one. For example it throws this error

    ./../../common/item_length.h:154:46: warning: arithmetic between different enumeration types ('EDragonSoulSubType' and 'EDragonSoulGradeTypes') is deprecated [-Wdeprecated-enum-enum-conversion]
            DRAGON_SOUL_INVENTORY_MAX_NUM = DS_SLOT_MAX * DRAGON_SOUL_GRADE_MAX * DRAGON_SOUL_BOX_SIZE,
                                            ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~

    for this code

    enum EDSInventoryMaxNum
    {
    	DRAGON_SOUL_INVENTORY_MAX_NUM = DS_SLOT_MAX * DRAGON_SOUL_GRADE_MAX * DRAGON_SOUL_BOX_SIZE,
    };

     

    Here are the full logs while building my game and db. I am pretty much using almost vanilla novaline as base.

    Game build log:
    https://pastebin.com/hpd3pwk2

    Db build log:

    https://pastebin.com/fFdwrACt

    Thank you very much in advance!

  7. 4 hours ago, Debloat said:

    Hi Mali, I'm getting this error with your code while building game. Could you please help?

    blend_item.cpp:83:22: error: 'stricmp' was not declared in this scope; did you mean 'strncmp'?
       83 |                 if (!stricmp(token_string, "section"))

     

    Don't know if this is smart way to do it or not since I don't know how to code, but I read on google that "stricmp" is windows spesific and "strcasecmp" is its equivalent. So I changed "stricmp"s with "strcasecmp" and the error is gone.

    Can someone confirm?

  8. Thank you very much! I followed the tutorials and managed to start my sserver with Clang 14 /  c++2b. 

    However, there are way too much warning while compiling. Especially for korean characters, unused variables and many deprecated things... An update to get rid of those warnings would be great.

    Anyways, thank you so much for everything you have done for this community.

  9. On 2/28/2020 at 5:15 PM, Mali said:

    ++Blend_Item_load

      Hide contents
    bool Blend_Item_load(char* file)
    {
    	char	one_line[256];
    	const char* delim = " \t\r\n";
    	char* v;
    	if (!file || !file[0])
    		return false;
    
    	std::unique_ptr<FILE, decltype(&std::fclose)> fp(std::fopen(file, "r"), &std::fclose);
    	if (!fp)
    		return false;
    
    	std::unique_ptr< BLEND_ITEM_INFO > blend_item_info;
    
    	while (fgets(one_line, 256, fp.get())) {
    		if (one_line[0] == '#')
    			continue;
    
    		const char* token_string = strtok(one_line, delim);
    
    		if (!token_string)
    			continue;
    
    		if (!stricmp(token_string, "section"))
    			blend_item_info.reset(new BLEND_ITEM_INFO());
    		else if (!stricmp(token_string, "item_vnum")) {
    			v = strtok(nullptr, delim);
    			if (v && blend_item_info)
    				str_to_number(blend_item_info->item_vnum, v);
    		}
    		else if (!stricmp(token_string, "apply_type")) {
    			v = strtok(nullptr, delim);
    			if (!v || !blend_item_info || !(blend_item_info->apply_type = FN_get_apply_type(v))) {
    				sys_err("Invalid apply_type(%s)", v);
    				return false;
    			}
    		}
    		else if (!stricmp(token_string, "apply_value")) {
    			for (int i = 0; i < MAX_BLEND_ITEM_VALUE; ++i) {
    				v = strtok(nullptr, delim);
    				if (v && blend_item_info)
    					str_to_number(blend_item_info->apply_value[i], v);
    			}
    		}
    		else if (!stricmp(token_string, "apply_duration")) {
    			for (int i = 0; i < MAX_BLEND_ITEM_VALUE; ++i) {
    				v = strtok(nullptr, delim);
    				if (v && blend_item_info)
    					str_to_number(blend_item_info->apply_duration[i], v);
    			}
    		}
    		else if (!stricmp(token_string, "end") && blend_item_info)
    			s_blend_info.emplace_back(new BLEND_ITEM_INFO(*blend_item_info));
    	}
    	return true;
    }

     

    Hi Mali, I'm getting this error with your code while building game. Could you please help?

    blend_item.cpp:83:22: error: 'stricmp' was not declared in this scope; did you mean 'strncmp'?
       83 |                 if (!stricmp(token_string, "section"))

     

  10. 21 minutes ago, Mitachi said:

    The code is adapted to be able to refine them with scroll or blacksmith, if you simply want to make them stackable you just have to change the flag on the item_proto server.

    spacer.png

    in "flag" field, change 0 to 4 for all stones value.

    Oh, such simple thing... Thank you for helping. I used to change them in navicat and they were getting back to 0. I should have instead do it in the item_proto.txt Thank you again...

    p.s
    And now the problem is... They can't be stacked by drag&drop in the inventory. I can get them in stack with command but it says "You can't add stone to this item" when i drag them on top of each other.

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