dekkerglen / CubeCobra

An open source web application for building, managing, and playtesting Magic the Gathering cubes.
https://www.cubecobra.com
Apache License 2.0
186 stars 115 forks source link

New Cube Export format: .dec #1090

Open dekkerglen opened 4 years ago

dekkerglen commented 4 years ago

Request: export to .dec format? Sample syntax:

///mvid:451015 qty:1 name:Adarkar Valkyrie loc:Deck 1 Adarkar Valkyrie

(mvid=multiverse ID, used by gatherer.wizards.com. I don't see these IDs in scryfall) ie: https://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=451015

ruler501 commented 4 years ago

Isn't multiverseId the oracleId in Scryfall data?

dekkerglen commented 4 years ago

I believe so. I just copy pasted this ticket from discord

RKelln commented 4 years ago

multiverse id seems to be separate and currently isn't part of our data.

E.g. https://api.scryfall.com/cards/76ffbae4-7aad-493c-86a0-c6e6425da8fd?format=json&pretty=true

There is a list of ids. Which is even worse, but let's say we just use the first one for export. How hard is it to add that data to our card db?

RKelln commented 4 years ago

Err wait, I think the actual .dec format is simpler, so no need for multiverse id yet. Can help get this done.

dekkerglen commented 4 years ago

Definitely spend some time looking up what this format actually looks like. The sample isn't very comprehensive

RKelln commented 4 years ago

Worked with feature requester on this, have a simple format export working that allows for mostly working export and imports. Fails on Adventures because of a disagreement on format (.dec uses Name // AdventureName, while we just use Name).

choraltrickster commented 4 years ago

Thanks for looking into this everyone. Much appreciated!

Decked Builder creates files in the more complex format containing the mvid. Here's a sample showing both deck and sideboard (SB):

///mvid:1237097 qty:1 name:Gingerbread Cabin loc:Deck 1 Gingerbread Cabin ///mvid:1237069 qty:1 name:Crashing Drawbridge loc:SB SB: 1 Crashing Drawbridge

Decked Builder can open the simplest text layouts saved with the .dec extension, such as: 1 Crashing Drawbridge Crashing Drawbridge 1x Crashing Drawbridge

The mvid format might be easiest accomplished by importing that data into our databsae.

Thanks again for your contributions everyone!