Exporting custom set in text form?

User avatar
DorkmasterFlek
Posts: 71
Joined: 1 year ago
Pronoun: he / him

Post by DorkmasterFlek » 1 year ago

Apologies if this has come up before, but I couldn't find any threads about this searching around here. I'm making a custom cube/set with some friends here and it's a great resource, but one thing I noticed that would be extremely useful is a way to export your custom cards/sets in text form. I'd like to take our custom set and implement it in a rules engine, and a basic text spoiler format with the rules text would be much more handy than copy/pasting the text from this site as we go.

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5410
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 1 year ago

We can add that. Give me some time, I'll try to work it in.
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5410
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 1 year ago

DorkmasterFlek wrote:
1 year ago
Apologies if this has come up before, but I couldn't find any threads about this searching around here. I'm making a custom cube/set with some friends here and it's a great resource, but one thing I noticed that would be extremely useful is a way to export your custom cards/sets in text form. I'd like to take our custom set and implement it in a rules engine, and a basic text spoiler format with the rules text would be much more handy than copy/pasting the text from this site as we go.
If you have any access level to a set (controlled by owner in the collaboration access management), you'll have the set control menu on the top left.
That now has an Export option, at the bottom:
Screenshot 2023-01-08 at 11-53-31 Moira vs Ghula (Moira).png


For now, we offer two options for exporting:
  • Plain text in a .txt file
  • A printable PDF in our Playtesting format.
Playtesting format explicitly avoids all symbols, art, etc, that may be copyrighted:
example.jpg
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

User avatar
DorkmasterFlek
Posts: 71
Joined: 1 year ago
Pronoun: he / him

Post by DorkmasterFlek » 1 year ago

Fantastic! Thanks so much for the work on this, and the rest of the site. :heart:

CrimsonDemon
Posts: 33
Joined: 2 months ago
Pronoun: he / him

Post by CrimsonDemon » 1 month ago

Hey, the text export feature is awesome, but would it be possible to get this as an xml file export for use in programs such as Cockatrice? I'm looking to create several custom sets here, and it would be really nice to be able to export them as complete xml files that can simply be imported into Cockatrice without needing to write the whole xml file myself.

User avatar
hakimstark
Posts: 154
Joined: 1 year ago
Pronoun: he / him

Post by hakimstark » 2 weeks ago

CrimsonDemon wrote:
1 month ago
Hey, the text export feature is awesome, but would it be possible to get this as an xml file export for use in programs such as Cockatrice? I'm looking to create several custom sets here, and it would be really nice to be able to export them as complete xml files that can simply be imported into Cockatrice without needing to write the whole xml file myself.
Hi, if anybody that can make that happen is still reading this thread, I'd humbly second this request. Being able to easily export a custom set to the Cockatrice (and maybe Draftmancer as well? in order to draft custom sets) format would be amazing! I'm working on my custom set myself, and it would be awesome to have the opportunity to playtest the set using the Draftmancer/Cockatrice combo, without having to manually create the input files for the set. If it makes things easier, here are the specs for the file formats for quick reference: I understand this might not be an easy task, so a quick alternative for now would be adding the following info to the current plain text export mode (with set info at the start of the file):
  • set: full name
  • set: abbreviated name (like KTK)
  • card: rarity
  • card: URL to the rendered card image*
  • card: name of the card on the back (for DFCs)
With that info added, I'm pretty sure I'd be able to write a simple tool to convert the text file into the Cockatrice and Draftmancer formats, and make the tool available for others. Alternatively, I could offer my help to implement the export to Cockatrice/Draftmancer feature for the site (depends on the language(s) you use for that; I'm a programmer by profession, coding mainly in Java); if so, please let me know.

Thanks in advance for any help on this, and more broadly thanks for all the great work you've done making MTGNexus. Cheers!

*in order to batch download the pictures and save them with appropriate names, to be able to then put them on an image hosting site; or, if that's okay with MTGNexus of course, to use the link directly for the Cockatrice/Draftmancer files

disclaimer: that's my very first post here, so I hope I didn't break any rules (I think I've checked all the pinned posts here describing the rules), but if so, please let me know

User avatar
Ryder
Posts: 353
Joined: 4 years ago
Pronoun: he / him

Post by Ryder » 5 days ago

@Feyd_Ruin what do you say? :)

User avatar
Feyd_Ruin
Elder Vampire
Posts: 5410
Joined: 5 years ago
Answers: 3
Pronoun: he / him
Contact:

Post by Feyd_Ruin » 5 days ago

Apologies, I didn't see this before the tag.
I can definitely add this.
To the beaten, the broken, or the damned; the lost, and the wayward: wherever I may be, you will have a home.

User avatar
hakimstark
Posts: 154
Joined: 1 year ago
Pronoun: he / him

Post by hakimstark » 2 days ago

Feyd_Ruin wrote:
5 days ago
Apologies, I didn't see this before the tag.
I can definitely add this.
Awesome, thank you! :) Next time I'll make sure I mention you like this @Feyd_Ruin . Like I said, adding the properties mentioned in my previous post (especially card rarity, rendered card image URL, and the back face name) would be enough to make the exported file work as an input for the tool I've mentioned that I could write. Probably adding a list of names of the tokens the card could produce would be a nice bonus, for a better Cockatrice experience, but I presume it would be a lot more to ask, as it would require some advanced parsing of the card text, and wouldn't work all the time anyway.

As for the tool itself, I've been working on it, an the MVP version is done. As of now it can take Cockatrice XML v3 as input, and spit as output Cockatrice XML v3 (fixed and cleaned up as best as it can) and a Draftmancer file for draft/sealed (with classic play booster layout, i.e. 10 common slots +3 uncommon slots + 1 rare/mythic slot (mythic with 1/8 chance); more complex layouts, resembling the modern ones with slots for The List, "special guests" etc., would be much more complicated, but doable I think). I started with Cockatrice v3, as I've found a Star Wars: the Gathering v3 file to use as sample input; it required some manual fixing, and was incomplete, but it was a full set that was somewhat field-tested, so I reckoned it'd be a good sample input that I could then test the results with. Everything seems to be working, with the output provided by the tool I've managed to do a few drafts with a friend on Draftmancer, and the play the results on Cockatrice, with everything going smoothly :) I'm working on Cockatrice XML v4 as input and output now (with some groundwork for the future MtG Nexus file format being laid down as well), but I'm doing this after hours, with life stuff to deal with, so the development speed may vary wildly ;)

I'd be happy to share the tool with anybody interested, both executable and code. Once a version able to handle Cockatrice v3 + v4, Draftmancer format, and MtG Nexus format is ready, I'll make it available to everyone, and before that just let me know if you're interested. Hope it'll be useful to someone :)

Post Reply Previous topicNext topic

Return to “Custom Cards”