Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47

Thread: HEX API Parser (links for Windows and OS X)

  1. #1

    HEX API Parser (links for Windows and OS X)

    I got around to re-writing the futzy collection of scripts and web servers I had been using for looking at Hex API data and doing it in a language (Go) that lets me produce binaries that run on Windows and OS X/Mac.

    Features

    - Catches Collection events and caches them to a file (by default it's named 'collection.out' and will be in the same directory you run the program from). Can put these into a CSV file as well.
    - Provides limited game state information (Cards drawn, Champion life totals, Cards on the Chain) during games
    - Provides guidance for drafting cards by providing the card with the highest plat value, card with the highest gold value and the card you have the least of in your collection (presuming you started up the API parser before you logged in and it was able to get the Collection info or your collection cache is up to date)
    - - Price data is gathered from my price parsing information. Full methodology is beyond the scope of this document by is avilable at my prices page
    - - When making recommendations, in the case of ties the highest plat price will win, followed by the least number of cards followed by the highest gold value with the final tie breaker being the card that appears latest in the pack (nearest the rare/legendary slot).
    - You can make some behavioral changes by editing a 'config.ini' file in the same directory you run the command from. Values are specified in the format key=value. Config options intended for end-users are given below:
    - - collection_file=filename - Specify the name of the file the program caches your collection information to. The format for the collection file is card_uuid : quantity. It's not very human readable, but it's awesome for the program (since there are no duplicate lines for identically named cards with different versions)
    - - export_csv=true - Trigger the program to write out a CSV file with card names and quantities whenever the program caches your collection info locally. The format for this file is "Card Name",quantity
    - - csv_filename=filename.csv - If you'd like a name other than 'collection.csv' for the CSV name. If export_csv is not set to true, this has no effect.
    - Program checks to see if it's up to date and, if not, provides a warning indicating a newer version is available.
    - Program identifies and deletes duplicate API messages
    - Program updates price data every two hours to avoid stale price data
    - Program gives information about every card in a draft pack (not simply the ones it decides are "best" based on quantity, gold value and plat value).
    - Program shows rarity for cards while drafting
    - Draft Pack contents now sorted from highest rarity to lowest (to mirror sorting change in game)
    - Added in gold value tracking for draft value
    - Using JSON data file for pricing data to allow for easier modifications in the future


    For download links and more info, head to the page I set up for it.

    Any suggestions or feedback, feel free to reply to this thread, PM me or send me In Game mail (my IGN is 'Dylan').

    Enjoy!

  2. #2
    I've updated the program with the following new things....

    - Can output CSV file for your collection (create a file named 'config.ini' in the same directory as your hexapi program with the following line(s) in it:

    Code:
    # Trigger the program to make a CSV file every time it caches your collection
    export_csv=true
    # The name of the CSV file. 'collection.csv' is the default if none is specified
    csv_filename=collection.csv
    - Checks if a newer version is available and lets you know where you can download it (providing the URL based on your particular version). Also prints the version you're using when you start the program (right now it's '0.2')
    - Now knows about cards in the 'Vold' and 'Choose an effect' locations.

  3. #3
    Also, after someone reported an issue with my programs flagging Anti-virus software, I've re-worked my compilation process to make use of a proper Windows host instead of cross-compiling from my Mac. Seems to have sorted this out.

  4. #4
    I can't trigger a collection event :/

  5. #5
    There are two Collection events these days. The first Collection event type, an "Overwrite" event should happen when you first log on. The second Collection event type, an "Update" should happen any time a card enters or leaves your collection (buying a card from the AH, having a card sold on the AH, opening cards from a pack, etc).

    Here's an example image of what should happen when you log onto the Hex client



    The line "Welcome Back to the world of Entrath! We hope you enjoy your stay." is the result of getting a "Login" message. If you get that, you'll know your Hex client is configured to properly deliver API events to port 5000 on your computer. If you don't get that when you login, then you're not getting API events. That's a Hex client configuration thing and not something my program can do anything about.

    The next line, "Got an Overwrite Collection message" indicates you got a full collection event. That should trigger the caching of info to the 'collection.out' file (and to 'collection.csv' if appropriately configured in the 'config.ini').


    FYI, here's what my 'api.ini' looks like (on my Mac):

    wickedanddivine> cat ~/Library/Caches/unity.Cryptozoic.HexPatch/h_dl_hex_gameforge_com__live_osx1452556776/api.ini
    http://127.0.0.1:5000/log.cgi|All
    wickedanddivine>

    Hope this helps.

  6. #6
    yep, worked fine. Now, is there a way to convert a card's code to the actual name ? The collection.out file being unreadable as is.

  7. #7
    Quote Originally Posted by pyrovoice View Post
    yep, worked fine. Now, is there a way to convert a card's code to the actual name ? The collection.out file being unreadable as is.
    The easiest way is to use the CSV file (instructions for triggering this are in post #2 in this thread). The CSV file uses card names instead of UUIDs. The UUIDs are much easier for the program to understand which is why I use that in the collection cache. The CSV file is more human friendly.

  8. #8
    The Transcended
    Join Date
    Jun 2013
    Location
    California
    Posts
    7,860
    Nice tool. I look forward to checking it out. This could replace my manual collection tracking finally by using the csv output you've made.

  9. #9
    Quote Originally Posted by Yoss View Post
    Nice tool. I look forward to checking it out. This could replace my manual collection tracking finally by using the csv output you've made.
    I was hoping someone would make use of that. I haven't done the work to get this to auto-feed my Google Doc spreadhseet, but I'm hopeful to do that soon-ish.

  10. #10
    yayy finally made something to get the most sold and valuable in your collection thank you

Posting Permissions

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