Cube Tool Cube Utility - Cloudshift Beta 1.0

Aoret

Developer
What Is Cloudshift?
Cloudshift is a utility for use when doing online cube drafts with the RiptideLab account. Actually, it works for any do-it-yourself cube on modo, just with a bit more work. I'll keep this brief and let you check out the site itself and the demo video!

You can use a shitty beta version of my Cloudshift utility at:
https://cloudshift.firebaseapp.com/

Video Tutorial
http://www.twitch.tv/aoret/v/26060093

Known Issues
  • At the moment it doesn't gracefully handle the case where you have more than one printing of a card. For example, the RiptideLab account currently has 3 different printings of Brainstorm. If I run a deck with 2 brainstorms through Cloudshift, it'll suggest one of the printings and try to give me two copies of it. This is obviously problematic, so Jason is gonna try to just standardize the account. If we're not able to do that, I'm sure I can solve it algorithmically, it's just a bit of a headache.
  • No error handling whatsoever. If you give it something bad, it's gonna just not work and probably not even tell you that it failed.
  • Ugly UI. Sorry.
Text Guide
uh, maybe I'll do this if people want one?
 

Laz

Developer
Looks like it actually behaves differently to how you described for the Brainstorm example.

Input:
Code:
1 Brainstorm

Output:
Code:
Card Name,Quantity,ID #,Rarity,Set,Collector #,Premium,
"Brainstorm",1,53117,Common,VMA,58/325,No
"Brainstorm",1,30394,Common,ME2,42/245,No
"Brainstorm",1,13157,Common,MM,61/350,No

Looks like it is trying to give me lots of them...

Still awesome work, and nice video skills. Now I have seen this, I think I was really over-thinking the problem. I was considering looking into what made the MTGO tradebots tick...
 

Aoret

Developer
Looks like it actually behaves differently to how you described for the Brainstorm example.

Ahhh interesting! Yeah, the matching is super naive. I'm basically just doing a bunch of super inefficient underscore/lodash operations on the two sets. And then some string manipulation to coerce stuff into the right formats for input/output.

It's definitely solveable, but I'm not sure if it's worth the time since we can just standardize the collection and spend the dev time on other hot shit features. If any of the Riptide devs are interested I can throw the project on github or something. The code is kind of a hot mess since I was using this as an excuse to school up Meteor-React.
 

Kirblinx

Developer
Staff member
So I just did a quick search of all the duplicates in Jason's cube so:
Code:
2 Champion of the Parish
2 Steppe Lynx
2 Day of Judgment
2 Delver of Secrets
5 Brainstorm
2 Bloodsoaked Champion
2 Carrion Feeder
2 Gravecrawler
3 Birthing Pod
2 Arid Mesa
3 Bloodstained Mire
3 Flooded Strand
2 Marsh Flats
2 Misty Rainforest
3 Polluted Delta
2 Scalding Tarn
2 Verdant Catacombs
3 Strip Mine
3 Windswept Heath
3 Wooded Foothills

The output ended up as:
Code:
Card Name,Quantity,ID #,Rarity,Set,Collector #,Premium,
"Arid Mesa",2,34414,Rare,ZEN,211/249,No
"Bloodstained Mire",3,54198,Rare,KTK,230/269,No
"Flooded Strand",3,54194,Rare,KTK,233/269,No
"Marsh Flats",2,34646,Rare,ZEN,219/249,No
"Misty Rainforest",2,34622,Rare,ZEN,220/249,No
"Polluted Delta",3,54196,Rare,KTK,239/269,No
"Scalding Tarn",2,34590,Rare,ZEN,223/249,No
"Strip Mine",3,52853,Rare,VMA,316/325,No
"Verdant Catacombs",2,34705,Rare,ZEN,229/249,Yes
"Verdant Catacombs",2,34704,Rare,ZEN,229/249,No
"Windswept Heath",3,54202,Rare,KTK,248/269,No
"Wooded Foothills",3,54200,Rare,KTK,249/269,No
"Champion of the Parish",2,42828,Rare,ISD,6/264,No
"Steppe Lynx",2,34384,Common,ZEN,36/249,No
"Brainstorm",5,53117,Common,VMA,58/325,No
"Brainstorm",5,30394,Common,ME2,42/245,No
"Brainstorm",5,13157,Common,MM,61/350,No
"Delver of Secrets",2,42436,Common,ISD,51/264,No
"Bloodsoaked Champion",2,54172,Rare,KTK,66/269,No
"Carrion Feeder",2,36264,Common,PRM,237/1158,No
"Carrion Feeder",2,18680,Common,SCG,59/143,No
"Gravecrawler",2,43175,Rare,DKA,64/158,No
"Day of Judgment",2,41259,Rare,M12,12/249,No
"Day of Judgment",2,37288,Rare,M11,12/249,No
"Birthing Pod",3,39796,Rare,NPH,104/175,No

So I guess the card that need to be standardised are:
Verdant Catacombs (I hope you borrowed that foil)
Brainstorm (Pick which art you like the best; VMA one is cheap for a reason)
Carrion Feeder
Day of Judgment

Not too much of an issue except for that Catacombs.

Also, I want to know how many takes it took to get that video the way you wanted. Very well done.

Edit:
We should also probably add somewhere in a guide to add the ULD cards to the bottom of the list before you cloudshift. I know common sense usually prevails but you never know...
 

Aoret

Developer
Also, I want to know how many takes it took to get that video the way you wanted. Very well done.

Edit:
We should also probably add somewhere in a guide to add the ULD cards to the bottom of the list before you cloudshift. I know common sense usually prevails but you never know...

Two takes. First take I tried to demonstrate the bug rather than describe it, but was unable to because my collection doesn't have old enough cards. I also made it worse by cloudshifting it since I caused a bug with some basic lands (which I do have multiples of from various sets). Second take I stripped out the problematic cards and just talked through the bug. A bit of smoke and mirrors but I wanted it to show well and didn't have access to the main account at that point.

As for ULD, yeah, I should do a quick blurb on that. The only trick to it is if you pick duplicates, say 2 tec edges (like I did in our draft), you need to enter it as "2 Tectonic Edge" and not
"1 Tectonic Edge
1 Tectonic Edge"

It might work either way but I know that the single line formatting works.
 

Jason Waddell

Administrator
Staff member
I picked up the necessary cards. Will export you an updated list of contents later tonight. (after I offload the duplicates)
 

Aoret

Developer
I picked up the necessary cards. Will export you an updated list of contents later tonight. (after I offload the duplicates)
Right on. I'll get cloudshift updated tonight and think through a convenient way for people who aren't me to be able to do it in the future. I'm sure it'll come up a lot
 

Jason Waddell

Administrator
Staff member
Is there possibly a bug where it takes all copies of a card, even if you drafted just one? It seems like something is wonky in the quantity column.
 

Aoret

Developer
Per Laz' post, I know that it exhibits that behavior when you have multiple versions of a card. It shouldn't be doing that for cards you have only one printing of though. If you can give me a concrete example of a problematic input I'm happy to hop on and fix it when I'm home from work (about 5 and a half hours from now)
 

Jason Waddell

Administrator
Staff member
Per Laz' post, I know that it exhibits that behavior when you have multiple versions of a card. It shouldn't be doing that for cards you have only one printing of though. If you can give me a concrete example of a problematic input I'm happy to hop on and fix it when I'm home from work (about 5 and a half hours from now)

Somehow James ended up with 3 Brainstorms, despite only drafting one. Not sure what happened. We were using the old list though, I'll send you the new versions by email.
 

Aoret

Developer
Somehow James ended up with 3 Brainstorms, despite only drafting one. Not sure what happened. We were using the old list though, I'll send you the new versions by email.
Yup, that one is a known issue. Basically it's just doing
Code:
_.filter(riptideCollection, function(collectionItem){
return deck.contains(collectionItem)
}
(pseudocode)

and then generating output based on that. So it'll iterate through the RL collection, see the first brainstorm, say "yep, this is in your list! better add it!" and then do the same for all subsequent printings. Then when it goes to spit out the CSV and tack on quantities, it tacks on the quantity of brainstorms you drafted onto each printing of brainstorm in your collection. Had James drafted two, it would've tried to give him six.

If it becomes unmanagable to keep versions clean I'll just have to make the algorithm smarter/more inefficient. I figure either way it's still less work with cloudshift than it is without it, even if we have the collection not 100% clean
 

Jason Waddell

Administrator
Staff member
Yup, that one is a known issue. Basically it's just doing
Code:
_.filter(riptideCollection, function(collectionItem){
return deck.contains(collectionItem)
}
(pseudocode)

and then generating output based on that. So it'll iterate through the RL collection, see the first brainstorm, say "yep, this is in your list! better add it!" and then do the same for all subsequent printings. Then when it goes to spit out the CSV and tack on quantities, it tacks on the quantity of brainstorms you drafted onto each printing of brainstorm in your collection. Had James drafted two, it would've tried to give him six.

If it becomes unmanagable to keep versions clean I'll just have to make the algorithm smarter/more inefficient. I figure either way it's still less work with cloudshift than it is without it, even if we have the collection not 100% clean

Account should be clean now, sent you an email with the updated contents.
 

Aoret

Developer
Updated and tested. Confirmed the brainstorm case in particular as working. Please lmk if you find any issues!

Also, it turns out you don't need to delete 'Sideboard' from your input. It works just fine with it in there.
 

Jason Waddell

Administrator
Staff member
Also, from having done this with James, I think a text guide would be super useful. From what I understand, the steps are:

1) Drafter passes list through cloudshift and saves to .csv
1b) Drafter sends list to host
2) Host imports cloudshifted .csv as a trade binder
3) Trade

then, on the return leg.
1) Drafter imports cloudshifted .csv as a trade binder
2) Trade

That cover it?
 

Aoret

Developer
Sounds correct to me. The only other steps would be

0.5a) Drafter drafts their deck on draft.wtf
0.5b) Drafter drafts their ULD in google docs
0.5c) Drafter copies their draft.wtf deck into a text file, appends their ULD lands (making sure to combine multiple copies of a card into the proper format i.e. "2 Tectonic Edge" )
 

Jason Waddell

Administrator
Staff member
Other thought: is there a way to make Cloudshift more easily give the list to the host. If we had a simple "email to host" button, where you can name the file after the drafter, that would be great. Then have that email have the name of the drafter in the subject, so that it's easier to manage as the host.

I don't want to be trying to transfer files over Skype, and an email button would allow people to skip the manual saving step.
 

Aoret

Developer
I'll think through a couple implementations. I need to see what the tech stack I'm using will do easily.

My current frontrunner idea is just to add admin authentication to it and store submissions for like 24hrs or something along those lines. Admin view would see submissions as they come in and would (hopefully) be able to just click to download each. I'd add an additional field for drafter name so that you get nicely named files. Assuming I can make all of that work... does that sound like it would suit the need?
 

Jason Waddell

Administrator
Staff member
I'll think through a couple implementations. I need to see what the tech stack I'm using will do easily.

My current frontrunner idea is just to add admin authentication to it and store submissions for like 24hrs or something along those lines. Admin view would see submissions as they come in and would (hopefully) be able to just click to download each. I'd add an additional field for drafter name so that you get nicely named files. Assuming I can make all of that work... does that sound like it would suit the need?

Yes, so long as people aren't changing their files and running them through Cloudshift multiple times.
 

Jason Waddell

Administrator
Staff member
I don't know if your program can solve this, but I am trying to import my cube as a deck in MODO, so that I can confirm that the contents are there. I have a text document with the cards.

If I import it, MODO makes a deck for me with 339 cards or some nonsense. I don't know what's wrong. I can see that Lightning Bolt isn't there, and I'm sure other cards too, but I would like to have all 360 so that I can see if any cards are missing at a glance by checking the presence of the yellow symbol.

I fed it through Cloudshift, and that was like 310 cards, but I didn't condense duplicates onto separate lines. By the way, can Cloudshift handle:

1 Brainstorm
1 Delver of Secrets
1 Brainstorm

That'd be spectac.
 

Aoret

Developer
I don't know if your program can solve this, but I am trying to import my cube as a deck in MODO, so that I can confirm that the contents are there...I would like to have all 360 so that I can see if any cards are missing at a glance by checking the presence of the yellow symbol.
Actually, the best way to do this is to not run text through Cloudshift, but the tool can still help you! Draft hosts should use the text box on the left hand side as a CSV deck import to check for the contents of the collection after drafts are over.

Not only is it literally just an export of the collection, it's also what Cloudshift is pulling cards from when players check them out of the library, so there's sort of a set theory elegance to doing it this way (which I'd imagine you of all people can appreciate Jason)

By the way, can Cloudshift handle:

1 Brainstorm
1 Delver of Secrets
1 Brainstorm

That'd be spectac.

dunno! test it and lemme know. I only tested it as working in the ideal case where you give it clean input, but it might handle this just fine.


Currently my priority list is something like:
  1. Nicer decklist transfer to hosts (involves adding auth, file downloads, a name field on submissions)
  2. Ability for hosts to update the collection CSV via upload without me hardcoding it every time. (involves adding auth, file uploads, a bit of logic)
  3. Handle "dirty" collections better (involves tracking a session and necessitates the same authed host stuff as 1&2, plus additional one off logic)
  4. Handle "dirty" input better, assuming we currently don't handle it well.

Should that list be shifted around? Note that some of these necessitate overlapping features.
 

Aoret

Developer
Beta 1.1 went out just now.

Added Features
It's a little bit of (but not all of) items 3 & 4 above by Jason's request. Basically it'll handle weird stuff like extra whitespace and split cards now where it didn't before.

Noteworthy Problems
It still doesn't handle the case of duplicate cards listed out twice. Since draft.wtf doesn't output cards this way, it isn't a priority for me to handle this case versus the other priorities above. (sorry wadds, you're gonna have to massage the text to make your master list)
 

Jason Waddell

Administrator
Staff member
Noteworthy Problems
It still doesn't handle the case of duplicate cards listed out twice. Since draft.wtf doesn't output cards this way, it isn't a priority for me to handle this case versus the other priorities above. (sorry wadds, you're gonna have to massage the text to make your master list)

Yeah, this is mostly a problem when Grid Drafting, but we'll handle it.
 
Top