[Utility] Collection Analysis

Discussion in 'Card Hunter General Chat' started by neoncat, Feb 1, 2014.

  1. Hey PKB,

    perhaps a bit late (I'm checking the forums less frequent atm) but most of my php-files are already preprocessed so no php-installation necessary. Just avoid to pick the developers-versions (the archives those names end with "_dev"). You can open them in any browser without any additional tooling.

    And, everyone may choose their browser themselves based on their own preferences. It's just that I wouldn't make the same decision ;) .
  2. Hey fellow Hunters,

    it's about to be Christmas. So let me hand over my gift for you all: a new version of the tools! According to my internal protocol it's the 13th version and the one with the most changes (based on my way of counting them, so you may have a different view, but that's OK for me).

    But let's start with a related topic: the tools hosted by @Stexe . I can now report back that I checked them. There are (still) two pages missing and I can't figure out why and how that came. The tool's names contain no terms that may be back-listed by some firewall or alike (one of the names was also part of the old tools). And they are all proper php-files and all link-targets are correct. So if you say you copied all files to the server, it's hard for me to give any good advise. Besides this, I found a small bug. But don't worry, this bug isn't specific to your hosting. I introduced it with my last version and already detected it while testing my new version. Seems like no-one exported the list of listed items from the collection analysis. But I'll come back to this when explaining my changes.

    So let's actually take a look at the new version:

    The 11th version was all about appearance. This time I also changed some minor visual details. The change that you'll probably notice first is a new arrangement for options like the check boxes for the item sets. This arrangement saves some height so the pages are a bit shorter. And the check boxes are easier to click.

    We had a lengthy discussion about some special items and how to obtain them with some exiting details that most of the players won't know. But at its root the discussion wasn't about having a nice chat but about what to do with two specific items that no-one will be able to find (anymore). There were some supporting me in excluding them and some for the opposite (although this sounds like a lot of participation actually it was one guy on each side). So finally it was up to me to decide. I appreciate all the comments but I couldn't do both so I chose to exclude the two items. If they come back some day, I'll include them again. To be clear, if one of the items will appear in your shop or you have more than max usable of them, the respective tools will report them, but the collection analysis and the collection badge will not know them anymore.

    All of the remaining notes on my protocol refer to the collection analysis:
    - Some browsers got errors at some point in the analysis. This is now fixed (unless other errors occur).
    - The item export contained some columns twice because of my last update with the exclude-buttons. Now both exports should be working again.
    - Speaking of the exclude buttons, I changed the appearance. I hope they look more like buttons now.
    - The check boxes for undroppable, treasure and promo items got replaced by drop-down menus. You have now the option between (exemplary for treasures) analyze items without the treasures, with the treasures or only the treasures.
    - In case your browser does not prevent this behavior the cheat sheet will now prefer to open as a new tab. This will keep you from leaving the analysis' page if you (accidentally) click the link.
    - And the last change is a <irony on> totally useless change. It is something NO-ONE wanted and you'll hate it, trust me, it's the worst I ever did to the tools. Didn't know why I wasted my time on this. <irony off> OK, let's get back to normal. This change is the ONE (!) thing @Force.ofWill was asking for all the time and after I finished it I fell in love with this feature. It's like the wiki's item search page on steroids. Next to the exclude button there is now a new button in every line. If you click this "i"nfo-button a new page will open (*). On this page you can see ALL the items that the info box would have displayed if it was large enough. And every item listed on this page is essentially a link to the wiki. Isn't this awesome!! This info page has no great design and offers nothing more than a full item list and the links but I'll add other information and functionally as they come to my mind (and when I have the time). And even if there are no items listed in an info box the page opens, but this isn't a bug. I plan to show details even for lines that show 100%. Already planned are more details and sorting directly on this page. But this page will already be a great improvement for all. Ever experienced that you were opening the wiki to get some details for a listed item and had to remember the item's name because you couldn't just copy the name? Now you can click the "i" and then click the item and you're done.

    (*) I admit, there is one problem with the info-pages: I'm creating them on-the-fly and the only way of displaying on-the-fly-generated content (that I know of) is one technique that some ad-provider also tend to use. Hence, some ad-blocker (I use AdBlock Plus with Firefox in case you want to know the one that definitely causes problems) won't let the pages open up properly (they get closed within split seconds). So if something magically closes the pages before you can see any content then try disabling your ad-blocker.

    That's being said I wish all of you nice Christmas days. And in case there aren't any problems or bugs that need to be fixed the next week, I'll continue my work next year.

    Yours, Phoenix

    Attached Files:

    Last edited: Dec 22, 2017
  3. Stexe

    Stexe #2 in Spring PvP Season

    I can try reuploading everything using FTP instead of uploading each file individually.
  4. GriffTheThief

    GriffTheThief Orc Soldier

    As for my problem with the "Uncommon Collector" Steam achievement, you can forget it :p

    Yesterday, I logged in and I bought one thing or two from Holiday Store. Next time I logged in, I got the achievement. :)

    Weird thing is: since I bought two Holiday (meaning: non-base set) items from the store, I *think* they shouldn't count towards getting Uncommon Collector achievement. I can't say for sure that I got the achievement because of these items, but buying them was the last thing I did before getting the achievement. Well... since I finally got it, no harm done :)

    Thank you all!
  5. When I Use google chrome to see the info page, it never loads and remanind at a blank page. When i tested it with firefox it worked perfectly.

    I copied the page that was made at firefox into chrome, and the page displayed perfectly. For some Reason, Chrome don't generate the page by its own.

    By other hand, the new show the items is awesome. With that, the option to use the custom filter for check items for builds is now super reliable. Because now, you can check properly the items, and search the things based on your own collection. Is very powerfull and completeness.

    One thing than can be improved, is that every click to the item opens it in a new tab (same case as Cheat Sheat) Is easier to keep the results page and open items in new tabs for easy and fastest look, also you can look more items at the same time.

    The change to treasure and the new place of check boxes is really good. Is better than before.

    The buttoms, is something I still dont like, i prefer them without the borders (also when you click their size of the square changes, so maybe without that is more clear) Maybe is because i get used to last version, than i changed my opinion about the red X.

    Congrats man, for real, this need to be the best cardhunter gift I ever have since I Started playing. The level of improvement in the tools is notorius, and that is because all your work.
  6. @GriffTheThief nice to hear that.

    @Force.ofWill I already knew/expected that you'll love this, too. :p The "open in new tab"-thing is no problem. Thing is, I use a plug-in that fine-tunes how new pages are opening, so every link already opens in a new tab in my browser, so it's good that you remind me of such details.

    Regarding Chrome: I just did a quick Internet search today and the result isn't good news. Google decided to block so called data URLs completely IF they are script generated while user generated ones work as they should. Their argument: data URLs can hide malicious content. Hence, Chrome receives my "open new tab with page content as follows [...]" request but simply drops it, but if you have access to the mentioned content (e.g. by using Firefox) Chrome accepts the content and displays it. Their argument: if you type something into the address bar it's your responsibility to ensure that the content is harm-less, but don't ask we, how I should check a data URL without opening it in some browser ;) . The even worse news (for me, at least) is, Mozilla is planning to block those data URLs soon, too. But atm this is an argument to prefer Firefox over Chrome. :cool:

    I'm not sure how to handle this now. First of all, I think this isn't a serious bug, so I won't do anything about it in the remainder of this year. All tools work and even Chrome users can use the rest of the analysis and clicking the buttons only causes empty tabs to open. But I know that there are other developers active in this forum, so I'll give you a quick overview of the process I'm using atm, perhaps someone has an idea (for those of you not familiar with web-development, you can skip the rest of this post):

    The tool does not actively use the server that hosts the files. As I don't know how Stexe's hosting works (and I don't want to bother him with this) the main requirement is to keep this (as a consequence you can save the tools to your local drive and they will still work, except perhaps some formatting stuff). Hence, all actions have to be limited to client-side scripts. Based on this requirement I decided to dynamically construct the html, then base64-encode it and finally invoke the window open command with the base64-encoded html. But base64-encoding counts as data URL ("data:text/html;base64,PCFET0..."). And besides the general blocking by the browsers/vendors there are also the ad-blocker that may prevent the loading. The desired perfect solution would be one where neither the browser nor some plug-in interferes with the loading process. But I'm relatively new to web-development so my knowledge base is limited.

    Alternatives that I can think of:
    - clicking the button downloads the details page. This works always because the explicit download command tells the browser that the user accepts the content. But this will cause several additional clicks to load the page (and will leave many files on your hard drive, which can also be an advantage in some cases).
    - clicking the button copies the encoded page to your clipboard. Problem 1: the user has to actively open a tab and paste the clipboard's content into the address bar. Problem 2: Copying to clipboard with pure JS is almost impossible.
    - display the base64-code of the page in a text box and the user has to copy the box's content to a new tab. I guess I don't have to explain why I don't like this way, do I? And this will only work as long as all browsers aren't more restrictive than Chrome is today.
    - Some ad-provider once used some technique where the browser's address-bar showed javascript. I can't tell how this worked and I don't know what the script's content was because I cannot reproduce this now. Does someone know how this works? But even if this works: As this technique is already used by ad-providers I'm very sure that there will be some limitations sooner or later, too.
    - opening new tabs/windows returns a hook to this page. Is it possible to open a blank page and fill it via the script?
    - or are there other ways to construct pages locally and open them that do not rely on data URLs?

    I'm open for ideas.

    (Again) I wish all of you nice Christmas days.

  7. Hey hunters,

    Happy New Year everyone.

    The Chrome-related issue was frequently coming to my mind the last days. Now I might have a solution. For me, this version works on all of my browsers (but the previous version did work, too). But I only run two browsers and those two are already more than I would like to have, so please help me with verifying if this works for every browser.

    I'd like to ask you all to test this version with as many different browsers as possible. To do so, place the (extracted) attached file next to the collection-analysis of my last (extracted) attachment and open it in your browser. For my versions of Firefox and Opera (although, I don't run the most recent versions) this page seems to work and Ad-Blockers aren't interfering anymore, too. The appearance and behavior of the info-pages should be IDENTICAL to the old pages (in case you had them at all in the old version). Your browser (my Firefox) might show you that the page is constantly loading (which they in fact do not, so I guess the browser just can't detect that loading has finished), but as long as the pages show up correctly, this visual detail won't be a huge burden. Just stop the loading process in case this irritates you.

    I'd like to know, for which browsers this version does (not) work and if the appearance and behavior of the new info-pages is in fact identical. If this version works for you, you can replace the old analysis with this one (just delete or rename the old one and rename this one to the name of the old one, so that the index-file will link to the new one correctly). And if this version works for everyone I'll include this version in my next update together with other fixes/features.


    Attached Files:

    Last edited: Dec 31, 2017
    Force.ofWill and Stexe like this.
  8. Now is working on Chrome last version. Need to check it with the old version, but i don't have that PC right now.
    It seems identical compared to the non test version.

    If there is a posibility to open the link in another tab without the use of (Ctrl + click) or (Right click -> "Open in other tab") will be great (don't know if that will be a problem). Also I have another super fancy idea but will told you in game.

    But bro, really thanks for the update. Great thing you bring to us as the last year gift. As I said before, the tools is one of the main reasons that keep me playing. Check my collection in all the ways possible is mandatory for me in a collectable game. With your help, now the check is more complete than ever.
    Sir Veza and Stexe like this.
  9. Derek

    Derek Orc Soldier

    So I'm going to be that guy. I can't figure out how to work this new collection analysis, and I'm not afraid to ask. Hopefully, in addition to clearing this up for myself, I'll help make this tool accessible to some of the newer players as well.

    Here's my deal:

    I can use this webpage just fine, which accurately shows me my percentage for every set (despite not having tick boxes for the more recent ones).

    But now I want to share my progress in my signature and so am looking for a way to create a badge. Only problem is that I can't find that option on Stexe's website and the download found above uses php files. These php files open in my text editor, which is useless. I did some poking around and it appears to run php files on my own computer I need to set up a dedicated server for them.

    Can you clarify how to use these php files?

    And I'm remiss for not mentioning this at the start but... A massive thank you to PhoenixTheHunter, Stexe, and everyone else who has remained active on this wondrous tool.

    EDIT: After spending an hour and a half trying to learn how to run php files through terminal (mac) and then through XAMPP I'm even more confused than when I started. Surely it can't be this hard..
    Last edited: Jan 3, 2018
    ParodyKnaveBob and Stexe like this.
  10. Stexe

    Stexe #2 in Spring PvP Season

    You should just open the .html file index or whatever it is called and then click the links to go to the page you want.
  11. For open the .php files, just open them with the internet browser of your preference.

    For example, right click the .php file and select to open it with Safari. It would open the page in your Browser. Also remember to use the new Test version for collection tool if that if That if What you need.

    For Othe thing: The test also work with Chrome old version.
    Also i expose to @PhoenixTheHunter the super fancy idea. Is Super Greed, but if he want to give it a Try, I will comment here about it, because maybe (I'm sure) we will need some help.
    Last edited: Jan 3, 2018
  12. Sir Veza

    Sir Veza Farming Deity

    When I use the Collection Badge page on Stexe's site, I get a "ReferenceError: canvg is not defined" error. (Chrome and Opera browsers.)
    If you're having this problem, download the version from post #182 and try it.

    At this point, I'm going pedantic. I apologize if you don't need it, but someone might.

    Step 1: Once you get the badge image to display, some browsers will allow you to copy and paste the image file to a location on your computer. Another option is to use a screen grabber program (available in many freeware graphics programs) to save the image as a file.

    Step 2: Use the Upload a File option to add the image file as an attachment to one of your posts. Many use one in this thread.

    Step 3: When the image displays properly, right-click on it and Copy Image Address.

    Step 4: On the Forums bar, click on your username tab (just to the left of the Inbox tab), and select Signature in the left menu.

    Step 5: Select Image (to the right of the smiley), and paste the address you copied in Step 3.

    Step 6: Fiddle with it until it displays as you want it to, or can at least tolerate.
    Mr. Magnifico and Stexe like this.
  13. Derek

    Derek Orc Soldier

    When I download the first attachment from post #182 I get a folder filled with .php files for all the various tasks. The one not enclosed in a folder is index.php. Because this is a .php file and not an .html file my browser can't open it without a parser (hence why I was fiddling with my terminal and XAMPP).

    I can open index.php with a simple text editor, and the links do display, but they're linked to the other .php files in the downloaded package, so when I click on the links in index.php it just opens the respective .php file in a new text editor window. A simple text editor displays the information correctly, but there is no field to paste my collection and the 'Process Data' button is just simple text.

    Perhaps I don't get how to use .php files, or perhaps they're handled differently on Macs than they are PCs. See my reply below to Force.ofWill.

    .php files cannot be directly opened by web browsers. Web browsers can handle .html, but .php needs a parser. When I open any of the .php files from the download in post #182 I get a blank web page with a pop-up asking me if I want to save or open the file (as if I had just downloaded it).

    I also get that error. Hence why I moved on to trying the file from post #182. You can read about my struggles with the enclosed .php files above.
  14. Sir Veza

    Sir Veza Farming Deity

    Okay, I finally understand what you're referring to. I just opened the file with Chrome, Firefox, Opera, and K-Meleon on my laptop pc without a glitch. I don't have a Mac to test on, so I need to butt out at this point. I hope we can get a good solution for this.
    <Engages brain> Update: @Derek , try this one. It's in html.
    Last edited: Jan 3, 2018
    Derek likes this.
  15. Derek

    Derek Orc Soldier

    Okay yeah. Probably a Mac thing. I read its because Apache is disabled by default. It can enabled through terminal, but I'm not very experienced with these sorts of things.

    For troubleshooting, I tried opening the various .php files in Safari and Chrome instead of Firefox and it shows me the full code (still not workable as far as I can tell).
  16. Sir Veza

    Sir Veza Farming Deity

    In case you're watching for new posts, check the edit of my last post. Yep, I posted before refreshing the page. :oops:
    Derek likes this.
  17. Derek

    Derek Orc Soldier

    GAHHH I thought we had a solution, but no luck.

    The index is in html, so it opens in my browser perfectly, but the links still go to local .php files from the download.

    I think it comes down to modifying stuff in my terminal, and for the good of all Mac users I plan on figuring it out. But no time left today, unfortunately.

    EDIT: See attached file. I've found my solution. I'll post a quick tutorial here for other Mac users as it is actually quite involved.

    Attached Files:

    Last edited: Jan 3, 2018
    Sir Veza likes this.
  18. Derek

    Derek Orc Soldier

    Guide For Getting Collection Analysis Utility Files To Work on OSX

    EDIT: This post has been heavily amended. The original method for getting the Collection Analysis Utility Files was unnecessarily complex.

    If you are struggling to open the .php files in the downloads you will find on this forum thread (they open in TextEdit [or default word processor] as text only -- instead of your web browser) then you should rename the .php files to .html

    If this still isn't working make sure you didn't download the file with '_dev' in the name.

    Alternatively, just go here: http://www.Stexe.com/CardHunter
    Last edited: Jan 10, 2018
  19. Hey folks,

    sorry for being quite absent for some time, but I'm working day and night for a personal deadline that I'm facing. Next week I'll be back officially and will work hard on a new version to please you again (although I'm not yet sure what this version will be about).

    I saw that a few of you were already handling @Derek 's problems, but I thought to say something, too. But as I'm a Windows user I can't reproduce this problem myself.

    You linked the old version of the hosted tools. There are already new versions hosted:
    In the new version you always get to the overview page by clicking the first link in the signature-bar on top of each page.

    2.) All tools in both hosted versions are php-files themselves, so I doubt that Mac or any browsers on a Mac are unable to parse php-files. Especially because you said that working with the hosted files was successful. I can't tell if Mac perhaps blocks local php-files, but for me as a programmer it would sound strange, why an OS should only prevent php-files if they are local. But regarding Mac, most of the decisions from Apple seem strange to me, so no reason to not think this would be possible (sorry, I tried, but I can't write any tips on how to work with Mac without some Mac-bashing :oops: ).

    3.) You're right that php-files have to be preprocessed in order to get viewable html pages. But - as I told @ParodyKnaveBob a month ago in this thread - if you pick any of the archives that don't contain the string "_dev" in its name, the contained files are already preprocessed. Any browser should recognize that the file's content is proper html-syntax and render the page. So if everything else fails, you can rename all contained php-files into html-files and you're ready to go. The only downside: The links between the pages will not work anymore unless you are correcting them, too. So you would have to open each tool individually.
    I don't want to say that setting up an apache-environment was the wrong way - this will totally work and you can also download other attached versions and this will automatically work with the new files - but if you're fine with doing the renaming for every newly downloaded version, renaming would be the easier way. And if I got your Guide right, all links and stylings will be broken in your set-up nonetheless. In this case renaming would at least keep the styling working.

    Stexe likes this.
  20. Stexe

    Stexe #2 in Spring PvP Season

    So is anyone having issues with the current version I have hosted? I can replace it with the newer one. I remember someone said there were a few issues with the one I was using that you fixed?

Share This Page