Mytherin / Tibialyzer

Tibialyzer is an extension made for the MMORPG Tibia. It automatically scans the server log and messages from the Tibia client by reading its memory, and gathers various statistics, such as loot found from creatures, damage dealt by party members and experience gained every hour.
Other
184 stars 60 forks source link

Tibialyzer does not recognize "pile of grave earth" #13

Closed gurka closed 8 years ago

gurka commented 8 years ago

As title. Looking at pile of grave earth does not trigger a popup window with information. I guess that the item is missing from the database?

22:07 You see 4 piles of grave earth. They weigh 3.92 oz.

Other items work fine, i.e.

22:07 You see 11 ghoul snacks. They weigh 15.40 oz.

Mytherin commented 8 years ago

Pile of Grave Earth is in the database. The reason the popup window doesn't trigger is that Tibialyzer only recognizes simple plural forms automatically. Simple plural forms meaning the letter s is appended at the end (e.g. skullskulls). It doesn't recognize piles of grave earthpile of grave earth. Thus instead of recognizing it as a plural Tibialyzer tries to search for the item piles of grave earth which does not exist.

To deal with irregular plural forms, you have to tell Tibialyzer what the plural form is. This is done by adding the item to the Database/pluralMap.txt file, as I have done in this commit 59b1380e47ba565488edff83123d7564faa52ff2.

I will leave this open because I want to extend Tibialyzers' ability to detect plurals, because piles of grave earth really should be automatically detected.

benjaminkomen commented 8 years ago

Some items already have their plural name on TibiaWiki, not all of them though. In TibiaWiki's loot parser some plural exceptions are listed as lootparser_p_words: http://tibia.wikia.com/wiki/Loot_Statistics/Code. You could copy that logic.

gurka commented 8 years ago

You could also use opentibia's items file. Just use sed or vim to extract the lines, something like (in vim):

%s/^.*name="\(.*\)" plural="\(.*\)".*$/\2=\1/g

https://raw.githubusercontent.com/opentibia/server/master/data/items/items.xml Den 18 feb. 2016 9:23 em skrev "Benjamin Komen" notifications@github.com:

Some items already have their plural name on TibiaWiki, not all of them though. In TibiaWiki's loot parser some plural exceptions are listed as lootparser_p_words: http://tibia.wikia.com/wiki/Loot_Statistics/Code. You could copy that logic.

— Reply to this email directly or view it on GitHub https://github.com/Mytherin/Tibialyzer/issues/13#issuecomment-185898775.

Mytherin commented 8 years ago

Thanks for your suggestions, I have extended Tibialyzers' ability to obtain the singular form in the following commit f80959a1f47211e3a93b7576d8763e695501f823. This should solve most issues with plural items not being recognized.