Cockatrice export

Login or register to post comments
Wed, 2012-04-04 18:16
denunzio

Someone know how to export the card with the image into cockatrice???

Wed, 2012-04-04 18:35
tommo999

i want to know this too

Im a monkey that talks
If you want to help me with my own set please click on this: http://magicseteditor.sourceforge.net/node/6226

Wed, 2012-04-04 19:27
Jéské Couriano
Jéské Couriano's picture

It would help if we knew what Cockatrice was.

Wed, 2012-04-04 19:29
denunzio

Cockatrice it's a free program similar to magic work station

Wed, 2012-04-04 20:13
Sewn-Eye
Moderator
Sewn-Eye's picture

There's a tutorial online. Try googling "Cockatrice custom set" or something. You need to edit the cards.xml file and basically manually type in the new cards. It's time-consuming, but it's the only way.

"Too wary to charge, too prudent to serve. Not anymore."
—Sedris, the Traitor King

Wed, 2012-04-04 20:17
denunzio

Do you have a link?

Wed, 2012-04-04 20:43
eomund
eomund's picture

Link: http://forum.cockatrice.de/index.php?topic=480.0

If you have any experience in a scripting language (such as Python), it should be pretty easy to write a program that will turn the MWS exported file from MSE into something that you can just copy and paste into the Cockatrice set.xml file. I may even do this myself once finals end ... if I do, I'll be sure to post the code somewhere.

In fact, this could be a useful feature for MSE to have included; I personally like Cockatrice a whole lot more than MWS, and based on the number of people using Cockatrice, I'm not alone. How difficult would something like this be to include? I'd be happy to do it myself (again, once finals end), assuming it's not beyond my abilities.

Wed, 2012-04-04 21:19
denunzio

So you can do it? Really? If you can do it it will be really cool!!!!

Wed, 2012-04-04 21:49
Sewn-Eye
Moderator
Sewn-Eye's picture

Yes, I've done it before. However, don't forget that the people you play with will have to have the same cards.xml file as you, otherwise they won't be able to see your cards.

"Too wary to charge, too prudent to serve. Not anymore."
—Sedris, the Traitor King

Wed, 2012-04-04 21:55
denunzio

Yes, i know... But it's okay cause i want to play just with some of my friends... So If you can do it can you put that here?

Fri, 2012-04-06 19:23
denunzio

none???

Fri, 2012-04-06 21:45
eomund
eomund's picture

As I said, I don't have it written, and won't be working on it until finals end in a couple of weeks. Rereading Sewn-Eye's comment, it sounds like he had a script to do it, but doesn't now. So be patient.

Fri, 2012-04-06 21:54
Sewn-Eye
Moderator
Sewn-Eye's picture

Wait, what? I'm lost.

You just need to follow the instructions here.

"Too wary to charge, too prudent to serve. Not anymore."
—Sedris, the Traitor King

Fri, 2012-04-06 21:55
denunzio

Wait Sorry, my problem is that sometimes i don't undestand cause i'm italian and my english isn't perfect... So, let me undestand... You two are working to do that?

Fri, 2012-04-06 22:08
eomund
eomund's picture

Sewn-Eye, did you import your entire set manually? If so, I am humbled by your patience.

denunzio, sometime this month I will write a script to make importing into Cockatrice easier, but it won't be until the 16th at the earliest.

Fri, 2012-04-06 22:12
denunzio

Ok now i'm undestand thanks to you and for your work, now i will attempt some news about your work on 16th A happy smile thanks you again

Fri, 2012-04-06 22:14
Sewn-Eye
Moderator
Sewn-Eye's picture

Manually, yes. It was a very small set (thank God), so it only took one-and-a-half hours.

It's very, very time consuming, unfortunately, but as far as I'm aware, it's the only way to do it.

"Too wary to charge, too prudent to serve. Not anymore."
—Sedris, the Traitor King

Mon, 2012-04-09 15:09
Tahazzar
Tahazzar's picture

This is something I used to test purple set for a while in Cockatrice.

http://www.2shared.com/file/I99xMVB5/magic-cockatricemse-export-tem.html? wrong one
EDIT: right one - http://www.2shared.com/file/ORwitQNK/magic-cockatricemse-export-tem.html

The problem with the images is that they have to located in somewhere. They could perhaps be local files if each player downloads each pic and puts them into the same path (or edits the path themselves)... The text in the file that currently is "http://***/***.jpg" was something like "http://tahazzar.realservers.info/Purple%20Card%20Images/"+link_repl(card.name)+".jpg\" (a site which is down now). This template also exports every image. I used this then uploaded the images to this site of mine. I made this "link_repl" function (or whatever these are in this 'language') to change the card names so that they would link right - some characters needed to be changed or something... I really don't remember that well - it was a long time ago...

"The only limit to my freedom is the inevitable closure of the universe, as inevitable as your own last breath. And yet, there remains time to create, to create, and escape. Escape will make me God."

Sat, 2012-04-07 16:41
denunzio

how can i use the program you linked?

Mon, 2012-04-09 10:56
Tahazzar
Tahazzar's picture

Put it into the "data" -folder with the other MSE templates/styles. Then open MSE and go to "File->Export->HTML..." and you should see the Cockatrice symbol in there with MWS and LackeyCCG.

"The only limit to my freedom is the inevitable closure of the universe, as inevitable as your own last breath. And yet, there remains time to create, to create, and escape. Escape will make me God."

Mon, 2012-04-09 11:02
denunzio

yes ok and after that? how i have to use the file created with the export?

Mon, 2012-04-09 11:42
Tahazzar
Tahazzar's picture

Click "OK" then give a name and place where to save (I don't even know if the 'Entire Set' or 'Custom Selection' options work here). It creates a text file with that name which basically is the .xmhl file or whatever it was in the Cockatrice and then a folder with the same name with all the pics in it.

EDIT: This .txt file you created with the export is now the "cards.xml" (obviously make a backup of cards.xml then change the extension[?] or replace all the text in it with the text of the txt file you made). However, to get the pics work you should edit the code to match the place where you place or upload the pics.

"The only limit to my freedom is the inevitable closure of the universe, as inevitable as your own last breath. And yet, there remains time to create, to create, and escape. Escape will make me God."

Mon, 2012-04-09 11:35
denunzio

ok..

Mon, 2012-04-09 11:41
Tahazzar
Tahazzar's picture

You checked the edit? I think this how it works if I remember correctly...

"The only limit to my freedom is the inevitable closure of the universe, as inevitable as your own last breath. And yet, there remains time to create, to create, and escape. Escape will make me God."

Mon, 2012-04-09 11:52
denunzio

no it doesn't work...
if i undestand i do this:
-I use the export of MSE to Cockatrice, ok now i have two file one with the image and a txt file
-Then i change the extension of the .txt on .xml
-I put it on cockatrice in sostituion of the older card.xml

But it doesn't function...

Mon, 2012-04-09 15:08
Tahazzar
Tahazzar's picture

*Ahem*, yes, this was indeed one of my html_code/web exporters not Cockatrice exporter *face palm* - let's try again - use this instead (remove or replace the wrong one): http://www.2shared.com/file/ORwitQNK/magic-cockatricemse-export-tem.html

Then export the set, and EDIT the cards.xml file (be careful, it's so big that at least my computer starts getting tricky). Remove the "Spoiler List" from the beginning of the export file then copy everything from it to the "cards.xml" after the <cards> tag (you may need to "create" you own set between the set tags - dunno / can't remember). Replace everything expect the for the "</cards></cockatrice_carddatabase>" tags at the very end of the file.

"The only limit to my freedom is the inevitable closure of the universe, as inevitable as your own last breath. And yet, there remains time to create, to create, and escape. Escape will make me God."

Sat, 2012-08-11 03:04
http404error

I just wanted to say that I love you, Tahazzar. This saved me SO much trouble. May your descendants be many and your land be bountiful.

It worked marvelously! I used Find and Replace to fix the image links and set name etc. Notepad++ is the best. Although I don't understand why the commas turned to spaces in the links and into nothing in the card names. Oh well, can't complain. What did you write the program in and what could be used to edit it?

Sun, 2012-08-26 21:54
Tahazzar
Tahazzar's picture

If I recall correctly, I just edited the MWS exporter from MSE. So nothing more than Notepad++ was used Big smile
The "code" isn't really that hard to understand; it's full of "replace" -function calls and construction of strings.

http://magicseteditor.sourceforge.net/doc/function/replace

"The only limit to my freedom is the inevitable closure of the universe, as inevitable as your own last breath. And yet, there remains time to create, to create, and escape. Escape will make me God."

Sun, 2012-09-16 00:40
agentelrond

Sorry for bumping a semi-inactive thread, but as it hasn't been inactive for over a month, I figured this would be better than starting a new thread.

I'm having some problems with the exporter that I'm hoping someone can help me iron out. I've been able to get it to successfully export, but when I load it up I get several issues that I can't seem to resolve.

First, the text versions of the cards (in Cockatrice) have multiple instances of '%' in them, typically in the mana costs. I see in the exporter where this is being added in using the replace function, but if I rem it out or remove it altogether, the export just gives me a blank file. I'd edit the file and do a mass replace, except there are instances of % where it's necessary.

Second, and more importantly, any card with an apostrophe in the name won't display. I've tried multiple ways of doing it, and no matter what I do, the image won't come up. Thoughts?

EDIT: Fixed the second issue. Now just need a way to get rid of all those %'s

I don't argue with people who are right...

Sun, 2012-09-16 01:38
http404error

It would be great if you could share your findings just in case anyone else (read: me) might be having the same issues!

Fri, 2012-12-14 16:12
VanceAnce

old but gold thread - but i post here my little programm

maybe someone needs it

infos:

crated with - VBA
tested with - word 2002

what does it:

converts the MWS file in cockatrice cards.xml code

where to get:

http://vanceance.blogspot.co.at/2012/12/magic-set-editor-cockatrice-formating.html

vanceance.blogspot.com

Wed, 2013-01-09 21:55
kjoppy
kjoppy's picture

I have recently started a project with the following goals

  • Create a universal format for custom card sets
  • Create a public repository for people to upload their sets in this format
  • Write a program to convert card data between all popular MtG oriented applications, including MSE, Magic Workstation, and Cockatrice.

Here is a link to a Magic Salvation Forum thread discussing the project. I've got the Cockatrice dev on board and people are showing general interest.

I have already written a first pass at the converter program in Python. It works well, making getting your cards from MSE to Cockatrice extremely easy. I am very dedicated to fixing bugs and will be actively developing it indefinitely. It is currently released to a few people for testing. If anyone here would like to try it out, let me know via PM and I'll give you a link to the Source Forge page. I expect to release the program publicly very soon.

Once the program is in public distribution I will use Source Forge tickets to deal with bugs etc.

Mon, 2013-01-28 11:52
LtEntropy

Howdy folks. I've made an export template script for just this purpose!

You can find it here: http://www.filedropper.com/magic-cockatricemse-export-template

Mirrors: The text - http://pastebin.com/rFnwrGjR, the icon - http://i.imgur.com/JQ4sTfj.png

To install it, unzip the contexts and move the folder named "magic-cockatrice.mse-export-template" into the "data" folder of the installation you have for MSE (for windows, it's usually located at "C:\Program Files\Magic Set Editor 2\data").

To use, within MSE go to File > Export > HTML and select Cockatrice. Remember to put in a setcode and longname for the set. The setcode will be the name of the folder that your cards images will be put into within the Cockatrice installation.

Export your set and name it what you want. Cockatrice names its database "cards.xml" and if you want to include you set among the rest of those within your current database of cards, you can copy and past the contents as follows:

<?xml version="1.0" encoding="UTF-8"?>
<cockatrice_carddatabase version="2">
<sets>
<set>
<name>5E</name>
<longname>Fifth Edition</longname>
</set>
<set>
<name>US</name>
<longname>Urza's Saga</longname>
</set>
<set>
<name>MR</name>
<longname>Mirrodin</longname>
</set>
...
<--
YOUR SET INFO HERE
-->
...
</sets>

<cards>
...
<--
YOUR CARDS HERE
-->
...
</cards>
</cockatrice_carddatabase>

The database can be found in *either* "C:\Users\\[USER]\AppData\Local\Cockatrice\Cockatrice" or "C:\Program Files\Cockatrice"

For the card images, you will need to create a folder named the same as your cards' setcode is in the corresponding "\pics\downloadedPics" folder of the Cockatrice folder.

When you export the card images, in MSE go to File > Export > All Card Images and have "{card.name}.full.jpg" in the format field, as this is how Cockatrice refers to card images itself. Save the images in the set's card images folder.

I've based the code off of the forum export template that comes with MSE, so you'll have to forgive some odd inclusions in the code, as it's mostly a cut and paste job and I'm always noticing new mistakes.

A friend of mine has really enjoyed using MSE and wanted a way to export to Cockatrice so we could play games using their cards. The code works with exporting most cards including planeswalkers, flip, split and leveller cards.

Issues: I've had trouble with cards that include commas and apostrophes not showing their card images within Cockatrice, but show up within the list shown. Some looking into the problem has shown that while Cockatrice uses commas and apostrophes as a part of the card's name, MSE doesn't export them. I'm not sure if this is an option that can be changed, or if it can otherwise be easily fixed.

Mon, 2013-01-28 21:00
kjoppy
kjoppy's picture

@LtEntropy

We should join forces immediately. Your template combined with my program would be an awesome tool. My program is essentially a set of python scripts for manipulating sets of cards, eg. merging two sets together and dealing intelligently with duplicated card names. In addition there are modules for importing and exporting to and from Cockatrice database files and Magic Workstation files.

The reason I included a MWS import module was so that people could get their MSE sets into my program. The original idea was to export with MWS target and then import to my program. From there you can combine your custom cards with the main Cockatrice database and export for use in Cockatrice games. Exporting from MSE to Cockatrice compliant xml as you're doing is much better because the set names are included, unlike with the MWS format. Since I already have a Cockatrice import module my program can already interface with your script's output!

The nice thing about my program is that there is no cut/paste necessary by the user. When it imports cards from a file it creates internal representations of the sets and cards. When it exports, it combines these objects into a single set and then writes cards.xml to the correct location.

Now here's the best part: I've been talking with the Cockatrice dev and he agrees that Cockatrice should be able to load multiple set database files rather than only one as it does now. This would allow people to use your tool to export their sets and not have to combine the output with the main database in cards.xml. This is all in preparation for use with a public custom set repository that we will build in the near future. The idea is that people can browse the public repository, download other people's sets in a standard format (probably some kid of JSON dat), and then use my program as a centralized tool for exporting the data to whatever other program they want to use, be it MSE, Cockatrice, or whatever else.

You really should come by the thread I posted above and see what's going on.

EDIT: If you'd like to test my converter program please PM me and I'll give you a link. I really need testers right now, as coding is finished and it works great on my own machine.

Thu, 2013-02-07 11:36
gamez7
gamez7's picture

Thanks for telling me. I'll be sure to never go there. Ever.

ihavenoideawhatimdoing.jpg

Wed, 2013-02-20 16:52
Sgt Failure
Sgt Failure's picture

LtEntropy: I used your exported, and it worked out perfectly with a couple of minor problems, listed below.

  • MSE and Cockatrice uses different variants of hyphens. Cockatrice uses the normal "-" while MSE uses an actual hyphen. Exporting with the current script renders cockatrice unable to see what is a card type and what is a creature type, leading to a very very long search menu.
  • Your exporter currently does not include colors when exporting, something some people might find problematic.
  • The Image Exporter of MSE does not export names with commas, apostrophes and other special signs. This is the reason some cards can't be shown from start. Some other special signs also follows this rule, and some languages incorporating special letters support those locally, but other computers does not (AE / Æ being the most common occurance)
All this can be fixed normally with some patience, but I just wanted to let you know.

Thanks alot for all the help!

Sun, 2013-03-17 04:24
Nemo Oceansoul
Nemo Oceansoul's picture

ill be watching for this, im working on a set and i find it a lot easier to be able to play cards and have others play those cards so that i can figure out what is wrong with them and change them.
i hope that this is finished soon, the main server for cockatrice just received a Cease and Desist order, might not be to long now until all the servers are shut down.

EDIT: Good News: as far as i can tell all the severs, except for the main are still up.

Tue, 2013-03-19 12:41
kjoppy
kjoppy's picture

The program has been done for some time. Search magicHack on sourceforge.

I want to make a few notes here

1. I will be actively developing this project indefinitely.

2. If Cockatrice goes down, I intend to form a replacement specifically aimed at using user defined cards. I believe this will circumvent any unwanted legal attention.

Direct link:

http://sourceforge.net/projects/magichack/?source=directory

P.S. If you find bugs, please make a ticket on the sourcefoge page. I check it regularly.

Sun, 2013-05-05 20:11
Plane Maker

Hello all

I found another method and tested it. It works so far. I have to test the custom cards in gameplay and online play.

Please see my post for further information
http://magicseteditor.sourceforge.net/node/6730#comment-123160

In the beginning Plane Maker created heavens and the earth.

Thu, 2013-05-16 04:32
kogonagi

Hi im new to the forums but im still having trouble getting the images of the cards to appear in cockatrice. i have the folder with all the card jpegs in it and i have cockatrice leading the card information not just the pictures. my guess is that i dont have the folder in the right place or it is named something incorrect. also i cant find the pics folder in cockatrice, this might cause my problem as well. thnx for anyone who might be able to help me out.

Thu, 2013-05-16 10:25
kogonagi

hi i'm using your program to help me produce a custom set so i can have a great tool for testing a card game i'm deving. i'm currently stuck with the problem of card art not being applied to more than the first card in the set. but 1 of the cards is getting art and everything else is a tundra kavu. if you have time please respond. thnx a ton besides this drawback the program worked very well just took my a while to figure everything out. A happy smile

Fri, 2013-06-28 02:02
Nemo Oceansoul
Nemo Oceansoul's picture

for those keeping up w/ cockatrice it is now being recreated anew into a new program called "The Lotus Project". if anyone know anyone working w/ them on it maybe request a way to direct export from MSE into Lotus. that would be very very nice. especially considering what its trying to do.