Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Utilities
Card generator
Moderator: CCGHQ Admins
Card generator
by 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
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 1316 times
Re: Card generator
by Emashzed » 11 Jul 2012, 22:52
Here are the XMLs for all of Innistrad/Scars blocs + M12 + M13
(first half)
(first half)
- Attachments
-
- Dotp2013_Standard_Cards_(1620)_part_1.zip
- (1.82 MiB) Downloaded 1703 times
Re: Card generator
by Emashzed » 11 Jul 2012, 22:53
Second part.
Hope I didn't miss anything silly
Hope I didn't miss anything silly
- Attachments
-
- Dotp2013_Standard_Cards_(1620)_part_2.zip
- (1.66 MiB) Downloaded 931 times
Re: Card generator
by Emashzed » 11 Jul 2012, 23:14
Thought I'd do Zendikar too...
All 602 card XMLs in this zip.
All 602 card XMLs in this zip.
- Attachments
-
- Zendikar_Cards_(602).zip
- (1.24 MiB) Downloaded 927 times
Re: Card generator
by 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.
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.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card generator
by 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
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...
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
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...
Re: Card generator
by RiiakShiNal » 12 Jul 2012, 00:54
Ahh, you're right, I see it (Korean localization) on ACIDIC_SLIME_XXXXX, my mistake.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
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.
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.").
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Card generator
by thefiremind » 12 Jul 2012, 08:57
As far as I could see, Korean started to be used from Dark Ascension onwards, excluding "special" editions (like Planechase 2012).Emashzed wrote:Actually the generator does put ko-KR when available (out of the 2195 cards, only 814 have korean text available).
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.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Card generator
by 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 !
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 !
Re: Card generator
by Persee » 11 Sep 2012, 10:44
Could you create a jar file please ?
It's more easy to use
It's more easy to use
Re: Card generator
by 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.
if yes, please chare it, i really like your programming style and want to know what has changed.
Re: Card generator
by 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?
What I have to do to open and use MTG Generator?
-
Takhen - Posts: 235
- Joined: 04 Feb 2013, 19:35
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card generator
by thefiremind » 09 Feb 2013, 22:33
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...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?
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?
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 6 guests