PDA

View Full Version : Twitch plays Hex



Risterral
05-20-2015, 05:48 AM
Some time ago, the idea arose of allowing Twitch viewers to play Hex draft without stream delay.
Now, I would like to present to you UDraftBot, which allows this (to some extent limited by Hex API (http://forums.cryptozoic.com/showthread.php?t=40975) - it can only read data from Hex client, cannot post any data).

About UDraftBot
UDraftBot is stream bot that connects Hex client and stream chat. It is displaying in chat card list of current draft round and allows viewers to vote for card that they would like to pick - all of this without stream chat delay.
3408
Live testing by Cirouss (http://www.twitch.tv/cirouss/v/4009858?t=15m0s)
Live testing by Alucard2004 (http://www.twitch.tv/alucard2004/v/5242172)


How does it work?
When draft of streamer starts, UDraftBot send to chat message containing list of current cards possible to pick.

List of current cards: 1. [Crackling Rot] 2. [Arena Regular] 3. [Zeedu]
Then viewers can vote for cards by typing in chat command "!pick {index}" or "!pick {name}". Every person has 1 vote per cards list, but can change it freely.

!pick 2
UDraftBot displays number of all votes, votes per card and currently winning card - this allows streamer to choose card based on chat voting


Download and setting up
UDraft Bot 2.2.0 (http://speedy.sh/TdZfG/udraftbot-2.2.0.zip) - 3.8 MB zip file (had to change to zip, because now it is containing additional files like images and html). Requires Java 1.7 or higher to run.

To set up UDraftBot You have to

create api.ini file (here (https://github.com/dylannorthrup/hexapidocs/blob/master/01_Setting_Up_The_API.md) is link with help how and where create api.ini file).
Add in it new line:
http://{url}:{port}|DraftPack|DraftCardPicked|SaveDeck|Co llection
(NOTE: there should not be space in word "Collection", I don't know why this forum editor is inserting it there)

{url} - url for computer that will be running UDraftBot
{port} - any free port that UDraftBot will be listening at

DraftPack - event needed to get cards list during draft
DraftCardPicked - event needed to get information about card picked
SaveDeck - event needed if you want to use "Test save deck Hex event"
Collection - event needed for bot logic to get know when draft phase ended (it is not optimal, but rigth now it is the only way of getting informatin when it ended)

E.g. if You run UDraftBot at the same computer as Hex client and have free 7777 port it would be:

http://localhost:7777|DraftPack|DraftCardPicked|SaveDeck| Collection

If You have Your Hex client synchronized with hex.tcgbrowser.com (http://hex.tcgbrowser.com/tools/sync/) and don't want to lose it, You can add both links in same api.ini file, each in new line.



Run UDraftBot and insert connection data
3428
Server hostname - hostname of stream chat (for Twitch insert "irc.twitch.tv")
Server port - port of stream chat (for Twitch insert "6667")
Bot name - name of bot sending information to stream chat
Server password - oauth password to bot account (NOT stream channel password). You can get oauth password from this site (http://www.twitchapps.com/tmi/).
Channel - name of stream channel (Note: all Twitch channels are lowercase)
Hex listener port - port that we inserted in Hex config.ini

4 additional checkboxes are not needed to connect (and by default they are not selected):

Does bot account have a mod? checkbox - change minimum delay between messages (1.5 second for not modded - which allows for displaying messages without problems).

Use custom html draft panel checkbox - selecting checkbox will change hex draft panel view to custum "data/DraftPanel.html" HTML page. Bot will try to replace keywords inserted into html with proper values. This allows for creating fully custom way of displaying votes and currently winning card.

Enable test draw command checkbox - enables command "!udraft test" which will display in stream chat test card list and will randomly put 100 votes (Recommended to run it set up stream overlay or show viewers how this is working)

Enable test save deck Hex event checkbox - enables listening for Hex client save deck event. When event occures, bot will send to stream chat message "You just saved the deck {deck_name}" (Recommended to run it during first connection to check if bot is correcly connected with Hex client)


NOTE: If You are using any other bots, You can try to connect both of them on same account, but there is a chance that they will be in conflict. Thats why I recommend creating separate account (modded in channel) for this bot.


After pressing "Connect" button, if everything was inserted correctly, at the bottom should appear 2 green lines informing us about successful connecting
3429
Now only thing left is to press "Start listening to draft" button, start draft and results of viewers voting will be shown in second tab ("Hex draft").


List of available commands
Commands are not case sensitive.

!pick {index} - votes for card with specific index from current cards list
!pick {name} - votes for card with specific name from current cards list
!pick random - votes for random card from current cards list
!card {index} - displays in chat link to image of card with specific index from current cards list
!card {name} - displays in chat link to image of card with specific name, not only from current card list (name of card IS case sensitive)
!udraft help - displays in chat basic help message
!udraft about - displays in chat basic about message
!udraft commands - displays in chat list of available commands
!udraft test - displays in chat test list of cards (available only if "Enable test draw command checkbox" is selected)
!udraft test populate - displays in chat test list of cards and puts randomly 10 votes (available only if "Enable test draw command checkbox" is selected)



List of available keywords in custom HTML5 draft panel view:

{number_of_votes} - number of all votes.
{currently_winning_card_name} - currently winning card name.
{currently_winning_card_src} - base64 image of currently winning card (or "images/load_failed.png" image in case of failed loading of image 3 times in row).
{card_N_visibility} (e.g. {card_1_visibility}) - state "visible" if Nth card from list (sorted by votes previously) is existing and have more then 0 votes, state "hidden" otherwise.
{card_N_name} (e.g. {card_1_name}) - name of Nth card from list (sorted by votes previously).
{card_N_number_of_votes} (e.g. {card_1_number_of_votes}) - number of Nth card's votes from list (sorted by votes previously).
{card_N_votes_bar_width} (e.g. {card_1_votes_bar_width}) - percentage width of Nth card's bar from list (sorted by votes previously), quotient of Nth card's votes and most votes per single card.



UDraft Bot 1.9.3 changes (http://forums.cryptozoic.com/showthread.php?t=43201&page=6&p=488257&viewfull=1#post488257) - list of changes in 1.9.3 version of bot.
UDraft Bot 1.9.4 changes (http://forums.cryptozoic.com/showthread.php?t=43201&page=7&p=488505&viewfull=1#post488505) - list of changes in 1.9.4 version of bot.
UDraft Bot 2.0.2 changes (http://forums.cryptozoic.com/showthread.php?t=43201&page=7&p=494850&viewfull=1#post494850) - list of changes in 2.0.2 version of bot.
UDraft Bot 2.0.3 changes (http://forums.cryptozoic.com/showthread.php?t=43201&page=8&p=516388&viewfull=1#post516388) - list of changes in 2.0.3 version of bot.



If you have any questions or feedback, please feel free to share it :)
In case of any errors UDraftBot should create "udraftbot.log" file in same folder as bot, if You send it to me, I'll try to fix error as soon as possible :)


For anyone curious or uncertain of download file: source code of UDraftBot is available here (https://github.com/Risterral/udraftbot).

MasterN64
05-20-2015, 05:53 AM
This is amazing

bootlace
05-20-2015, 06:05 AM
This is amazing

Scammanator
05-20-2015, 06:30 AM
This is amazing

Hatts
05-20-2015, 06:32 AM
This is amazing

vickrpg
05-20-2015, 06:32 AM
Amazing, this is.

Xenavire
05-20-2015, 06:32 AM
<_<
>_>
<_<
C-c-c-... No, actually this is pretty damn amazing.

kaiizza
05-20-2015, 06:33 AM
This is amazing

Kami
05-20-2015, 06:35 AM
Apple pie. (For the uninitiated, that means this is amazing.)

Xenavire
05-20-2015, 06:39 AM
Apple pie. (For the uninitiated, that means this is amazing.)

Stop giving me cravings! *cries*

Cirouss
05-20-2015, 06:49 AM
I agree it is amazing and a lot of fun ;)

Tazelbain
05-20-2015, 07:09 AM
Man this is great. To take this to the next level, if it was tied to some something like hex.tcgbrowser.com, people could see the pack contents without twitch delay.

Risterral
05-20-2015, 07:41 AM
Thanks guys, I really appreciate it :)

I added in first post example how to have both UDraftBot and hex.tcgbrowser.com sync available at once and I added source code of UDraftBot.

Jeevus
05-20-2015, 07:50 AM
I thought god didn't exist. But here you are! That tool is a-fkin-mazing.

Thanks alot and keep up the awesomeness ;)

KingGabriel
05-20-2015, 07:54 AM
!Anarchy

havocattack
05-20-2015, 07:56 AM
Very cool :)

wolzarg
05-20-2015, 08:13 AM
I see only good things from this three thumbs up!

Scammanator
05-20-2015, 08:22 AM
We must consult Lord Helix!


http://www.hexprimal.com/wp-content/uploads/masterypic.jpg

N3rd4Christ
05-20-2015, 08:39 AM
Awe-maze-ing

RamzaBehoulve
05-20-2015, 08:39 AM
Really nice and interesting. This is going to be fun and very entertaining. It's probably going to be an amazing teaching tool for newcomers as well.

N3rd4Christ
05-20-2015, 08:45 AM
We must consult Lord Helix!


http://www.hexprimal.com/wp-content/uploads/masterypic.jpg

No... That will make the Yeti Mad.

You don't wanna make the Yeti mad.... Never!

Tazelbain
05-20-2015, 09:02 AM
Really nice and interesting. This is going to be fun and very entertaining. It's probably going to be an amazing teaching tool for newcomers as well.Watching Alucards test run, it felt like it was too fanatic for new players. And the crowd doesn't explain the "why" of the card choice which is super important for new players.

Saeijou
05-20-2015, 09:40 AM
Very nice! Thanks for the effort :)

kaiizza
05-20-2015, 10:11 AM
Watching Alucards test run, it felt like it was too fanatic for new players. And the crowd doesn't explain the "why" of the card choice which is super important for new players.

I am responding to your first post. It is done in twitch chat so that there is no delay. The streamer can also see twitch chat so can pick cards as needed with out having to worry about the 20-25 sec delay.

Tazelbain
05-20-2015, 10:25 AM
Ya, but for people have don't have all the card memorized seeing the actual cards helps and streamers zooming on every card so it can be read is impractical.

Warrender
05-20-2015, 11:04 AM
Draft all teh Baby Yetis!!!!!11

Tazelbain
05-20-2015, 11:09 AM
Countdown to the first grief draft.... Neo was fun to grief in Choice Chamber....

Alucard
05-20-2015, 11:11 AM
+1 for AMAZING!!!! Great job Risterral! I had a blast running this and I know a lot of people had a ton of fun with it.

I agree that this tool is not necessarily meant to teach players each and every card in the game. I think that's impractical. Even casting a draft without the bot, there is no way I can review every single card. In general, it takes everyone time to ramp on card knowledge. And each time a new player watches one of these drafts or other formats, it can help in some way.

Now what I try to do to improve the new player experience is to highlight strong cards in the pack and go through my decision making process based on those cards and people can understand my personal opinions on what cards I have eliminated from selection and what cards I am still considering.

I think based on the what the crowd picks, a streamer can try to interpret what the crowd is thinking and convey that. If the crowd does not feel like the streamer is interpreting correctly, they can speak up in Twitch chat. That's the beauty of Twitch - it is a live experience where we can freely discuss things in real time. I don't think I necessarily did a great job of providing that sort of commentary in the first draft that I used the bot in last night, but I think there's potential.

Also, as a caster, it would be interesting to hear your opinions on if I should inject my opinion on cards. I feel like I highlighted those strong cards and that may have made certain viewers lean towards choosing one card over another.

I would encourage any feedback that you guys have to improve the experience for everyone. One of the big things we discussed during the stream last night was to add a number on the screen (1, 2, 3, ... , 14, 15) near every card so it's easy to recognize what cards to pick. That's an easy fix and I will prepare that for future streams.

It was really an experience like no other and I do plan to continue using the bot! I hope others can have a lot of fun with it too! Risterral, thanks again for creating an awesome new experience for the community!

Risterral
05-20-2015, 11:17 AM
Ya, but for people have don't have all the card memorized seeing the actual cards helps and streamers zooming on every card so it can be read is impractical.
In cases like this, bot has implemented "!card" command that displays link to image of card.
But overall, yes, because of that this is all in text form in chat, it is for people that know more less cards. And streamer can comment viewers picks / posibilities aswell.

UDraftBot was created not for replacing all current streamed drafts - because I agree, this would be painful to newcomers, but to present "something else" once a while :)

NOBLERoostasaur
05-20-2015, 11:27 AM
If no one mentioned it this is amazing. Can't wait to see it in action.

KingGabriel
05-20-2015, 11:29 AM
If no one mentioned it this is amazing. Can't wait to see it in action.
I agree, weird that noone has brought that up. This is amazing.

MasterN64
05-20-2015, 11:34 AM
I have unleashed something terrible upon this thread.

ossuary
05-20-2015, 11:38 AM
I can't help but feel ashamed of this community, since NOBODY has stepped up to say what a great and interesting tool this is. Amazing!

szimek
05-20-2015, 11:54 AM
Awesome
Magnificent
Astonishing
Zazzy
Impressive
Neat
Great

ShayJawn
05-20-2015, 12:10 PM
wow good job!
edit: forgot to tell you how amazing it is.

Saeijou
05-20-2015, 01:09 PM
I have unleashed something terrible upon this thread.

if you switch 7 letters in "terrible" and shorten it by one you get "amazing"! coincidence? i think not!

Zophie
05-20-2015, 02:10 PM
You know what else is amazing?

http://i.imgur.com/4VJKhEXm.jpg

Errantsquire
05-20-2015, 04:19 PM
If you roll shadow priest you'll melt faces.....

sorry wrong forum I mean... errr this is amazing.... he he heh....

OutlandishMatt
05-20-2015, 08:14 PM
I'll be that guy. Eh. I'm semi impressed. I came here hoping for something like Twitch Plays so I could setup a 24-7 automated Hex client for viewers and I see it's not automated. Sad panda.

RCDv57
05-21-2015, 05:36 AM
([atk] '.')[def]

temporicide
05-21-2015, 07:17 AM
I'm not sure, guys. Is this amazing?

start9

Thepsis
05-21-2015, 09:27 AM
probably amazing!

Tazelbain
05-21-2015, 09:30 AM
I'll be that guy. Eh. I'm semi impressed. I came here hoping for something like Twitch Plays so I could setup a 24-7 automated Hex client for viewers and I see it's not automated. Sad panda.That's an interesting point. It would be truly AMAZING, if goldfish could play it.

Saeijou
05-21-2015, 09:40 AM
That's an interesting point. It would be truly AMAZING, if goldfish could play it.

WOuld be an exploit... the account would be banned :D

Gwaer
05-21-2015, 11:58 AM
As long as the goldfish has its own account...

Saeijou
05-21-2015, 12:39 PM
As long as the goldfish has its own account...

i bet it's against TOS in more than one way... although it has it's own account

Tazelbain
05-21-2015, 01:28 PM
Can we get official confirmation that HexEnt discriminates against Aquatic-Americans?

Chris_Woods
05-22-2015, 11:01 AM
Hey all,

watched some of the streams with this; no one seems to have mentioned it, but this tool is amazing.

One thing to know for streamers, if you single-click on a card in draft (so it's highlighted) that card *will be the card picked* when time runs out, so you can just click on whatever is winning to let the vote run to the last second.

Chris Woods

KingGabriel
05-22-2015, 11:22 AM
Hey all,

watched some of the streams with this; no one seems to have mentioned it, but this tool is amazing.

One thing to know for streamers, if you single-click on a card in draft (so it's highlighted) that card *will be the card picked* when time runs out, so you can just click on whatever is winning to let the vote run to the last second.

Chris Woods

Yeah, now that someone official mentions it, I can see that this tool is amazing.

NOBLEStarshield
05-22-2015, 01:20 PM
I would like to chime in here and say this is amazing. Since nobody else seems to have said so yet. :D

Zophie
05-22-2015, 01:27 PM
http://i.imgur.com/rlLCHP6.gif

NOBLERoostasaur
05-22-2015, 01:33 PM
Zophie wins the HEX forums.

KingGabriel
05-22-2015, 01:38 PM
Zophie wins the HEX forums.
Wow, what a prize! That's amazing.

TheMotivation
05-22-2015, 06:39 PM
Awesome stuff Risterral, thanks for making this public. I do have a suggestion, but not exact details on it. Background/text color. I just finished setting up and doing screen captures for both the card and polls and then tried to chroma key. For the card it worked well enough (it took away some of the card text but I turned the similarity to 0 and it was fine), but for the poll, chroma key affected the text too much to be readable. As ugly as it'd be, maybe change the Hex Draft tab background color to a bright green and the poll bars to a different color? I'm not sure what would work best, probably something you'd have to toy with a bit.

Other than that, great stuff man, I haven't used it in an actual draft, but I'm excited to. Thanks again for this!

Xenavire
05-22-2015, 07:15 PM
Wow, what a prize! That's amazing.

Nah, its just me talking to myself on 100 other accounts. There really isn't anyone else here, so Zophie basically just wins me.

Still a great prize ;)

MarS
05-23-2015, 01:21 AM
awesome, now i remember twitchplayspokemon.

Risterral
05-24-2015, 05:11 PM
Thank you guys :)
You are so amazing, that I created new version of UDraft Bot for you, I hope you will like it :)

UDraft Bot 1.9.3 (http://s000.tinyupload.com/index.php?file_id=04346266880332129334) - 2 MB zip file (had to change to zip, because now it is containing additional files like images and html)


Changes:


Added optional parameter [populate] to "!udraft test" command.
- !udraft test - displays in chat test list of cards 15 cards (1 not existing),
- !udraft test populate - displays in chat test list of 15 cards (1 not existing) and puts randomly 10 votes,
Both of thoose actions requires selected checkbox "Enable test draw command checkbox".



Added command "!pick random" - votes for random card from current cards list.



Added support for not modded accounts used by bot.
By changing "Does bot account have a mod?" checkbox - we can set minimum delay between messages (1.5 second for not modded - which allows for displaying messages without problems).



Added buttons "Start listening to draft" and "Stop listening to draft".
Without pressing "Strat listening to draft" bot will not be processing draft events from Hex client. This allows to run a bot and use commands like "!card {name}" without asking for votes while playing draft.



Added check version at start - now at start, bot will check version and in case of being outdated will post information and clickable link to new version source.



Moved loading images to parrarel threads. Now loading images should not block voting and displaying votes.
While loading, "images/image_loading.gif" image will be dispalyed. (Image can be switched manualy)
Every image have 3 tries for loading, after this "images/load_failed.png" image will be displayed instead. (Image can be switched manualy, but recommended is image with the same dimensions)



Fixed image urls in "!card" command in card's names containing special characters (e.g. "Construction Plans: Hornet Bot").



Added support for custom drafts panel view.
By selecting "Use custon html draft panel" checkbox, on Hex draft tab "data/DraftPanel.html" HTML5 page will be displayed instead of default view. Bot will try to replace keywords inserted into html with proper values. This allows for creating fully custom way of displaying votes and currently winning card.

Possible keywords:
- {number_of_votes} - number of all votes.
- {currently_winning_card_name} - currently winning card name.
- {currently_winning_card_src} - base64 image of currently winning card (or "images/load_failed.png" image in case of failed loading of image 3 times in row).
- {card_N_visibility} (e.g. {card_1_visibility}) - state "visible" if Nth card from list (sorted by votes previously) is existing and have more then 0 votes, state "hidden" otherwise.
- {card_N_name} (e.g. {card_1_name}) - name of Nth card from list (sorted by votes previously).
- {card_N_number_of_votes} (e.g. {card_1_number_of_votes}) - number of Nth card's votes from list (sorted by votes previously).
- {card_N_votes_bar_width} (e.g. {card_1_votes_bar_width}) - percentage width of Nth card's bar from list (sorted by votes previously), quotient of Nth card's votes and most votes per single card.

There is example "data/DraftPanel.html" HTML5 page in download file.
Bot is able to switch between default and custom draft panel view on the fly.



Moved UdraftConfig.cfg file to "data/UdraftConfig.cfg".




As always, if you have any questions or feedback, please feel free to share it :)

OutlandishMatt
05-24-2015, 07:57 PM
This is what I was wanting to have: http://www.gamespot.com/articles/hearthstone-follows-the-twitch-plays-pokemon-model-in-hearthmind/1100-6419272/

I can't find videos but basically people got to play it.

Cirouss
05-25-2015, 05:20 AM
Downloaded! Thanks mate, good job! =)

TheMotivation
05-25-2015, 02:00 PM
Still trying to figure out how to Chroma out the background. I've messed with the HTML and gone with a teal color for the background and it seems to be the least intrusive when adjusting Similarity on the cards. As for the polls, that's where I'm still having issues. I made the bars a hot pink and removed their border and can adjust the similarity enough to remove all the teal background, but the text is where I'm having issues, similarity just removes too much of the text so it's not viewable. I'm not terribly knowledgeable with HTML so I'm really not sure what the solution here is. Here's what it's looking like so far:

http://imgur.com/fp8jhrF

Risterral
05-25-2015, 03:03 PM
UDraft Bot 1.9.4 (http://s000.tinyupload.com/index.php?file_id=61662365325519027875) - 2 MB zip file (had to change to zip, because now it is containing additional files like images and html)
UDraftBot.cfg from 1.9.3 will work here - Just copy it to data folder from 1.9.4 version.

Changes:


Added saving window width, height and last position - during the first run it will appear in center of main monitor, as in prevoius versions.




Still trying to figure out how to Chroma out the background. I've messed with the HTML and gone with a teal color for the background and it seems to be the least intrusive when adjusting Similarity on the cards. As for the polls, that's where I'm still having issues. I made the bars a hot pink and removed their border and can adjust the similarity enough to remove all the teal background, but the text is where I'm having issues, similarity just removes too much of the text so it's not viewable. I'm not terribly knowledgeable with HTML so I'm really not sure what the solution here is. Here's what it's looking like so far:

http://imgur.com/fp8jhrF
Hmm... did You try to change font familiy? Mayby this particular font family have so big problems with Chroma.

Sithos
05-25-2015, 06:31 PM
If anyone is interesting in seeing it I got to use the UDraft Bot today (version 1.8) and had a blast!

Check it out here: https://www.youtube.com/watch?v=4_k1QwmvFQU

Trynyty
06-04-2015, 04:20 PM
I had issues with the bot, and InfamousNeo was gracious enough to help me fix it.

Here is what we did:

Step 1: Create a second Twitch account to be the bot. Name the bot the secondary Twitch name.
Step 2: Authorize your second Twitch account to be the stream password key. Use this link: http://www.twitchapps.com/tmi/
Step 3: Cut n paste (using Control+V) the ENTIRE string into your password space in the bot.
Step 4: Profit.

Port forwarding: You shouldn't have a lot of errors with this, but my son had to help me set up port forwarding on the computer. If you're young, you probably already know how to do this. 4#@$#ing teenagers. I had to help my parents set up the VCRs. Ah, times are a-changing.

If you need any help, message me ingame at DofaDofaLand.

KingGabriel
06-05-2015, 12:25 AM
If you need any help, message me ingame at DofaDofaLand.

Might want to put your IGN in your signature.

Risterral
06-11-2015, 04:07 PM
New major version of bot, with a lot of new features, so wall-of-text incoming, be warned :)

UDraft Bot 2.0.2 (http://s000.tinyupload.com/index.php?file_id=09798296890396617492) - 3.2 MB zip file (had to change to zip, because now it is containing additional files like images and html)


Changes:


Added !costs command.
This command displays in chat list of picked cards costs from current draft (sorted ascending).

Risterral: !costs
ristutbot: Number of 1 cost cards: 1
ristutbot: Number of 2 cost cards: 2
ristutbot: Number of 3 cost cards: 3
ristutbot: Number of 4 cost cards: 2
ristutbot: Number of 6 cost cards: 2



Added !ratios command.
This command displays in chat list of picked cards types from current draft.

Risterral: !ratios
ristutbot: Troop: 4
ristutbot: QuickAction: 3
ristutbot: Constant: 2
ristutbot: Artifact: 1



Added !thresholds command.
This command displays in chat list of picked cards thresholds from current draft (sorted descending).

Risterral: !thresholds
ristutbot: Ruby - 40% - 2.0 / 3 (average / max)
ristutbot: Wild - 27% - 2.0 / 2 (average / max)
ristutbot: Sapphire - 7% - 1.0 / 1 (average / max)



Added !price command.
By typing in !price {card_name} in chat will be displayed value in platinum and gold of given card.
There is also possibility to type in !price {card_index}, where {card_index} is index of card from current cards list.

Risterral: !price 7
ristutbot: Wrathwood Master Moss value: 1242 platinum or 159548 gold
Risterral: !price Baby Yeti
ristutbot: Baby Yeti value: 4 platinum or 144 gold



Added !udraft giveaway command.
This command displays in chat (if giveaways are enabled) number of unlocked giveaways from current draft. It also displays the nearest giveaway and how much votes are needed for chance to unlock it.
More about giveaways is in next "giveaway" section

Risterral: !udraft giveaway
ristutbot: Number of giveaways unlocked so far: 1
ristutbot: The nearest giveaway is Zakiir giveaway. You need 100 more votes for chance to unlock it!



Changed !udraft commands command.
Now it displays in chat all currently enabled commands with description.

Risterral: !udraft commands
ristutbot: List of allowed commands:
ristutbot: !pick - Use command !pick {index} or !pick {name} or !pick [random] to vote for a card
ristutbot: !card - Use command !card {index} or !card {name} to check a card details
ristutbot: !udraft help - Use this command to display basic bot help
ristutbot: !udraft about - Use this command to display basic bot about message
ristutbot: !udraft commands - Use this command to display bot commands



Added "big red warning" to draft panel when "Start listening to draft" button is not pressed.



Added "Commands" tab.
It shows all commands with description in table. This panel also allows to enable or disable any command on the fly.
3532



Added "Aliases" tab.
This panel allows to add aliases for card names. Aliases are applied to any command with {card_name}.
E.g. if we add "Dragons are awesome!!" in pattern column and "Zakiir" in value column, when someone will type in !pick Dragons are awesome!! bot will try to pick "Zakiir" card instead of "Dragons are awesome!!" card. (This also applies to !card and !price commands)
Aliases give possibility to add plain patterns or regular expressions (http://en.wikipedia.org/wiki/Regular_expression). To add regular expression pattern, start pattern with "REGEXP=" (e.g. "REGEXP=^TREE+$").
This panel also allows add new / remove / enable / disable any alias on the fly.
3533



Added "Giveaways" tab.
This panel allows to add "unlockable giveaways".
E.g. we can add Zakiir giveaway, that has chance 10% to being unlocked after 100 votes. When people will vote for at least 100 cards, bot "will roll" if giveaway is unlocked. If its successfully unlocked, customizable message is displayed in chat, informing people about it. After draft end / during draft breaks streamer can see what giveaways where successfully unlocked and do them.

Successful giveaway message can contain placeholders like:
- {giveaway_name} - parameter replaced with giveaway name value.
- {giveaway_chance} - parameter replaced with giveaway chance value.
- {giveaway_minimum_number_of_votes} - parameter replaced with giveaway minimum number of votes value.

Giveaway table contains 6 editable columns + remove giveaway button column:
- Giveaway name - name of the giveaway
- Chance to unlock [0-100] - percentage chance of unlocking giveaway. Possible values to insert are float values from 0 to 100.
- Number of votes to unlock - number of votes needed for bot to "roll" for a giveaway. Possible values to inser
- Recurring - should bot "roll" for a giveaway for every, specified number of votes or just only once.
- Remove after unlocking - should bot remove giveaway form table after successful unlocking.
- Enabled - is specific giveaway enabled.

This panel also allows add new / remove / enable / disable any giveaways on the fly.
3534



Added "Draft results" tab.
This panel displays number of all votes from current draft, the most popular card (name, number of votes and image) and if giveaways are enabled, unlocked giveaways (green for successful and red for unsuccessful)
3535



Added "draggable" functionality to all tabs.
By dragging tabs can be reordered now. Also if drag out of window, tab will pop out in form of new window. After closing popup window, it will return as tab in last spot. Closing main window close every popup window also.
Popup windows are "remembering" itself position, so after restarting bot, position, width and height of all windows should be the same as before closing.
3536



Changed default window with to 900px and height to 650px.



Fixed bug with displaying "To the skies!" card image.



Fixed bug with checking bot version while not having established internet connection.



Improved error messages while connecting to stream chat and fixed reconnecting bug.




As always, if you have any questions or feedback, please feel free to share it :)

KingGabriel
06-11-2015, 10:52 PM
That new update is amazing.

Reckless
06-11-2015, 11:23 PM
this is amazing!

Stok3d
06-12-2015, 02:58 PM
wow... just WOW!

ossuary
06-12-2015, 04:09 PM
Holy crap... Risterral, that's incredible. What an amazing update!

Quick question: does the bot keep track only of the chat's picks, or does it capture it if the streamer decides to "veto" what chat picked and choose a different card instead in the actual draft? This would be relevant for using commands like !costs.

Risterral
06-12-2015, 04:52 PM
Quick question: does the bot keep track only of the chat's picks, or does it capture it if the streamer decides to "veto" what chat picked and choose a different card instead in the actual draft? This would be relevant for using commands like !costs.
Bot keep track of both votes and cards picked by a streamer. Votes keeping is used for giveaways and draft result statistics.
For commands !costs, !ratios and !thresholds bot is displaying data form cards picked by a streamer. So if streamer decide to "veto" chat votes, !costs command will be still showing correct draft acquired cards state :)

Gwaer
06-12-2015, 04:54 PM
Sigh. I'm gonna have to start playing with this on stream. Super neat.

ossuary
06-12-2015, 07:27 PM
Bot keep track of both votes and cards picked by a streamer. Votes keeping is used for giveaways and draft result statistics.
For commands !costs, !ratios and !thresholds bot is displaying data form cards picked by a streamer. So if streamer decide to "veto" chat votes, !costs command will be still showing correct draft acquired cards state :)

You are an amazing dude slash genius. :)

nutcaseart
07-15-2015, 02:06 PM
I'd really love to get this set up and running.
I have an idea for streaming this too!

Risterral
08-07-2015, 03:40 PM
New version of bot, updated to newest version of Hex API

UDraft Bot 2.0.3 (http://s000.tinyupload.com/index.php?file_id=08056899182975122211) - 3.8 MB zip file

With AoM release, setting up API has changed. Now in order to set up API, you have to create api.ini file (here (https://github.com/dylannorthrup/hexapidocs/blob/master/01_Setting_Up_The_API.md) is link with help how and where create api.ini file) and add in it new line:
http://{url}:{port}|DraftPack|DraftCardPicked|SaveDeck|Co llection
(NOTE: there should not be space in word "Collection", I don't know why this forum editor is inserting it there)

{url} - url for computer that will be running UDraftBot
{port} - any free port that UDraftBot will be listening at

DraftPack - event needed to get cards list during draft
DraftCardPicked - event needed to get information about card picked
SaveDeck - event needed if you want to use "Test save deck Hex event"
Collection - event needed for bot logic to get know when draft phase ended (it is not optimal, but rigth now it is the only way of getting informatin when it ended)

Example new line:

http://localhost:7777|DraftPack|DraftCardPicked|SaveDeck| Collection


As always, if you have any questions or feedback, please feel free to share it :)

ksetrat
08-07-2015, 04:25 PM
http://giant.gfycat.com/UnitedImpureAlaskajingle.gif

My reaction reading over some of the stuff in the first post.

going by a lot of the reactions for this...
http://imgur.com/JVVGEH5

however, i still am not sure how twitch works...
http://imgur.com/2Qfi1IN

all of that said. Awesome! Kudos for a job well done that is appreciated by many!