PDA

View Full Version : Visual Addons?



Blare731
04-25-2015, 03:42 PM
So as of now, the Hex Client-side API is out. One of the main things that I want to do to help myself while I draft, is show which cards I have in my library and how many.

So I was wondering if visual addons were allowed? I mean it wouldn't do anything but use the client side api to pull your collection (hopefully we can add some functionality to force this) and as you saw your pack, it could highlight in varying colors cards that you did not have a full playset of.

Something like:
Red outline: 0 in collection
Orange: 1
Yellow: 2
Green: 3
Nothing: 4+


Pretty simple, just to make it easier to know which ones I want, without having to keep track by hand or otherwise. I'm thinking about combining either Orange and Yellow for it to be Yellow is 1 & 2 or, Red is 0 & 1. Either way though, I think this would be fine to make, I just wanted to make sure.

Also any suggestions would be helpful. I could give you credit as well, if you so desire.

Diesbudt
04-25-2015, 03:52 PM
I am pretty sure all addons are not allowed.

I have an excel sheet off to the side that I keep track when I open packs in draft or in the store. Its pretty easy to keep up to date with how it is set-up.

Blare731
04-25-2015, 03:57 PM
I have an excel sheet off to the side that I keep track when I open packs in draft or in the store. Its pretty easy to keep up to date with how it is set-up.


Like I said, It's not hard. It's annoying, when it can easily be implemented you know. But I wasn't sure about their addon policy since I can't find much in ToS since they said they may allow certain third party addons.


Edit: Here's what is says in the ToS

"3. Unauthorized Third Party Software. You are strictly prohibited from use of unauthorized third party software that intercepts, “mines”, or otherwise collects information from or through the HEX Game, including without limitation any software that reads areas of RAM used by the Game Client to store information about a character, game environment, or other aspects of the HEX Game; provided, however, that HEX Entertainment may, at its sole discretion, allow the use of certain third party user interfaces."

Gwaer
04-25-2015, 06:02 PM
This is on my top 5 list for what I'd like officially added to improve the drafting experience.

zadies
04-25-2015, 07:48 PM
Given CZE already links your collection to your ah searches there is no reason they shouldn't be able to do a scroll over telling you how many of a given card you have during the draft other then development time.

Using the api you can just make it write out a text file of the cards you need from each draft pack... I'd avoid overlays and anything that actually interacts with the client.

People already have the api exporting their collections to excel files, so you just have it export the draft pack trigger and have it run a conditional formatting on the new sheet... have to dual screen or alt tab though.

Yoss
04-25-2015, 08:00 PM
I am pretty sure all addons are not allowed.

As long as it's a separate program and not a modification to the client, why would it be prohibited?

zadies
04-25-2015, 08:10 PM
I think the original suggestion was to interact with the client which would require pixel recognition among other things to place the border Yoss.

As long as it isn't actually sending information back through the client to the server or to the server directly I don't think it really matters. but using pixel recognition software probably falls under the ToS issue the person brought up.

The api though is authorized by hex and has a draft pack call so it is absolutely fine to use that information to compare it automatically to your collection, it's really a question of how to display that information without being called foul, borders are around cards requires specific information about what is being displayed on screen to place them.

Yoss
04-25-2015, 08:23 PM
I agree about presentation issues. Seems simple enough to just create a row of boxed numbers below the cards based solely on the window position and resolution you use. No need to screen scrape any data from the client display. Should be legit.

LNQ
04-26-2015, 02:05 AM
Umm, how would the overlay know which number to put next to whichever card without scraping data?

zadies
04-26-2015, 11:22 AM
It all depends on if the api call provides the cards in order they are displayed or not, which I haven't really bothered to test, but this also requires knowing the default sort order that it is providing the information in and if it matches the default that the draft displays, and won't allow for resorting the cards during the draft otherwise it breaks all the assumptions used to place the data and some people may resort their drafts while using this and really just get messed up.

If the api call provides the cards in an order you can set the client to sort to then that order allows you to know where each card is and can place each number in the appropriate place for a given resolution without actually scraping the screen based on a number of assumptions that that information provides.

If it doesn't provide them in order then you don't put the number near the card more fill up a portion of the screen at all times(that you minimize once the drafting portion is over) that doesn't actually show anything that is numbered 1-15 and just says the number of them that you own.

The real issue is getting any data to display on top of the client at all to work when not in windowed mode without running afoul of that ToS thing... really that is up to personal interpretation... I wouldn't risk it though, technically not much of a difference in effect in actual implementation there is. I've been using the term overlay for easy of understanding but only when this is done in full screen would it need to be coded as a full on overlay as opposed to a second program that is set to just have the window priority to just be on top of everything else, ala some media players.

Yoss
04-26-2015, 02:16 PM
If the API feed is not sorted, one could just add the card name to the overlay boxes. Less elegant but still gets the job done.

Blare731
04-27-2015, 01:34 PM
I mean, I'm probably going to have to just make a simple program that runs as hex is running and you can just alt tab to see. That seems like the easiest way for it to be portable (no scaling issues with resolution). But that doesn't stop the fact that, if CZE just made a tooltip hover mechanic for draft. It could easily be implemented to show how many cards you have in a collection through a simple number. I'm just doing this because I'm a tad impatient, I guess.


But showing you how many cards you have in your library when your drafting is probably low on their priority list, as it should be. But thanks for the feedback. I'll just play it safe and make a separate program that just lists the cards that you don't have and how many you need. I think that will be the simplest.

Yoss
04-27-2015, 01:40 PM
Make sure you have your app always on top so that you can have it overlay with the Hex window.

Blare731
05-01-2015, 02:56 PM
Make sure you have your app always on top so that you can have it overlay with the Hex window.

Hmm, not sure if this is necessary if I don't try and overlay the borders. Since overlaying the borders, I'd have to account for resolution and stuff, I think it might just be easier to have the program run with it's own menu space, that updates every draft pick msg. AS a text interface, not visual borders like I had originally hoped. Of course the text version could also just be V.1 until I find more time to make it look nice as well =].



Update on progress: Sorry guys, I actually got a full time job now (WOO not poor anymore!), but of course that means I've had less time to do the things I want. Lately I've been catching up on Destiny before House of Wolves DLC drops in two weeks, but I promise I'll still give this a couple hours a week at the least. So for those hoping to use this program, it's still coming don't worry!



Edit: But at the same time, it might also be nice to have it stay in front so you don't have to alt tab if you don't want to.

Yoss
05-01-2015, 03:20 PM
Edit: But at the same time, it might also be nice to have it stay in front so you don't have to alt tab if you don't want to.
Thus my comment. :)

Pheelon
05-04-2015, 07:23 AM
I could look over my old code (had some for a card-collection app pre API) - will see if any of it is relevant for this approach.

Turtlewing
05-04-2015, 10:20 AM
As long as it's a separate program and not a modification to the client, why would it be prohibited?

Because:


3. Unauthorized Third Party Software. You are strictly prohibited from use of unauthorized third party software that intercepts, “mines”, or otherwise collects information from or through the HEX Game ...

If you write a program that pulls data from the client and wasn't explicitly authorized by HexEnt you are in violation of of that clause of the TOS.

If they explicitly authorized this particular use (perhaps in the API documentation) you're good to go, but otherwise you're in the big grey area of "technically the ToS says you can't do it but the devs may not actually care unless to do something disruptive with it".

[edit] It looks like this was about writing a program that in parallel queries the Hex server for your collection via the API to display metatdata not querying the client for data. That's subtly but importantly different regarding the ToS.

Yoss
05-04-2015, 11:00 AM
This is all using the Hex API. If the official Hex API is banned by the ToS, there's something very wrong with the ToS.

vickrpg
05-04-2015, 12:51 PM
But at the same time, it might also be nice to have it stay in front so you don't have to alt tab if you don't want to.

Multiple monitors yo.


If the API shouted out cards in pack opened during draft rather than just what cards were picked, (I think this was requested but not yet implemented) it would be very easy to have a program that runs parallel to hex and shows you the cards as you're suggesting.

bogycoins
05-04-2015, 02:41 PM
I've implemented a small application that shows you in realtime the draft packs and the cards you pick. It also displays the amount of each of those cards in your collection, granted you have previously synced with TCGBrowser.

You can check it here http://hex.tcgbrowser.com:8080/livedraft?CODE

The CODE is the same used for API sync. Go here (http://hex.tcgbrowser.com/tools/sync/) if you need to create one.

I've done some local testing and seems fine, but didn't yet have the chance to try it on live. Have fun!

strylght
05-04-2015, 03:41 PM
I've implemented a small application that shows you in realtime the draft packs and the cards you pick. It also displays the amount of each of those cards in your collection, granted you have previously synced with TCGBrowser.

You can check it here http://hex.tcgbrowser.com:8080/livedraft?CODE

The CODE is the same used for API sync. Go here (http://hex.tcgbrowser.com/tools/sync/) if you need to create one.

I've done some local testing and seems fine, but didn't yet have the chance to try it on live. Have fun!


Excellent news! I will certainly give this a test or two tomorrow GMT and be sure to let you know if I run into any issues.
Loving your work as I have done since I started playing Hex, please don't stop anytime soon. :)

For the record, I think this is all that is really needed. I don't see why an overlay is really necessary. Alt-Tab is an option, multiple monitors if you are lucky enough and not playing in fullscreen is also an option.
I mean, personally I play in windowed so I can have a Notepad open to document my drafts anyway.

Pheelon
05-05-2015, 01:30 PM
I've implemented a small application that shows you in realtime the draft packs and the cards you pick. It also displays the amount of each of those cards in your collection, granted you have previously synced with TCGBrowser.

You can check it here http://hex.tcgbrowser.com:8080/livedraft?CODE

The CODE is the same used for API sync. Go here (http://hex.tcgbrowser.com/tools/sync/) if you need to create one.

I've done some local testing and seems fine, but didn't yet have the chance to try it on live. Have fun!

only thing i noticed is that it doesn't cleanup when a new draft starts (aka old entrys from the last one are still visible)

+ the current plat value next to the number of cards in the collection would be nice

@overlay: http://imgur.com/a/cDXwu#0 - dl-link: https://drive.google.com/file/d/0BzKdRmHtNqyWbmZvdlNLNi1QZlk/view?usp=sharing

its a quite basic atm but works - still needs some way to load/save the Synch-Code for example.

can post source later as well - still needs some cleanup. - hf

Yoss
05-05-2015, 01:42 PM
Definitely not bad for a first go! Nice work.

Perhaps next step is to make the print out go horizontal and (somewhat) line up with the cards.

Pheelon
05-05-2015, 01:47 PM
Definitely not bad for a first go! Nice work.

Perhaps next step is to make the print out go horizontal and (somewhat) line up with the cards.

its a window and calls http://hex.tcgbrowser.com:8080/livedraft?CODE in a basic webbrowser control (with some tweaks to enable more than ie7 comp mode) - you can move it at will before enabling Overlay Mode see difference screen 2/3 and 4

but yes a more horizontal layout would be better for overlay use

and for disclosure's sake: app needs admin rights atm (or at least rights to write to the registry to enable more than IE7 Combatiblity for the webcontrol - without that it will throw script errors and the webpage won't work) - code snippet used:
http://www.neowin.net/forum/topic/1077469-vbnet-webbrowser-control-does-not-load-javascript/page-2#entry596755046 / http://stackoverflow.com/questions/18333459/c-sharp-webbrowser-ajax-call/18333982#18333982

bogycoins
05-06-2015, 02:48 AM
@Pheelon
I've added the platinum price next to each cards from packs. As for the cleanup when the draft ends, I'm not sure there is a reliable way to do it unless we get a DraftStart/DraftEnd event. And not even then I'm not sure its a good idea, since you might wanna save the result and an automatic cleanup would delete it.

Pheelon
05-06-2015, 03:13 AM
@Pheelon
I've added the platinum price next to each cards from packs. As for the cleanup when the draft ends, I'm not sure there is a reliable way to do it unless we get a DraftStart/DraftEnd event. And not even then I'm not sure its a good idea, since you might wanna save the result and an automatic cleanup would delete it.

hmm, true - well maybe start each new pack (=15 cards) with a line divider to seperate it a bit

another thing i noticed just now looking at my still open livedraft link from yesterday - some cards aren't recogniced correctly:
S.P.A.M. Bot - 0
Gobbleglade Witch - 0
Psychotic Anarchist - 0
Dragon Guard Stalwart - 0

bogycoins
05-06-2015, 04:38 AM
It seems it picked up the arena champions instead. Fixed that. And added a line after a new pack.

Yoss
05-06-2015, 11:58 AM
Perhaps Xenavire can add this to the "useful links" sticky.

Blare731
05-06-2015, 03:36 PM
So does anyone still want an independent program? Or are most people going with TCGBrowser?

I mean most likely I will be finishing the feature for myself anyway, but just curious if anyone would prefer it or not?

Yoss
05-06-2015, 03:57 PM
Given how freaking awesome the Trading Post feature at TCGB is, I don't know why anyone WOULDN'T use it. :)

Xenavire
05-06-2015, 06:30 PM
Perhaps Xenavire can add this to the "useful links" sticky.

I'll add it when it is a little more polished - it seems like just the kind of thing we want to advertise, so I will monitor it and add it soon.

Very good work guys, all these community tools are shaping up nicely.

Pheelon
05-07-2015, 03:14 AM
So does anyone still want an independent program? Or are most people going with TCGBrowser?

I mean most likely I will be finishing the feature for myself anyway, but just curious if anyone would prefer it or not?

it wouldn't be hard to do it myself (i mean its "just" handling the collection event - storing the data in a file and handling the draft events) - now for additonal stuff like plat prices more has to be done.

If you really want to have a color coded border drawn around the cards that would be a bit more tricky - hardest part would be to find the card locations on the screen (or have someway to manually define a card boarder and the spacing between cards) - then card recognition (basically have that done allready for another project) then open a clickthrough window over the client window that has the borders drawn (either transparent but for the borders or using a screen capture of the client window) - directly drawing on the client window would work in windowed mode - but that has other issues (and might not be allowed as well)

but atm i'm imo fine with just using the tcgbrowser link for my Overlay App.

for curiositys sake - whats your current approach?

Yoss
05-07-2015, 07:34 AM
then card recognition (basically have that done allready for another project)

Why do you need card recognition? The API dump already has the cards in the order they appear on the screen.

Pheelon
05-07-2015, 07:56 AM
Why do you need card recognition? The API dump already has the cards in the order they appear on the screen.

that works as long as you don't sort ehm - but true for "standard use"

Blare731
05-07-2015, 02:50 PM
...
for curiositys sake - whats your current approach?

I'm assuming your talking about the overlay, and I haven't given it much thought tbh. I still haven't had much time to get the basic text program running. Still very early development. If I were to give you an idea of how I plan to implement it though, it would be something like get the ratio between the cards and resolution, then adjust the card overlay resolution by the ratio and then place it where it needs to go. Which if Yoss is correct wouldn't be hard to know, and if you sort it and their is no event that is triggered *Hint* possible api feature suggestion *Hint*, I could easily make buttons that you would use to sort the overlays as well.

That's the theory approach at least, like I said, haven't gotten very far yet since starting my full time right after I posted this.