Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Utilities
DOTP2013 Card generator
Moderator: CCGHQ Admins
DOTP2013 Card generator
by pcastellazzi » 02 Jul 2012, 06:17
David Chambers created an awesome tool to access Gatherer with a consistent API. With this tool we probably be able to create a basic card generator which given a card name build most of the XML boilerplate.
I will give it a shot in a week or two. Now my work keep me too busy to have side projects. In the meantime i would like to know what do you think about the idea.
My idea for it right now is to put a web app which given a card name it will give you all the XML we can posibly generate automatically.
At this moment i can think of:
General Notes:
I will give it a shot in a week or two. Now my work keep me too busy to have side projects. In the meantime i would like to know what do you think about the idea.
My idea for it right now is to put a web app which given a card name it will give you all the XML we can posibly generate automatically.
At this moment i can think of:
- Title
- Flavour text
- Casting cost
- Rarity
- Type
- Subtype
- Power
- Toughness
- Common static abilities (dethtouch, flying, etc)
General Notes:
- Everything should be fully translated (Should we google translate missing text?)
- Common static abilities shoulde include proper help tags
- Allow batch processing
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: DOTP2013 Card generator
by thefiremind » 02 Jul 2012, 08:29
The problem is that Gatherer gives translations only for title and flavour text (for recent cards you can find the fully translated picture, but it's not useful for this purpose ). That's why my "Localised" software takes the information from magiccards.info instead of Gatherer.
< 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: DOTP2013 Card generator
by Huggybaby » 02 Jul 2012, 18:12
And that tool only returns json. Please don't forget about the very full featured apps right here:
viewforum.php?f=96
viewforum.php?f=96
-
Huggybaby - Administrator
- Posts: 3207
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 701 times
- Been thanked: 594 times
Re: DOTP2013 Card generator
by pcastellazzi » 03 Jul 2012, 01:44
May be when you looked at it was bugged. Right now it shows the information fully translated when available. The only trick, if you can call it that, is to ask for the printed version of the card, by default it only return the oracle text.thefiremind wrote:The problem is that Gatherer gives translations only for title and flavour text (for recent cards you can find the fully translated picture, but it's not useful for this purpose ). That's why my "Localised" software takes the information from magiccards.info instead of Gatherer.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: DOTP2013 Card generator
by pcastellazzi » 03 Jul 2012, 01:51
I did not. The tool mencioned here is for programmers, more than for final users. The idea is to have a common API to access gatherer information. I plan to use the tool to create an app for final users (which in this particular case are DOTP2013 modders).Huggybaby wrote:And that tool only returns json. Please don't forget about the very full featured apps right here:
viewforum.php?f=96
The other apps mentioned in the post you linked are more generic, and designed to for offline card databases and similar tools. The one i am planning to make is to bootstrap DOTP2013 mods easier.
Some of the problems we have when modding for DOTP are inconsistent file names, duplicated multiverse ids, missing translations, a lot of duplicated lua/xml code. I plan to make this app write all the boilerplate for you.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: DOTP2013 Card generator
by thefiremind » 03 Jul 2012, 08:48
Haha, I didn't even notice that choice between Oracle and Printed! Thanks for the tip!pcastellazzi wrote:The only trick, if you can call it that, is to ask for the printed version of the card, by default it only return the oracle text.
< 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
Progress
by pcastellazzi » 17 Jul 2012, 02:32
I was working with David Chambers the last few days to give tutor the final touches i needed to make it fully functional. A test version is running at: http://poc-tutor.herokuapp.com/, You may find the API documentation at: https://github.com/davidchambers/tutor/
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: DOTP2013 Card generator
by Persee » 25 Jul 2012, 12:15
http://poc-tutor.herokuapp.com/ return a "Cannot GET /" error with firefox and a 404 with IE
Re: DOTP2013 Card generator
by pcastellazzi » 25 Jul 2012, 12:58
That's expected. The app there is a service not a user facing app. If you try something like Birds of paradise you will get a JSON response which is the purpose of the app.Persee wrote:http://poc-tutor.herokuapp.com/ return a "Cannot GET /" error with firefox and a 404 with IE
Right now i am working in the user facing app, it will be ready in a few more days for testing.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
DOTP2013 Card generator is now online.
by pcastellazzi » 26 Jul 2012, 12:47
You can find the app at http://poc-dotpg.herokuapp.com.
What's done?
What's missing?
What's done?
- basic xml skeleton
- localized title/flavour text/abilities
- when the translation is not available the oracle text is used
- a static ability is generated for creatures, a spell ability otherwise
What's missing?
- Ability skeletons for known keywords (deathtouch, first strike, etc)
- Caching of requests to tutor
- Caching of generated xml
- Any other ideas you guys came up
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: DOTP2013 Card generator
by RiiakShiNal » 26 Jul 2012, 13:19
Couple of issues I noticed when doing a couple of quick tests on your generator:
Edit: I guess I should mention these tests were done on the user app.
- It generates a FLAVOURTEXT block even when no flavour text is available for a card (should probably be a quick fix). Examples:
- It does not correctly handle hybrid mana (and probably phyrexian mana) in card abilities (should be relatively easy to fix). Example:
- Rhys the Redeemed - In localised text {G/W} should instead be {d}
- It does not separate card abilities into blocks when more than one ability block is present (this will probably be harder to fix). Examples:
- Blight - Should have 2 ability blocks
- Blightsteel Colossus - Should have at least 3 ability blocks
- Rhys the Redeemed - Should have 2 ability blocks
Edit: I guess I should mention these tests were done on the user app.
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: DOTP2013 Card generator
by thefiremind » 26 Jul 2012, 14:06
I tried with Mold Shambler and I saw that it also adds an additional line in the flavour text which only contains "— ".RiiakShiNal wrote:It generates a FLAVOURTEXT block even when no flavour text is available for a card
< 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: DOTP2013 Card generator
by RiiakShiNal » 26 Jul 2012, 14:38
That seems to be because it separates out the Flavour Text and Who the Flavour Text is attributed to (in other words which character said it) then constructs the FLAVOURTEXT block by combining the two and putting in the long dashes and the new line automatically. Unfortunately, it does not work correctly even when an attribution is there if the attribution is slightly different than expected for example the french translation of Plague Beetle (which posed some problems for me as well though I don't separate out the attribution).thefiremind wrote:I tried with Mold Shambler and I saw that it also adds an additional line in the flavour text which only contains "— ".
Edit: Doing a search for Hill Giant gives me an Internal Server Error (though maybe the code is being worked on at the moment).
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: DOTP2013 Card generator
by pcastellazzi » 26 Jul 2012, 18:51
Thanks a lot for your feedback. I believe i fixed all the reported bugs. Also i added some support for well know abilities.
At this point it supports:
At this point it supports:
- battle cry
- changeling
- deathtouch
- defender
- exalted
- fear
- first strike
- flash
- flying
- haste
- hexproof
- lifelink
- reach
- trample
- undying
- vigilance
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: DOTP2013 Card generator
by RiiakShiNal » 26 Jul 2012, 18:58
Well some of them seem to be fixed though Hill Giant, Canyon Minotaur, and Merfolk of the Pearl Trident all seem to cause an Internal Server Error.
It could be that it doesn't like cards with no abilities. Edit: Nevermind Alpha Myr works.
Edit: Filename and Cardname for Aether Figment lost the special character and it was not replaced with "AE".
Edit: Filename and Cardname for Aether Figment lost the special character and it was not replaced with "AE".
- Code: Select all
<FILENAME text="THER_FIGMENT_170993" />
<CARDNAME text="THER_FIGMENT" />
Last edited by RiiakShiNal on 26 Jul 2012, 19:08, edited 1 time in total.
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
40 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 4 guests