FANDOM

"2nd" version of loot parser:



http://dantest.wikia.com/index.php?title=Loot_Statistics&oldid=4041
http://dantest.wikia.com/index.php?title=MediaWiki:Common.js&oldid=4324
http://dantest.wikia.com/index.php?title=Template:Loot&oldid=4195
http://dantest.wikia.com/index.php?title=Template:Loot/List&oldid=4011
http://dantest.wikia.com/index.php?title=Loot_Statistics/Lootparserloot&oldid=4316
http://dantest.wikia.com/index.php?title=File:Ajax_Load_Image.gif&oldid=3993
http://dantest.wikia.com/index.php?title=File:Ajax_Load_Bar.gif&oldid=4246

Some Questions Edit

Ok, I'll have some small things before we can copy the code to tibiawiki.

  • On the page Loot Statistics you have the add code below, it ends with |Empty, 368}} while I think the two ending curly brackets should go on a new line (small thing, still can be important).
  • MediaWiki:Common.js looks ok, I don't understand half of it but I think it only calls code on other pages.
  • Hunter of Dragoes proposed a change, see here, I wonder what you think about it and whether you think it's worth implementing?
  • Loot Statistics/Lootparserloot, the variable current_tibia_version should be manually changed every update loot changes? That's not a problem, just wanna know for sure.
    • could you also mark the automatically adding to wiki as minor edit? I figured it's maybe one of those Content-Disposition: form-data; name= lines?
  • The Outfiter, it certainly looks cool, do you define every pixel with it's RGB code color? I'm curious how it works though. Did you also create the outfiter here? Maybe need to ask permission? Tibia fansite agreement says something about copying other fansites' ideas.. Also, it's a bit too bad the outfits are not shown sharp like we have the images used on the Outfits page.

Well, that's it for now, I hope I did not ask too much ;) Bennie 10:15, January 15, 2010 (UTC)


  • I accidentally introduced a bug trying to make the script jslint compatible, I already fixed it and tested but please test again uploading loots, just to be sure.
  • The links marked as "2nd" version of loot parser are only for me, you should use the latest version of pages for anything
  • }}Fixed
  • I removed the outfiter part of MediaWiki:Common.js so there are no problems
  • current_tibia_version needs manual update when loot changes
  • edits are now marked as minor
  • Forgot to tell you, I used http://www.ajaxload.info/ to generate ajax loading images, if you want, you can change them and any other style so loot parser looks more like wiki.
  • MediaWiki:Common.js will require 2 changes if the loot parser will be on another page name, so if you want tell me the name where the loot parser will be on tibia wiki and I can change it here to test.
  • About what is on Template_talk:Loot I think it's a very good idea but as I understand it has to be calculated on the template right? I only would need to go back to "Don't combine stackable items:" style but that's not a problem. I suck with wiki stuff but I will try to work on a template that works for this new style.
  • I never read the Version idea suggested here by Temahk, I only added it to dantest template because it was needed to auto add loot correctly LOL
  • How the outfiter works:

It uses tibia sprites, I put sprites together in a logical way for me like this one: File:Citizen.png, For wikia I had to use "data:image/png;base64" notation for images because ajax calls can't load files from other domains.

The color table is a javascript array with r, g, b values copied from tibiaclient.

The image mix is like this: pink becomes transparent, and yellow, red, green, blue become head, primary, secondary and detail colors, after that, right side and left side are merged with multiply filter. I think tibia and tibiopedia use other graphic filter for merge the colors but I can't find which one and multiply looks almost the same(no difference to the eye), my color table had 1 mistake and it may have more so maybe that's why u noticed different colors from Outfits page.

tibiopedia outfiter for every change you make there loads 1 image with ajax that image is processed server side with PHP

my outfiter loads 1 image for every outfit and do the rest of the job with HTML 5 canvas element and javascript

Anyway, would be nice they allow tibia wikia to have this outfiter but I think they have a premium(paid) service for it so I don't think they want to, so no problem.

--Daniel Letalis 12:46, January 15, 2010 (UTC)


I read Template_talk:Loot again and made some tests on excel, I guess the changes can be done on the calculator so I will start testing --Daniel Letalis 00:24, January 16, 2010 (UTC)


I just made some other test uploads and it looks perfect. So, some answers/questions again:

  • I don't mind how the page will be called where the loot parser comes on tibiawiki, I guess the same as here is ok.
  • The output in 2 boxes, don't combine and DO combine will probably not be necessary anymore, when the changes discussed on this page are implemented, I suggest you make the output to only 1 box.
  • About the outfiter, if you intended it to be an exact copy of the outfiter on tibiopedia, I would say it's kinda useless. But if you intended it to be somehow different/better it is of course very good. What I meant was the following:
    Outfit Comparison

There is a difference in quality between the images which are fit for tibiawiki, and the images which the outfiter produces. Therefore the outfiter's only purpose (as far as I can see) is to simply look how the colors you want look on the outfit you want. I hope you understand my point, otherwise just ask ;) Bennie 11:24, January 22, 2010 (UTC)


  • Yep only 1 box is enough because only 1 format will be used after decided on w:c:tibia:Template talk:Loot
  • I didn't copied tibiopedia outfiter, my project was started and semi working before they put their outfiter online, when I saw the announcement on tibia.com I was a little bit disappointed but I tested tibiopedia's outfiter and I saw they made it with php instead of js and they had some features I had missing like walking animation and facing, so I finished my outfiter, 1 thing I copied from them was the archdemon, elf, etc creatures.
  • The difference in quality is because the option "Soft Image", it does an html canvas resize, with "Soft Image" disabled the real image generated by the outfiter is exactly like the ones on wikia but looks bigger because it tries to look the same as tibia client outfiter.

To really compare images you can generate them without "Soft Image", save them with right click, save image as, and open the image from wiki and saved image on an editor.

Jester compare

I attach my local copy of the outfiter in case you want to check, test or just have it, you just need to extract all files first.

http://www.megaupload.com/?d=F26YTR4L


--Daniel Letalis 19:58, January 22, 2010 (UTC)


  • I emailed MastroDaro, the tibiopedia contact person and explained the sitution. If he does not mind that we have an outfiter on tibiawiki, you have a green light putting it up ;) Otherwise, well.. it would be just too bad :/
  • Ok, so unchecking the 'soft image' option it will do the trick.
  • I think I found a bug in the loot statistics thing atm, take a look here:
    Bug maybe (the tattered piece of cloth is not displayed in the wiki output)
    It also happens with Novice of the cult and a pirate voodoo doll and 2 books not being displayed in the output box. Can you take a look at it and maybe fix it?
  • Do you have succes making the program work with what we talked about on Template_talk:Loot ? Good luck ;)

^^ Bennie (talk ~ fellows) ^^ 18:26, January 24, 2010 (UTC)



  • Thanks for outfiter, is just a nice feature to have for people that only use wikia
  • Is not a bug, I left it like that because I was making some tests with User:Hunter of Dragoes format and I found a bug with it: total amount of countable items other than gold are lost with that format, that's why I proposed another format on Template_talk:Loot and I was waiting your opinions to keep working on loot parser.

--Daniel Letalis 20:01, January 24, 2010 (UTC)


Sorry for deny it, now I'm not sure about it, I think this bug is happening and I will check soon, tx --Daniel Letalis 20:48, January 24, 2010 (UTC)


  • You can go on with the outfiter, I got an email back:
Hello,

I dont feel like to tell you to dont publish it, it was not possible to steal script from my server so it definately was made by your user. Publish it and give me the link, I am little curious of how hoes it work without dynamic generated sprites by php/java.

:)
//Mastro~

Bennie 20:05, January 25, 2010 (UTC)


Because of security at least Outfiter/Code should be never unprotected on tibia.wikia, MediaWiki:Common.js is already only admin editable and I think it would be better if all Outfiter subpages get protected too.

Chrome people fixed the bug that didn't allow chrome to run the Outfiter and now Chrome it's running it fine, I updated the code of Outfiter a bit to make it more like xhtml (used by wikia) instead of html.

I believe all files and dependencies for it are listed on User:Daniel_Letalis, it would be a lot of copy paste so if u want u can only add and protect Outfiter/Code and the portion for outfiter in MediaWiki:Common.js and I can add the rest, then u protect the rest, or if you want you can copy paste all, just please remember to protect at least Outfiter/Code because it has javascript code that is loaded and we don't want wrong people to be able to edit it. --Daniel Letalis 00:35, January 26, 2010 (UTC)


Ok, I will copy paste the code right away and see if it works. About protection, from some point of view it would be better to protect as few pages as possible, so users can edit as much pages as possible and just hope the world is not that bad :P But I can imagine with javascript you can't only put a hack link but also let users auto download files (?) or such nasty things, so I will protect that fully and semi-protect the rest. <cross fingers> hopes it works, you will see in a sec.

EDIT: I put it on, it shows the outfiter for me, but gives an alert my browser is not compatible (never showed this before), I use Firefox/3.5.7 so... Did you change anything which might have caused this?

Bennie 09:43, January 26, 2010 (UTC)


I don't have time to test more but for now on firefox(same version) and opera(latest) http://dantest.wikia.com/wiki/Outfiter is working http://tibia.wikia.com/wiki/Outfiter not working

I will check the issue when I have time. About protection, the level of protection u choose is ok as long as Outfiter/Code is fully protected. --Daniel Letalis 16:50, January 26, 2010 (UTC)


I debugged javascript and I believe I fixed it, only file changed is Outfiter/Code, try to update it on tibia.wikia

thanks --Daniel Letalis 06:15, January 27, 2010 (UTC)


It works now, thanks. :D ^^ Bennie (talk ~ fellows) ^^ 12:16, January 27, 2010 (UTC)


I replied again, after some time, here, sorry for getting impatient... Let's just stick to the version where you can input your server log, see the output in the format of the current Template:Loot with the only addition being the version parameter and the ability to upload the statistics to the correct page. If you can make a list of the pages I need to copy to tibiawiki, that would be totally awesome :) (maybe click on history and the older revision which was correct). ^^ Bennie (talk ~ fellows) ^^ 18:53, February 23, 2010 (UTC)



I was impatient too so I decided to play with the proposed format here and I can't find any backup/note about the revisions of the old format, I'm changing the new parser so it outputs as the old format, I already finished and it's perfect, I only need to finish the loot merger. Performance is a little bit better now because I wrote more functions of this parser in JS instead of copying them from php. I let you know here and on the other page when I finish. --Daniel Letalis 16:05, February 24, 2010 (UTC)


I won't touch files now until loot parser is copied to tibia wiki, you can see files list here: w:c:dantest:User:Daniel_Letalis

Don't forget is really important to protect Loot_Statistics/Lootparserloot

--Daniel Letalis 17:56, February 24, 2010 (UTC)


It's not working :O Can you take a look what I copied wrong or maybe what the problem could be? ^^ Bennie (talk ~ fellows) ^^ 11:33, February 25, 2010 (UTC)



It is working on all browsers on dantest and you copied it fine, it is working on chrome, opera & safari on tibia.wikia, I believe the problem is a wrong security problem in firefox with google ads, I will try to workaround this later. --Daniel Letalis 19:42, February 25, 2010 (UTC)


Love it! Thank you. :) Good job I have opera, one thing about the firefox google ads thing. I have Adblock Plus, even when I disabled it it didn't work so I take it that this has nothing to do with it? beejay 20:57, February 25, 2010 (UTC)


Error: Permission denied to <http://googleads.g.doubleclick.net> calling method Location.toString in <http://tibia.wikia.com>.

I get that error on firefox Error console (translated by me) but dunno, I will make more tests later. --Daniel Letalis 21:28, February 25, 2010 (UTC)


On Dantest it worked with Firefox 3.5 but not on tibiawiki. I have an add blocker installed though. I downloaded google chrome and it works on that one :) Only need to add |update=8.54 to let them combine... should have done that first :P ^^ Bennie (talk ~ fellows) ^^ 22:44, February 25, 2010 (UTC)


I think I found the problem with firefox, I improved w:c:dantest:MediaWiki:Common.js a bit with JSLint, you can copy and paste it fully on w:c:tibia:MediaWiki:Common.js

I also solved a bug with internet explorer and improved spacing on Loot Statistics/Lootparserloot

Currently item sorting is used because Temahk used it on last version of his parser but it can be changed easily.

Amount sorting

{{Loot
|kills=33
|name=Frost Dragon Hatchling
|Empty, 1
|[[Gold Coin]], 466
|[[Dragon Ham]], 30
|[[Frosty Heart]], 1
}}
<br>Average gold: 14.12
Item name sorting

{{Loot
|kills=33
|name=Frost Dragon Hatchling
|Empty, 1
|[[Dragon Ham]], 30
|[[Frosty Heart]], 1
|[[Gold Coin]], 466
}}
<br>Average gold: 14.12

--Daniel Letalis 19:09, February 27, 2010 (UTC)


I updated the files, hope it will work now. I prefer the amount sorting, if possible. ^^ Bennie (talk ~ fellows) ^^ 12:13, March 1, 2010 (UTC)



Loot parser is loading now on tibia.wikia for me on latest firefox, also Outfiter is working again.

When the parser adds loots it sorts them again, so it will be no necessary to change sort manually in the tibia.wiki statistics pages, I already changed sort to amount sorting but it is not fully tested, I will post here after I test it.

--Daniel Letalis 21:03, March 1, 2010 (UTC)


Sorting tested and working fine, only 1 file changed again.

w:c:dantest:Loot Statistics/Lootparserloot


w:c:tibia:Loot Statistics/Lootparserloot

--Daniel Letalis 03:29, March 2, 2010 (UTC)


Ok, I updated it (although little seems to have changed..). Thank you :) ^^ Bennie (talk ~ fellows) ^^ 17:44, March 2, 2010 (UTC)


Administrator Edit

Hey Daniel,

You have been around for some time on tibiawiki, you did a lot of nice stuff and are trustworthy as far as I can tell. When I asked Beejay to become administrator I also considered you but I thought to wait for a bit longer. But now the time has come, would you like to apply for TibiaWiki administrator? It will also remove the need to ask us to update code on protected pages, which must be annoying for you sometimes. So, just let me know what you think :) Bennie - 07:29, May 25, 2010 (UTC)


Took me some time to answer because it was a little bit unexpected, I've been thinking about times and I think it is possible and it would be very nice for me to be and admin in tibia.wikia. Do I have to apply according to TibiaWiki:Helpers page? --Daniel Letalis 00:28, May 26, 2010 (UTC)


Ok, nice. Real official stuff is not needed, but if you could send me your email address that would be nice. You can email to w:c:tibia:Special:EmailUser/Bennie. ^^ Bennie (talk ~ fellows) ^^ 06:12, May 26, 2010 (UTC)


== Hope you don't mind ==

Hey Daniel,

I hope you don't mind if I test some stuff here? I'd rather not do it on tibia.wikia.com because what I want to test (new template:infobox) could involve frequent Mediawiki:Common.css editing.. ^^ Bennie (talk ~ fellows) ^^ 12:43, May 22, 2013 (UTC)


Not a problem at all, you can test and even delete everything you need here.

--Daniel Letalis (talk) 19:41, May 22, 2013 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.