It is currently 29 Mar 2017, 17:00
   
Text Size

Card generator

Moderator: CCGHQ Admins

Card generator

Postby Emashzed » 11 Jul 2012, 22:50

I just coded myself a little card xml generator, I thought I'd share :)

The generated XMLs contain all localized text, casting cost, artists, types, subtypes, power, toughness, placeholder for abilities with their text etc etc.
Basically, one has to fill the scripted logic plus a few extra fields (multiverseId / artId) and the card is good to go !

Saves us from all these long "boring" parts...

Hope it's usefull to someone :)
Attachments
mtg_generator.zip
(1.11 MiB) Downloaded 701 times
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Card generator

Postby Emashzed » 11 Jul 2012, 22:52

Here are the XMLs for all of Innistrad/Scars blocs + M12 + M13
(first half)
Attachments
Dotp2013_Standard_Cards_(1620)_part_1.zip
(1.82 MiB) Downloaded 439 times
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Card generator

Postby Emashzed » 11 Jul 2012, 22:53

Second part.

Hope I didn't miss anything silly :oops:
Attachments
Dotp2013_Standard_Cards_(1620)_part_2.zip
(1.66 MiB) Downloaded 389 times
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Card generator

Postby Emashzed » 11 Jul 2012, 23:14

Thought I'd do Zendikar too... :)
All 602 card XMLs in this zip.
Attachments
Zendikar_Cards_(602).zip
(1.24 MiB) Downloaded 399 times
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Card generator

Postby RiiakShiNal » 11 Jul 2012, 23:32

Looks like your generator doesn't put in the localization for Korean (ko-KR) and puts in other localizations that DotP 2013 doesn't use (Taiwanese, Chinese). I see your generator also gets the information from magiccards.info and after programmatically extracting information from gatherer I can see why everyone chooses to extract info from there.

Also for anyone interested in downloading the card XMLs be aware that they are the XMLs generated from the program and do not include any of the ability code. All the abilities are just stubs.
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2078
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 451 times

Re: Card generator

Postby Emashzed » 11 Jul 2012, 23:50

Thanks for the comments RiiakShiNal :)

Actually the generator does put ko-KR when available (out of the 2195 cards, only 814 have korean text available).
Not sure if the other cards do not exist or just mtginfo doesn't reference them :)

I'm on the fence about including cn/tw translations. Dotp2013 doesn't use them, but it seems handy at the time to have them for future Dotp, who knows :D

As you're saying, the XMLs are "stubs" and don't include the LUA scripting (because it just can't be done automatically).
The idea is just to gain time for everything else :)

In a future version, I'll try to auto-add scripting for the basic abilities (flying, trample, first strike, etc) + badges/helps
I think this can be done fairly effectively.

In the meantime, I just hope this saves some people some time...
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Card generator

Postby RiiakShiNal » 12 Jul 2012, 00:54

Emashzed wrote:Actually the generator does put ko-KR when available (out of the 2195 cards, only 814 have korean text available).
Not sure if the other cards do not exist or just mtginfo doesn't reference them :)

I'm on the fence about including cn/tw translations. Dotp2013 doesn't use them, but it seems handy at the time to have them for future Dotp, who knows :D

As you're saying, the XMLs are "stubs" and don't include the LUA scripting (because it just can't be done automatically).
The idea is just to gain time for everything else :)

In a future version, I'll try to auto-add scripting for the basic abilities (flying, trample, first strike, etc) + badges/helps
I think this can be done fairly effectively.
Ahh, you're right, I see it (Korean localization) on ACIDIC_SLIME_XXXXX, my mistake.

It might be handy for future versions of DotP or if you modify your generator to spit out stubs for other game engines as well, but for DotP 2013 I think it's probably just wasted space.

I agree even just stubbing things out can save people quite a bit of time when they get to coding which is why when my code can't figure out what an ability needs to do it just stubs it so I can manually add it later. I was mainly saying they were stubs because it wasn't totally clear in your previous posts and I don't think you would want regular users downloading them then reporting that they don't work. I just thought that mentioning that they were stubs might save you and some regular users some hassle.

Auto-scripting some of the basic abilities (Flying, Lifelink, Trample, Deathtouch, Annihilator, Battle Cry, Trample, First Strike, etc...) can most definitely be done fairly effectively (I've been experimenting with it myself) though detecting which ability to auto-add can get tricky (like when they multiple abilities on a single line Mirri, Cat Warrior: "First strike, forestwalk, vigilance" or from abilities where they include the card name in the text like Darksteel Citadel: "Darksteel Citadel is indestructible.").
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2078
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 451 times

Re: Card generator

Postby thefiremind » 12 Jul 2012, 08:57

Emashzed wrote:Actually the generator does put ko-KR when available (out of the 2195 cards, only 814 have korean text available).
As far as I could see, Korean started to be used from Dark Ascension onwards, excluding "special" editions (like Planechase 2012).
If you don't inlcude any text for the missing languages, those who play the game in that language will see cards with no text (or the game could even crash). Maybe it would be better to copy the English text onto the missing languages: my Localised tool does that. And I thought about modifying my tool so that it generates the whole XML rather than only the localised text... but time and will were missing. :lol:
< Former DotP 2012/2013/2014 modder >
Currently not really active.
User avatar
thefiremind
Programmer
 
Posts: 3504
Joined: 07 Nov 2011, 10:55
Has thanked: 117 times
Been thanked: 712 times

Re: Card generator

Postby Emashzed » 12 Jul 2012, 10:11

You're very right about this, thefiremind.
I've implemented this behaviour (as well as "proper" ordering of the languages and excluding unused locales)

I also have a first draft of auto scripting of basic characteristics :)

Of course not 100% foolproof, but works nicely already.
"simple" creatures such as Simic Sky Swallower seems generated correctly and only needs art/multiverseId to be complete.

Thanks for the feedback !
Emashzed
 
Posts: 62
Joined: 02 Feb 2011, 15:19
Has thanked: 15 times
Been thanked: 30 times

Re: Card generator

Postby Zambooo » 12 Jul 2012, 15:26

Can someone explain me how to use it? :D
Zambooo
 
Posts: 193
Joined: 01 Jul 2012, 21:33
Has thanked: 18 times
Been thanked: 4 times

Re: Card generator

Postby Lumitosh » 10 Sep 2012, 17:33

Same than Zambooo ?!
Lumitosh
 
Posts: 3
Joined: 09 Sep 2012, 13:30
Has thanked: 0 time
Been thanked: 0 time

Re: Card generator

Postby Persee » 11 Sep 2012, 10:44

Could you create a jar file please ?

It's more easy to use :mrgreen:
User avatar
Persee
 
Posts: 168
Joined: 02 Jun 2011, 08:33
Has thanked: 42 times
Been thanked: 24 times

Re: Card generator

Postby Lirave » 17 Nov 2012, 10:13

very nice tool, did you create a new version witch also adds multiverse id and features like (flying, haste, ... ) ?
if yes, please chare it, i really like your programming style and want to know what has changed.
Lirave
 
Posts: 14
Joined: 13 Nov 2012, 18:17
Has thanked: 0 time
Been thanked: 2 times

Re: Card generator

Postby Takhen » 09 Feb 2013, 22:11

I can't see any exe or application file I could be able to use...
What I have to do to open and use MTG Generator?
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Card generator

Postby thefiremind » 09 Feb 2013, 22:33

Takhen wrote:I can't see any exe or application file I could be able to use...
What I have to do to open and use MTG Generator?
It's a Java application, you should run it from the command prompt, which would probably lead us to another couple of pages full of questions and answers...
This program does exactly the same thing as pcastellazzi's web application, so I have nothing against Emashzed but why should you complicate your life when you have another application available that doesn't even need to be on your hard disk to work? :wink:
< Former DotP 2012/2013/2014 modder >
Currently not really active.
User avatar
thefiremind
Programmer
 
Posts: 3504
Joined: 07 Nov 2011, 10:55
Has thanked: 117 times
Been thanked: 712 times

Next

Return to Utilities

Who is online

Users browsing this forum: No registered users and 2 guests

cron

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form