Skip to content

Instantly share code, notes, and snippets.

@shoghicp
Last active November 9, 2016 23:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoghicp/acbb507679912460e8b9860606467c41 to your computer and use it in GitHub Desktop.
Save shoghicp/acbb507679912460e8b9860606467c41 to your computer and use it in GitHub Desktop.

How to ask for cards

Tweet to @DroidRosewater with card followed by the properties you want the card to have (or none for a fully random one!). It will reply to your tweet with a newly generated card. If it doesn't reply in one-two minutes, something went wrong or it couldn't generate one in time. Try again! If you don't get the expected results, check your parameters again, so you don't miss a colon.

Like: @DroidRosewater card or @DroidRosewater card type:creature: name:Elvish Presley:

Properties are in this format: key:value: key2:value2:. Note the closing colon : at the end.

Note: you can also specify some properties this way: key"case-sensitive value", for example, for mana costs in text.

Accepted properties:

  • Properties are case-sensitive, values are not.
  • type: Type of the card, being any or a combination of: creature, artifact, enchantment, sorcery, instant, planeswalker. (Also accepts random garbage).
  • subtype: Subtype of the card, for example, for type creature a valid one would be elf. (Also accepts random garbage).
  • supertype: Supertype of the card, for example, legendary.
  • pt: Power/toughness of the card, in this format: 5/9 or */*.
  • name: Name (or parto of it) given to the card. If this property is chosen, a different neural network that generates cards from names will be used.
  • cost: Mana cost for the card in WUBRG format, ^ for generic, C for colorless. Example: ^^RRG for 2 colorless, 2 red, one green.
  • dcost: Advanced mana cost property, for use when you want hybrid/phyrexian mana and such. Symbols (except generic) come in pairs: ^GG is 1G, ^UB is 1U/B. Symbols: ^ generic, C colorless, WUBRG white blue black red green, S snow mana, P phyrexian (can be combined with others, this symbol first).
  • acost: Cost to append to the end of the generic mana cost. Syntax like dcost.
  • text: Text to prepend to the body.
  • atext: Text to append to the body.
  • loyalty: In case of planeswalker, starting loyalty
  • forcesplit: Force generating split cards. Expect bad stuff.
  • quality: One of normal, bad, verybad, or good. Only normal produces "good" results, good is a test so expect garbage.
  • temperature: A float between 0 and 1, default 0.85. It's the "imagination" the network has, bigger = more, but also crazier stuff.

Filter properties:

  • Note: specifying these properties will filter your output.
  • color: Color identity of the card, one or more of white blue black red green or colorless. For example, white blue will give you cards that have at least blue and white mana costs, while colorless will give you cards without colored costs.
  • rarity: Rarity of the generated card.

Notes in order of generation of fields in the card:

  • The network will generate fields in the following order (if no name/cost was specified):
    • Type (Example: artifact, creature, enchantment creature, planeswalker, etc.)
    • Supertype (Example: "none", legendary, tribal, etc.)
    • Subtype (Example: "none", angel, arcane, equipment, aura, elf, jace, etc.)
    • Loyalty (In case of planeswalker...)
    • Power/toughness (Note: the network might alter the last part of it)
    • Text (Example: "none", trample, when @ enters the battlefield, etc.)
    • Cost (Example: ^^U, GG, etc.)
    • Rariry
    • Name
  • If name/cost was specified, name and cost will be put in front of the other properties (name, type, supertype, subtype, cost, then the rest).
  • For example, if you specify power/toughness but the network decides beforehand it wants an instant you will get interesting results.
  • Some specified fields can be extended by the network.
  • Most of the number/costs will be generated in unary form, meaning that negative numbers are not accepted most of the time.
@jseakle
Copy link

jseakle commented Jul 26, 2016

A few bugs are exemplified by https://twitter.com/DroidRosewater/status/758022700090687488

First, it seems that the pass that inserts the Kicker reminder text isn't aware that Kicker abilities can have an "and/or" clause. Maybe reminder text should just go at the end of the line, instead of right after the matching text?

Second, it seems that sometimes mana costs aren't getting turned into symbols correctly, as in "5R". See also https://twitter.com/DroidRosewater/status/757825051806748672.

Lastly and leastly, capitalization in text requests is not respected, which makes the card look a little unprofessional.

@SOF3
Copy link

SOF3 commented Aug 4, 2016

If it doesn't reply in one-two minutes, something went wrong or it couldn't generate one in time.

Is there a third possibility, for anything?

If @shoghicp doesn't reply to this comment in one-two minutes, something went wrong or he couldn't reply in time.

@shoghicp
Copy link
Author

shoghicp commented Aug 7, 2016

@jseakle Most of those bugs are due to the card generator itself, Magic Card Editor.
For the capitalization, everything generated by cards is done in lower case, then capitalized (so network needs to learn less about upper/lower case and more about magic itself). If you still want to provide specific capitalization, use "" instead of ::

@mcklucker
Copy link

How would you parse double generic / single colored costs, as in Flame Javelin? (2/R)

@bbbbbbbbba
Copy link

bbbbbbbbba commented Nov 9, 2016

Is there a third possibility, for anything?

It doesn't think your request worthy of working on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment