Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 190

Thread: New application: Draft Analyzer (Beta)

  1. #1

    New application: Draft Analyzer (Beta)

    UPDATE: There seem to be some hard-to-track bugs in the Hex API. Please report any strange things you encounter and I will try to find workarounds. Updated for Armies of Myth patch on 27/7. Make sure to replace the old api.ini with the new one. You no longer need to list/cancel a card in the AH. Make sure you restart the Hex Client with Draft Analyzer running.

    WARNING: You need to read installation instructions carefully. There is no extensive documentation or tooltips, spend 5 minutes reading the instructions to avoid problems down the line.

    What does this do:

    This is an application developed by myself in my spare time to improve my drafting experience in Hex. It uses the Hex API, the Hex AH Data and the Hex Database(thanks DocX and cwik) to provide you with more information during drafting.


    • For each draft pack, you receive a list of cards together with their platinum price and the number you currently have in your collection. The 14-day median is used for the price, unless there have been less than 5 sales in the past 14 days in which case the all-time median is used.
    • Two modes: In the collection mode, if you own 4 or more of a card it's show in green. If you don't have a playset of that card it's shown in red instead. In the threshold mode, cards are colored depending on their threshold requirement (Diamond-Grey, Ruby-Red, Sapphire-Blue, Blood-Purple, Wild-Green, Artifacts - Black). This allows you to see at a glance the composition of the pack. For example, you can quickly check how many diamond cards you passed in pack 1 to adjust your expectations for pack 2 (if you passed a ton of great diamond cards, your neighbor is probably in diamond and won't be passing you the good diamond cards in pack 2).
    • For packs 9-15, shows the cards that were in the pack when you saw it the first time. Useful when you're trying what colors are the most open and also for those WTF moments (for example: "WTF is this Vanguard of Gawaine still doing here?")
    • Warning sounds. You get a short soundtrack whenever a draft fires. Never miss your first pick again because you went to the next room to get a glass of water. Additionally you get a much shorter sound whenever a game starts, so you can alt-tab in peace. You can change these sounds by replacing the files in the sound directory (just make sure your replacement sounds have the same name/format).
    • Improved syncing with Hex TCG Browser. If you have syncing with Hex TCG Browser enabled, you might have noticed your client getting unresponsive for 30-120 seconds at the end of each draft before you start building your deck. That happens due to a bug in the Hex client. The Hex API tries to sync your collection 45 times (one for each card you drafted) and hangs until all 45 times are completed. If you do that over the internet it takes a noticeable amount of time, especially for large collections. If you enable syncing through the draft analyzer, the hex client only has to transfer the data locally, which is much faster and then the draft analyzer forwards the data to Hex TCG Browser (and you avoid spamming their servers too).
    • Writes the total value of your draft after each pick your make. You can force it to ignore non-legendary cards that sell for the platinum floor (commons that sell for less than 5 plat, uncommons that sell for less than 12 and rares that sell for less than 32), by changing trimprices to True in the config.ini in the Draft Analyzer folder and restarting the application.
    • Exporting your collection to an excel-readable CSV file. Exports your collection adding some extra information for those who like to keep track of it in a spreadsheet. The exported spreadsheet can be found under Collection/My_Collection.csv. When you first open it, if you get receive a list of import options, select comma as the only separator (no spaces or semicolons).


    Installation instructions:

    1. If you're updating Draft Analyzer you can delete the old folder (everything is self-contained) and install the new version as normally.
    2. Download the zip file from GitHub (on the right panel - Download ZIP)
    3. Right-click and select "Extract All". You can move the folder wherever you want, but you it's best to avoid placing it inside the Program Files folder (you will need to run Draft Analyzer with administrator permissions every time if you do). Of course feel free to create a shortcut to the desktop.
    4. Run Draft Analyzer.exe
    5. WARNING: The first time you launch the application you might need to wait some minutes (depending on your internet connection), until all the AH-Data is downloaded. The application is NOT stuck. You can check the AH-Data folder to see the progression. After all data is downloaded, the application will launch normally.
    6. (Optional) Set up syncing with Hex TCG Browser. Find your syncing URL by following instructions here – Copy-Paste the entire link in the text box that appears and submit (careful to not include extra spaces). If you want to disable the syncing feature in the future, just click on syncing again and submit without typing anything.
    7. UPDATED: In the Draft Analyzer folder you just unzipped, you will find a folder named "Resources". Copy the api.ini file from that folder straight to your Hex installation directory and you're set to go. This is the new way of enabling the Hex API. Don't worry, it only sends data to your computer and will never broadcast any sensitive data.
    8. Optional: If you want to set-up the API to send information to more than one application (and don't want to use Draft Analyzers built-in syncing), you can find more information here. The line required by Draft Analyzer is:
    9. Start the Hex Client (RESTART if it was already running).
    10. You no longer need to list a card in the AH (in fact it won't help you). Make sure you restarted the Hex Client with Draft Analyzer running.
    11. Jump into a draft and watch the magic happen.


    In case of problems, before posting on the forums try the following steps:

    • Restart Hex and Draft Analyzer.
    • Make sure the files of the Draft Analyzer directory are not used by any other application.
    • Delete the AH-Data directory and all the files in the Card Info directory EXCEPT card_info.json. This should solve problems with strange numbers, but you will need to wait until all the data is downloaded again.
    • Run with administrator privileges. This will definitely be needed if you placed the folder in Program Files.
    • The nuclear option: delete the whole Draft Analyzer directory and download again.
    • If nothing helps you can contact me. Make sure to include Draft Analyzer.log and the API_logs from the day of the problem.
    • I might also stream some draft and help people install/use/troubleshoot the application if there is enough interest.

    Known Issues:
    • Relogging with the API enabled sometimes makes the client stuck.
    • Enabling the API might make your client hang every time items are added to your collection (cards in limited events, rewards from chest rolls etc.). The more items are added at once, the longer the delay, so in chest rolls you might notice a 0.5 second delay and a small stutter, in sealed events a 5-minute delay. The client doesn't crash, so if you wait long enough you will be able to continue.

    Both these issues are not something on my end (I tested just with the API enabled, no application running), so if someone can contact Chris Woods he might be able to solve it.


    Just delete the Draft Analyzer folder. Everything is self-contained.

    In the Future:

    • The application will need to be updated next week, due to some (great) changes to the Hex API. I will post up the new version as soon as the patch hits. O
    • One of the features I have planned is to show cards that were in the pack and didn't wheel, for picks 8-15.
    • I also have a working bargain-hunting module, that suggests what cards in your collection you can sell for a reasonable price, but I would need some time to create a working GUI and allow the user chose the options (without changing the source code0.
    • If you want to help with development you are welcome to look at the source code (in the build directory). You will probably notice that I could use some help from a threading or a gui (tkinter) expert.

    PS. I'm looking for ideas on how to represent the multi-colored cards from Armies of Myth in threshold mode.
    Last edited by Ariathor; 08-25-2015 at 12:14 PM. Reason: new patch

  2. #2

  3. #3
    Dammit, Ariathor! You did the same thing I've been doing only you've released before me! And it's more full featured than what I was doing! Curses!


    Out of curiosity, what are you doing the programming in? Is it anything that's cross-platform (like Unity)? Or is it Windows specific? Also, I see you're using the network-based API feature instead of using a local file. Did you do that to reduce installation complexity? I was working on doing network first, but didn't figure out a good way to do that with my app (which I'm writing in Unity).

    Loving that I'm not the only one who's thought to do this! Looking forward to seeing what you're able to do with this. . . and now I need to get off my posterior, stop grinding arena while watching the charity stream, buckle down and finish my app so we can compare notes.

  4. #4
    This may throw some false positives for some AV clients (it tripped windows defender for me, win32.zwangi).

    Ran it through and nothing else tripped but windows defender isn't a fan, lol.
    Last edited by Superjuice; 07-11-2015 at 10:12 AM.

  5. #5
    +1 Really appreciate the effort man. This tool sounds amazing!

  6. #6
    @AdamAoE2: Thanks, I hope you enjoy it. Feel free to leave feedback after you've tried it out, I've only had very few people to alpha test it.

    @DocX: Haha, that's pretty funny, because you're the one who, indirectly, convinced me to release it. I had finished the groundwork and I was getting complacent (since it was good enough for personal use), but after seeing the Hex Database API I was so excited to be able to easily add the colors that it convinced me to make the final push, tweak a few things and start the alpha testing.

    It's all written in python and it should be mostly platform independent. It's possible that one or two lines will have to be changed though, I didn't write it with compatibility in mind. You can try to compile it if you want, source code is in the build directory and the only external library needed is requests (for the Hex TCG browser forwarding).

    I admit, the local server to intercept the API events was a nightmare, especially because hex clients would randomly hang for unknown reasons occasionally, but not always. I was tempted to give up and go with the file-based approach, but I got caught in a stubborn streak and in the end it seems I managed to solve it. Two things seemed to do the trick:

    • Including the content-length header in the replies (even though it is 0). Most of the replies are the typical 200-OK and the content-length header (and nothing else).
    • Occasionally the client would randomly send an expect 100-continue request. I couldn't really find a pattern as to why, but when I replied appropriately it seemed to fix the problems.

    There is a lot of room for new features (especially with the new API on its way), so good luck finishing your project. We can definitely sit together sometime and discuss what the best way to implement some things is.


    That's interesting, I didn't have many opportunities to test on different computers. And py2exe needing to bundle everything makes it seem much more threatening than just my 5-6 files of source code If somebody is worried, feel free to look at the source code and compile it (see my reply above).

  7. #7
    Quote Originally Posted by Ariathor View Post

    That's interesting, I didn't have many opportunities to test on different computers. And py2exe needing to bundle everything makes it seem much more threatening than just my 5-6 files of source code If somebody is worried, feel free to look at the source code and compile it (see my reply above).
    Definitely just a false positive, just wanted you to be aware in case it popped up for others, i think that specific variant is a common false positive for defender. Can't wait to try the app

  8. #8
    Not to derail your thread, but I've been working on pretty much the same tool since the API was released. I had a working version fairly quick, but wanted to check with CZE what their thought on this was. This unfortunately took a bit before I got response and at the time I did, there were already similar tools out there.

    Anyway, I did not want the work go down the drain so I decided to share the whole sourcecode. Note that the code is pretty horrific and would need some cleanup. People interested in the code (C# .NET) can download it here:

    It includes pricing based on median (through and indication of cards that have wheeled. I was thinking about having it record userdata (with the ok of users) to record picks and then show people what cards were picked most... but again; I'm pretty lazy.

    Anyway, I hope this helps anyone get started or at least some ideas. Have fun!

    Good luck with your tool! And again sorry for derailing your thread.

    Hex Price - For all your price information!

    Hex Rock League - Join the free to play Hex Rock League now!

  9. #9
    You've cleaned this up a lot since I've seen it! Great work.
    HexEnt is too long to type, They're HXE now.
    I am currently trading my unused GK code for a new Tesla Model S P85D
    Feel free to contact me for where you can have it shipped.

  10. #10
    This sounds really cool! I will wait for the new version since the patch is so soon but will definitely give it a shot. I'm wondering, is the whole thing with this app telling me what cards didn't wheel etc fine in terms of fairness? Do we have CZEs official stance on these kids of app?
    Contributor of the Hex TCG Wiki
    Pledges: Pro + 2x Collector + King

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts