[Utility] Collection Analysis

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

  1. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    First of all, end of month is more and more getting an illusive-kinda dream. I don't know yet when the next version will be ready, but I promise, I'll upload it a soon as I'm done. At the moment I'm working on the graphical tools (badges and card generator) and afterwards only the Collection Analysis (*sigh*, this one's the most complex one) is left. Then some clean-up and we're ready to strike ... sorry, got distracted by the game, what I meant was, ready to go.

    I never knew what the Card Generator was good for. Yeah, I guess you can generate images of Card Hunter-like cards, but what for? But I'll not remove any tools. Hence, I had to rework this one, too. And I'm so damn close to the in-game card appearance now. And I'm getting even closer each day I'm working on this. I'll need another day or so to fix the text formats in the boxes (italic Flavor Text and underlined Keywords) but I'll post some screenshots tomorrow (probably). And I've learned some new (sad) things about this JavaScript I'm reluctantly working with for these tools. I got the point why JavaScript as a concept was a brilliant idea (do something with the web page after it got loaded in your browser, sure, is an awesome thing), but why did JS get such popular? I wouldn't say that running Java or Flash instead is any better, but ... .

    Wish you a recreative weekend while I'm coding, but seeing those cards becoming more and more game-like really is more fun than it is work, so don't feel sorry for me.
     
    Sir Veza and Stexe like this.
  2. Stexe

    Stexe #2 in Spring PvP Season

    It is fine. Take your time.
     
  3. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    I never said, the cards will be exactly like in-game and I'll not invest more time for the few things those cards are lacking. I've done everything that I urgently wanted to change (and some pieces more). So here we go:
    cards.png
    The left ones are the new ones, the right ones are just for reference the old images (that won't appear anymore in the final version).
    Why I'm so proud of what I've done:
    • No more overflowing text (Prowl, Fleet)
    • Better Colors for Types and Card Quality (although I already deleted the old coloring in my code, hence, the old cards use my new colors, too, instead of the previous ones, otherwise you'd be blinded by the strange colors the cards had before). What I'm lacking is some color effects like the used-look of the image, the paper-look of the whole card (the "marbling") or the metallic Quality color effects.
    • The missing box in the middle, containing the types (see the Magic Unholy and Magic Arcane) and the contained item (of course modifiable if anyone wants to create his/her AA item with the item name already on the cards)
    • An indicator for the card's set and rarity. One of the not-exact things, but I'm satisfied with this.
    • Styled Text: Keywords underlined and Flavor Text italic (although the latter one already existed but I had to recreate this, too, in my new version)
    • Flavor Text in the correct box
    • Info icons at the bottom of the boxes for Damage, Move, Range, Rolls, Effect Types. Not exact either but definitely better than the cryptic [D2 / R3] things.
    • And finally: 50% of the work done, that I'll need again for the badge tools.
     
  4. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    Got a little bit too small but now I have an avatar, too.;)

    I always liked the avatars that constructed some character out of item icons (like the ones of Founder, Testlum and Obernoob). But I never could decide which items to use. Now I have a really create tool, to create CardHunter cards representing yourself. And I just did so.:cool: At least this is something no-one ever did before here.

    Okey, I had enough fun with this, back to work ...
     
    Sir Veza, ParodyKnaveBob and Stexe like this.
  5. Blizzrd33

    Blizzrd33 Kobold

    I would like to second this request for the devs to fix the Steam Achievements. I have the same problem.
     
  6. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    I appreciate that you're actively collecting items for those achievements and I like to congratulate you for having all of today's uncommon items and, sure, we talked about this here but mainly because some players were in doubt whether the tools were broken or not (and we found out that the tools are in fact right). But the correct places for such a request would be either of the following:
    - email support@cardhunter.com
    - ask in the Bugs sub-forum
    - ask in the Support sub-forum

    I'm not playing via Steam and, hence, I don't really care for the correctness of their achievements. And in addition I don't think the devs will read this thread and will find your request here. And I guess you asking them directly will have the same importance to them as if I would ask them. We're both just two players, nothing more. So, please try any of the above ways and I wish you luck. But I don't know the Steam achievement API, so perhaps even the devs can't edit once published achievements. Otherwise, I think they would have fixed this problem already earlier on. Or they just aren't aware, therefore, go ahead and give it a try.
     
    Sir Veza likes this.
  7. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    Hey fellow hunters,

    I'm getting closer and closer to finishing my work on the next version. But while testing a bit I found some difference to the old version. Tbh, I'm not sure whether I made this change by intention or just forgot to copy this line of code. Even worse, I can't decide if I like this or not. So I'd like to ask you. I know that all my previous polls weren't that popular and only very few people answered but I'll try it again. It's about the Collection Analysis. In case there is only one line in some of the aspects (e.g. only level 13 items, or only Epic ones, only Divine Skills) in the old version I completely skipped this aspect (no Level analysis, no Rarity analysis, no Slot analysis, respectively). Atm, in the new version there is an analysis with just one bar.

    My arguments:
    Pro:
    - you can directly see what Level, Rarity, Slot, or Set your items are from, even if all of them are in the same "class" in this aspect.
    - the output looks more complete (personal opinion)

    Contra:
    - all information are equivalent to the Total line (percentage, count, hoverbox-lines, ...)
    - for half of the aspects you don't need the additional information. The Rarity and Level of an item is visible in the hoverbox. If only level 13 items are listed, all items listed in the hoverbox will show that they are of level 13. Sure, this doesn't work for Slot and Set.
    - if only one class is left and you click the exclude-button, the next time you run the analysis it will have zero items to analyze. You excluded the final remaining Level, Rarity, Slot, Set.
    - most of the time that you only have one class of some aspect left, you did this by intention. Disabling all but one set or writing a filter rule that only accepts Legendary items is a decision you made by intention. Hence, if the analysis reminds you that all items are exactly what they should be, you don't gain any information. It's just what the analysis was supposed to do for you.

    If no-one offers strong arguments for displaying the aspect with only one line, I guess I'll "fix" this to match the old appearance. Otherwise convince me and we declare this bug a feature.
     
    ParodyKnaveBob and Stexe like this.
  8. Gast86

    Gast86 War Monkey

    Any chance we could get a screendump of what the difference is?
     
    Sir Veza, ParodyKnaveBob and Stexe like this.
  9. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    Sure.

    The old version has looked like:
    hidden.png

    The new version now looks like:
    shown.png

    My rule only listed Arcane Items from Base Set but they differed in rarity and level. So for this concrete example the question is, should the result show the Slot and Set table? Now that I coincidentally found an example where the common aspects are Slot and Set and - as I said before - this are exactly the two pieces of information that aren't directly retrievable from the hoverbox (unless opening up the info page, clicking on one of the links and finding this info on the wiki), I'd like to present a third option. It would mean a bit of work but I could adapt my code in a way that some aspects are only shown when there are different values (I'd suggest to use this for Rarity and Level) and some are always shown (Set and Slot). Hence, the not directly retrievable information is always shown. For this example this option would also produce the second appearance but if all items are epic the Rarity table would not show up. But I'm not sure if this would be any better than the already available options because some of the cons still apply here.

    While testing around with some (random) item-name filter rules that would produce this (without having to explicitly filter for some chosen items) I realized that whatever option I choose I have to handle the case when no item is in the result because THIS here really looks strange:
    none.png
     
    Sir Veza and Stexe like this.
  10. Sir Veza

    Sir Veza Farming Deity

    I vote for feature.
     
  11. Gast86

    Gast86 War Monkey

    I like the "bug"
     
  12. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    Ok, you didn't really have arguments for the new look, but I guess you convinced me that what I previously found to be a better approach isn't that much accepted. Hence, I keep the "complete" version with always four tables. I've already fixed the empty-result-list problem (here, only the line with the (empty) Total bar is shown) and I have decided that there will be no "exclude"-button in a singular line (so, if all items in the result list have the same Set, Rarity, Slot or Level the line representing this Set, Rarity, Slot or Level will be there but won't have a red-cross-button). This way most of the cons don't apply anymore and I can pretty much live with the result we agreed on.
     
  13. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    Hey people,

    it's done. I've finally finished the next version. You probably can't imagine how much of a relief this is. This version took me ten months, of course, not full-time but this is clearly a long period of time. Tbh, I was about to already write this yesterday, but after doing the last checks on the code, I wasn't in the right mind-set and mood to write this. :p

    This version introduced some changes and a new tool but my main focus was on the technical stuff. So don't notice the ten months and expect completely new tools. In a way, what I present today are completely new tools but only on the inside, the outside was intentionally kept as much the same as possible. But I couldn't keep myself from doing some improvements, too. Only doing the technical re-writes gets boring really soon. And I needed some compensation. :D

    Let me mention some of the changes I've made. And even I'm not sure whether I have retraced all my changes for my change log. ;) So first of all, the signature got slightly changed and has a link to this thread now, too. The index-page has a new layout and I've grouped the tools in a different way now (also affecting the physical location (address) of the tools). Instead of two almost identical pages that showed all playable character costumes I've decided to merge them into one with a checkbox to select primary-color-only or all color variants. The collection analysis' detail-pages now make use of the same layout as most of the other tools. Based on the experiences with the badge tools, I've now included all external sources so that any changes to the used external scripts will not effect the tools anymore. This might cause that some fixes to this external scripts will not directly be present but I guess this is the better approach given that I can't control what the other authors do with their scripts. Now I can evaluate their work before the tools use them and if they move or get deleted the tools will not stop working.

    That I have reworked the card generator tool was topic of an earlier post. I've also mentioned that I've improved the custom filter so let me elaborate this further. First of all, I have - with kind help from some fellow community members - updated the cheat sheet accordingly and you should be able to find all information there. But please ask if something isn't clear even after consulting the cheat sheet. And if you think you can make a contribution to the cheat sheet then please do so. We have discussed and improved some parts but there may still be some vague descriptions. To ease the process of getting comfortable with the custom filter each example filter in the cheat sheet is clickable and will take you to the new tool (more on this later on) to directly execute it and to see some results. I really hope that this will help new people to also try out the filter facility. Unfortunately, opening the examples in the new tool will only fully work in a php-environment, so if you download and test the non-dev version you'll not be able to use this. One of the reasons why I hope that we'll be able to test this version quickly so that Stexe can replace the (very) old version on his website. But now, regarding the filter: Unless you knew what value the fields have, it wasn't possible to compare two or more fields of the same item. Now you can remember some value and later on check against this value (e.g. remember the first card's name and verify if the second card's name is the same). Also the <..>(...)-syntax got more powerful. Previously, it was only possible to find and test all cards that an item contained. Now you can find and test all items that contain a card, too. And this can also be stacked. You can write filter that test cards of items with cards of items with ... cards of items. I really can't imagine why you should need more than four layers (and for the complex filters four layers isn't unusual at all) but you could make use of twenty or more if you like (and your browser can mange this).

    Now let me tell you what the new tool is for. Its name is 'Card and Item Query' and it is a nice way to work with the custom filters without having the collection analysis run all the time. This new tool will just list all matching cards or items (with links to the wiki, of course). And this is already the first difference: you can find cards that fulfill some filter, too. This can be really useful for Aloyzo's Arsenal. For example you can list all cards that were printed on weapons before. This will reduce the likelihood of not being selected because of a not yet playable card you've included that the devs don't want to make available for normal game play. But the same is possible for items if you only need a list of them without your collection progress. And if you need - besides the name - some other properties of the cards or items, the tool will list them, too. No more need to open the wiki to see a card's attack range (what would need two clicks in the collection analysis, now you don't need a single additional click).

    I hope I haven't kept you waiting for too long and I've teased you enough that you'll immediately fetch a copy of the tools and test them. Clearly, I couldn't test and check every tool and every situation and input. So please - as always - blame me for any misbehavior you encounter. :cool:
     

    Attached Files:

  14. Stexe

    Stexe #2 in Spring PvP Season

    Cool. I'll try to put the new version up on my website this weekend.
     
  15. Sir Veza

    Sir Veza Farming Deity

    I reset my temporary account yesterday, and now I'm farming like the dickens to double dip Firehide Robes. (Still working on the first dip, but I'm getting close.)
    Which is to say, I'm looking forward to checking this out tomorrow. :)

    Edit: Works great. Very snappy, as in tight code. Lovin' that new app smell. :cool:
     
    Last edited: Mar 1, 2019
    ParodyKnaveBob likes this.
  16. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    Try this:
    - open Collection Analysis
    - execute any analysis where the hover box lists some items
    - move mouse over the Total-line so that the hover box appears (IMPORTANT: keeping the moue there and do the remaining with keyboard input only)
    - execute another analysis where no hover box is shown (e.g. looking for missing items but having all collected)
    Observation:
    The hover box will show the last listed items and will never disappear. Only fix: execute another analysis where a hover box can appear and you move the mouse out of such a line. :D

    I'll quickly fix this. ;)

    Edit: I almost replaced the archives from the other post, but I don't want this hilarious bug to be gone forever, so here are the new ones ...
     

    Attached Files:

    Last edited: Mar 1, 2019
    Sir Veza, ParodyKnaveBob and Stexe like this.
  17. Sir Veza

    Sir Veza Farming Deity

    God bless you for that! Accidents are the purest form of humor!
     
    PhoenixTheHunter likes this.
  18. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    I've found some other bugs all regarding regular expressions. Here's the fix.
     

    Attached Files:

    Sir Veza, ParodyKnaveBob and Stexe like this.
  19. Stexe

    Stexe #2 in Spring PvP Season

    Cool. I think I'll give it another week before hosting it just to iron out any more bugs. Let me know if you find others or not. =)
     
    Sir Veza and ParodyKnaveBob like this.
  20. PhoenixTheHunter

    PhoenixTheHunter Lizardman Priest

    I wasn't testing the new version 24/7 but for now, I haven't found other bugs. So, unless others will report some, this version either seems pretty well done or there just isn't a single one testing it besides the one(s) that have already replied here (namely Sir Veza) ;)
     
    Sir Veza, ParodyKnaveBob and Stexe like this.

Share This Page