It is currently 17 Jan 2019, 04:41
   
Text Size

Here's my DotP2014 (web) generator (discontinued)

Moderators: Xander9009, CCGHQ Admins

Here's my DotP2014 (web) generator (discontinued)

Postby thefiremind » 14 Mar 2013, 00:36

Thefiremind's DotP2014 generator

IMPORTANT NOTICE: This tool is discontinued because I lost the credentials that I would need in order to make further changes.

CLARIFICATION FOR NEW USERS: This tool won't give you the full working card, unless you are searching for a "vanilla" card (no abilities). The code that makes the abilities work still needs to be added. That's what modders do... if there were a program that can automatically generate a fully working card, we would all build any deck in the blink of an eye, but that's not possible.

I wanted to make a step forward from my Localised tool, so I started working on a new card generator. I developed it as a web application, like pcastellazzi did.

Here is the link: http://tfm-dotp-gen.herokuapp.com/

I'd say that its special features are still rudimental, but feel free to test it and report if a card shows something strange in the text. I'll improve it when I have time.


How it works:
It fetches the cards on Gatherer, but it also gets the Italian version from mtgdb.net (when available) which allows older cards to have at least the Italian text with the updated wording ("battlefield", "exile", etc.).
Anyway the main source is Gatherer, so if it's down for maintenance, all the searches will fail. If mtgdb.net is down but Gatherer isn't, the processing will be slower because I have set a timeout of 7 seconds, but it will eventually succeed.
The application is written in Java (it uses Jetty for the server part).


Current special features:
  • Direct saving of the XML file to disk
  • Automatic distinction between types and supertypes
  • Automatic generation of combat animation blocks for creatures (it always gives BLUNT as default animation)
  • Rudimental guessing of ability type (it can fail, but better than making all abilities of a default type... :wink:)
  • Rudimental check for abilities that are wrongly placed on the same line (it can fail too, see the known bugs for details)
  • Rudimental auto-completion of simple keyword abilities, and when I say simple I mean flying, trample, etc. plus some standard one-keyword abilities like undying, persist, exalted, etc.
  • Link to magic-ville.com for searching HQ illustrations

Known bugs:
  • If you search for "Juzam Djinn", while it works if searched inside Gatherer, my application gets a 400 error from Gatherer (you see the search failing "gracefully" at least). It doesn't happen if you search for "Juzám Djinn", that is how the name should be really written.
  • The check that should recognize when 2 different abilities are wrongly written on the same line can still fail when the first ability doesn't end with a full stop. (Test card: Gyre Sage)
  • If you search for a Multiverse ID that belongs to a non-English version of a card, the card fetch seems to work anyway (which has been unexpected for me), but it loads a lot of garbage inside the EXPANSION block.
  • You can't search for the back faces of transform cards: the front face will always be retrieved.
  • Searching for Blood Tribute or Crypt Ghast generates a "Java heap space" error which seems to be connected to the reminder text removal. Since it's an isolated bug and probably depends on some bad formatting inside Gatherer I won't even try to fix it. :P
  • Sometimes the MagicVille link doesn't work. It happens when the search for the card name gives more than one result in MagicVille, so the site returns a page with the search results rather than the page with the card you are searching for, and my application can't manage it. Making this scenario work would be a bit too complicated and not worth the effort in my opinion, so you'll have to bear with it when it happens. Just browse MagicVille manually and search for the card.
Last edited by thefiremind on 22 Jul 2015, 22:59, edited 25 times in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Here's my DotP2013 (web) generator

Postby NEMESiS » 14 Mar 2013, 12:48

Great, I will now be using this. :D


You know what would be amazing? if there was a database were we could all upload the text of our own created working cards (even edit the text to fix issues). That way if someone who wanted "X Card" could just search for it in the database to see its been already created and just download/copy the working text. Just to be clear, I am not asking you to make it since it might be a daunting task but I thought I should bring it up. I can't begin to code that and I think we would need a server for that. What logistics do you think we could need for something like this? Do you think its practicable?
User avatar
NEMESiS
 
Posts: 459
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 68 times
Been thanked: 21 times

Re: Here's my DotP2013 (web) generator

Postby RiiakShiNal » 14 Mar 2013, 15:41

NEMESiS wrote:You know what would be amazing? if there was a database were we could all upload the text of our own created working cards (even edit the text to fix issues). That way if someone who wanted "X Card" could just search for it in the database to see its been already created and just download/copy the working text. Just to be clear, I am not asking you to make it since it might be a daunting task but I thought I should bring it up. I can't begin to code that and I think we would need a server for that. What logistics do you think we could need for something like this? Do you think its practicable?
The way I see that you would need a few pieces to get that working.

  • A SQL Server (of any type: MSSQL, Oracle, MySQL, PostgreSQL, etc...)
  • A server/web application to manage the data (allows for searching, output, manual fixes, etc...)
  • A tool for importing text into the database from existing cards (this could be part of the server application or a separate desktop piece).

Also you would need some kind of security to prevent database corruption/poisoning for updating/correcting. The security would essentially need to allow high level people full access, lower level people update if not present access (allowing for new text to be entered only if a record for that card is not already present), people who have not signed up (or those who have screwed around with the data) would have read-only access.

Such a system would also require modders to agree on and use a specific system for how to key the data (use existing multiverse ids, or create our own key system).

Somewhere I probably have a data management web application (that I coded a while back) that could be adapted to this. It already has user-level security as well as a SQL data management back end with search capability, though import/export (upload/download) coding would need to be added. Would probably also want to add change history to the system so changes can be rolled back if necessary (in case of an incorrect update or deliberate poisoning of the data).
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: 2103
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 464 times

Re: Here's my DotP2013 (web) generator

Postby thefiremind » 14 Mar 2013, 15:49

NEMESiS wrote:You know what would be amazing? if there was a database were we could all upload the text of our own created working cards (even edit the text to fix issues).
I can't even manage HTTP sessions with a free account on Heroku (they want credit credentials for adding persistence capabilities), let alone a fully functional DB... so either you find another free platform that is equally easy to manage with just Eclipse, or you count me out for this. :lol:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Here's my DotP2013 (web) generator

Postby RiiakShiNal » 14 Mar 2013, 16:08

thefiremind wrote:I can't even manage HTTP sessions with a free account on Heroku (they want credit credentials for adding persistence capabilities), let alone a fully functional DB... so either you find another free platform that is equally easy to manage with just Eclipse, or you count me out for this. :lol:
I don't know about a free development platform that can handle that, but setting up a database and some webspace that supports PHP development is pretty easy as I already have it. I can just use a sub-domain on my website (dragonanime.org, sourcefalcon.com) like what I'm already using (mtg.dragonanime.org) and just set up another MySQL database (I already have 4 or 5 different databases set up). Setting up an ftp account for developers to that portion of the website is also easy. Wouldn't be able to use my existing management application though (it's all in C#, not PHP).
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: 2103
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 464 times

Re: Here's my DotP2013 (web) generator

Postby NEMESiS » 14 Mar 2013, 18:05

Ok, well i have decent computer that I do not utilize since I built my "rig". I could rebuild it with a clean Operating System and I assume I just need server 2005/2008 right? I "might" be able to acquire that software. Is this good enough or is a different platform more reliable? If this can be made I would like to help if can.
User avatar
NEMESiS
 
Posts: 459
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 68 times
Been thanked: 21 times

Re: Here's my DotP2013 (web) generator

Postby RiiakShiNal » 14 Mar 2013, 21:10

NEMESiS wrote:Ok, well i have decent computer that I do not utilize since I built my "rig". I could rebuild it with a clean Operating System and I assume I just need server 2005/2008 right? I "might" be able to acquire that software. Is this good enough or is a different platform more reliable? If this can be made I would like to help if can.
The main requirement for a decent web server is either a static IP or a stable DNS entry. Dynamic DNS can work but is not recommended for web servers running web applications.

As for the OS, virtually any stable operating system can work. Most companies tend to prefer Unix/Linux for their web servers as Unix/Linux can be very stable and requires low resource usage. Many different versions of Linux can be acquired for free. Windows (either server or desktop versions) can work and is recommended for ASP .Net applications (.Net has not yet been fully ported to Linux), though has higher resource usage. The main requirement for setting up a Windows server is installing IIS (comes as an optional component Windows Professional or higher) or Apache (free and open source). If you are a student (.edu e-mail address) then through Microsoft's DreamSpark website you can get Windows Server 2008/2008 R2/2012 for free (as well as many other Microsoft developer products).

Oh it should also be noted that a web server can be a drain on local internet connections depending on how much utilization it gets and how good the internet connection is. So generally speaking it usually is not good to run a site that is expected to get a lot of traffic from your house. Running a small web server that only gets sporadic traffic is generally fine though.
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: 2103
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 464 times

Re: Here's my DotP2013 (web) generator

Postby NEMESiS » 14 Mar 2013, 22:57

I don't want to further derail this thread so I will create a new topic to further discuss this.
User avatar
NEMESiS
 
Posts: 459
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 68 times
Been thanked: 21 times

Re: Here's my DotP2013 (web) generator

Postby Takhen » 17 Mar 2013, 22:24

Abilities?! Images?! But it is wonderful!
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Here's my DotP2013 (web) generator

Postby Threepwood » 25 Mar 2013, 12:29

Argh! Why didn't I check out this thing (or pcastellazzi's) earlier?!
I've wasted so much time!
--------------------------------------------------------------------------------------------------
I like having low self-esteem, it makes me feel special.
User avatar
Threepwood
 
Posts: 22
Joined: 22 Jul 2012, 13:57
Has thanked: 4 times
Been thanked: 4 times

Re: Here's my DotP2013 (web) generator

Postby Scion of Darkness » 28 Jun 2013, 09:27

Fire any plans to update it to 2014 with prefix field?
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Here's my DotP2013 (web) generator

Postby thefiremind » 28 Jun 2013, 13:25

The plan is there, the necessary time is not, so be patient. :wink:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Here's my DotP2014 (web) generator

Postby thefiremind » 30 Jun 2013, 22:21

Sorry for double posting, but I wanted to inform everyone that my generator has been updated for DotP2014. The main updates:
  • We can add a prefix to the ID, so our cards won't interfere with cards created by another modder (as long as we all use different prefixes). This already makes our IDs different from the original Multiverse ID so I suppressed the "A" prefix on the art ID.
  • The abilities that the generator can auto-complete have been updated, but the ones that required code that wasn't present on DotP2014 are still untested as I'm writing this, so please inform me if an auto-completed ability is bugged.
  • You can just ignore it, anyway I added the ExportVersion tag as in the official DotP2014 cards, you can use it to track the revision number of your cards if you want.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Here's my DotP2014 (web) generator

Postby Scion of Darkness » 01 Jul 2013, 08:21

Thanks fire you are a lifesaver ;)
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Here's my DotP2014 (web) generator

Postby Drakno » 12 Sep 2013, 13:15

Soooo, I input the name of the card and it generates a text, the effect is probably correct since Emeria, the Sky Ruin is a rather simple card what do I do with that text from then on and what programs do I need?
Drakno
 
Posts: 52
Joined: 15 Oct 2012, 19:03
Has thanked: 33 times
Been thanked: 2 times

Next

Return to Utilities

Who is online

Users browsing this forum: No registered users and 2 guests


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