Page 1 of 1

Utilty Idea - Magic 2014 Random Deck Generator

PostPosted: 19 Aug 2015, 00:42
by Chakan
I'm thinking of a program that builds a random, but sort of structured archetype deck (like life gain, creature control, etc.) using the cards you have in your current card pool. I envision that the program would look for cards of a certain color with certain code tags and/or text of a card, like for a creature control deck it would build either a black, red, or black & red combo deck full of big creatures and lots of "destroy target creature", "deal X damage to target creature" type cards, auto assign land, use generic Vs. screen pictures , and save to a deck ID that isn't currently in use by you. This is just an idea that I had that came to me while I was playing Origins, it builds random decks on the fly (or so I think anyway) and you can compete against a deck you're not familiar with, which is pretty fun and challenging. I've been playing against virtually the same opponents since I started playing Magic 2014 and I'm pretty sure I know every deck I have now like the back of my hand, anyway, it's always nice to have a variety of opponents to play against. If people here thinks this is a good idea and would use it, I may look into trying to make it, no promises though.

Another random thought, is it possible to make decks not visible, and not able to be picked by the player, but still able to be selected by the "random opponent" function? This way if this tool is made, you'll have a variety of AI only decks that won't flood the deck selection screen.

Re: Utilty Idea - Magic 2014 Random Deck Generator

PostPosted: 19 Aug 2015, 02:35
by Xander9009
I would LOVE a tool to do something like this. It'd be really awesome, I think. As for the visibility, I don't know, but there may be an optional hidden="true" tag or something like that you can stick in the deck. Otherwise, possibly change cheat_menu_filter_deck_type="Standard" to something other than "Standard"? You'd have to check the game's vanilla decks and see what they use. The revenge campaign, of course, has decks you can't choose. But they also can't be chosen by the random opponent function. Perhaps some combination of the differences between those decks and normal decks would work. Alternatively, you could potentially just give them an ID which is low enough to be valid but high enough to always be last.

I've got a program that makes decks from a given list of cards. Its purpose was to make remaking a deck from the readme created by RiiakShiNal's Deck Builder easier. If you lose the deck, you can just drop that file onto the program and you get a usable deck. So, that part is already done. You'd just need a program to make a list of the cards you want included.

For that, I'd say the best way to go would be to start including tags in the cards to help the program. Somewhere near the end like the HELP tags that assist the player. Then, only grab cards that have tags appropriate to the current archetype. Adding the tags could be tricky, but it could be made easier by first making a program to suggest a list of cards that should get a certain tag with a certain value, and then having a person modify the list as needed. For instance, the program could isolate all cards with a given string ("Destroy target creature."), and then suggest that the card get
<AIDeckHelper type="destruction" subtype="creature" score="2" />
Then, when making a control deck, it would search out some random cards with the type="destruction" attribute. It would prefer creature to enchantment, but given an equal score, it would prefer permanent or non-land permanent to creature. The score attribute is meant as a way to compare one card to another when they do the same basic thing.

Murder gets a higher score than Path of Peace. So, in a black and white deck, it'll still prefer Murder.

So, this would be a heck of a program to make, but if you managed it, there'll be at LEAST one other person who loves to use it. :) If you need help, let me know. Unfortunately, I'm only particularly comfortable in AutoHotKey and (thanks to modifying TFM's generator plugin) python. So if you use a language that's not one of those, I'd only be able to help in very abstract ways.

Re: Utilty Idea - Magic 2014 Random Deck Generator

PostPosted: 19 Aug 2015, 06:08
by Chakan
I'm not much of a coder/programmer myself. I've recently tried to teach myself in the area, but I'm far from being quite this good, I'd need the backup of a group of people who could kind of steer me in the right direction, though I might take a crack at it as soon as I pick up some more knowledge. My post is nothing more than just a grand idea at the moment unfortunately, but I'm glad to see that someone here would consider it valuable. :)