Page 1 of 5

Oracle Text In cards.txt Files

PostPosted: 24 Jun 2011, 18:45
by friarsol
Alright, so I'm updating the setInfo script to also check for (and update) Oracle text. I've done a few random batches of cards and they all look right. Right now I'm stripping out any curly braces around Tap and Mana Symbols. I'm also handling spacing between consecutive Mana symbols as well as Hybrid Mana since that's generally how our system reads.

Does anyone have any specific cards that might be have tricky Oracle descriptions that I should specifically test? Is there any other text handling cases I need to be on the look out for?

Re: Oracle Text In cards.txt Files

PostPosted: 24 Jun 2011, 20:40
by Rob Cashwalker
Are you replacing the current Text field or adding the extra field?

You should also consider how to update oracle text for cards that already have it.

Re: Oracle Text In cards.txt Files

PostPosted: 24 Jun 2011, 21:05
by friarsol
I was adding a new field.

Architects of Will | Open
Name:Architects of Will
ManaCost:2 U B
Types:Artifact Creature Human Wizard
Text:no text
PT:3/3
K:Cycling:UB
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigRearrange | TriggerDescription$ When CARDNAME enters the battlefield, look at the top three cards of target player's library, then put them back in any order.
SVar:TrigRearrange:AB$RearrangeTopOfLibrary | Cost$ 0 | ValidTgts$ Player | TgtPrompt$ Choose target player. | NumCards$ 3
SVar:RemRandomDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/architects_of_will.jpg
Oracle:When Architects of Will enters the battlefield, look at the top three cards of target player's library, then put them back in any order.\nCycling UB (UB, Discard this card: Draw a card.)
SetInfo:ARB|Common|http://magiccards.info/scans/en/arb/17.jpg
End


Should I be replacing the name of the card with CARDNAME?

Yea I was thinking about updating Oracle text, but I think that's going to have to happen similarly to the reprintSetInfo script since we don't want to be asking for every single card. Maybe the next time there's an Oracle update we can look into how to get the updated cards into a parseable format and just purge/regrab this Oracle texts.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 01:41
by Braids
friarsol wrote:Is there any other text handling cases I need to be on the look out for?
B.F.M. (Big Furry Monster)
... just kidding, that's a nightmarish card from one of the Un-Sets.

seriously, i think if you can handle the symbols for tap, untap, hybrid colored mana, hybrid colored/colorless mana, and phyrexian mana, that about covers it.

naming convention of cards.txt files

PostPosted: 25 Jun 2011, 01:48
by Braids
on a related note, is it safe to assume the following:

name field inside txt file = Oracle name, converted from Unicode to imperfect ASCII ('AE' to two characters, removal of accent marks from vowels)
and
name of txt file itself = name field, all punctuation removed, spaces replaced with underscores, and converted to all lower-case + ".txt"

are these always true? if so, i plan to write code that assumes so.

(or should i post a new topic?)

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 02:00
by Hellfish
That is strived for, but I just noticed some Lim-Dûl cards and Khabál Ghoul were incorrect. I'll fix them, but I don't know if there are more.
EDIT:Of course, that'll make finding them in the deck editor a bit cumbersome.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 02:45
by friarsol
Ah I just tested some of the special character cards.

Code: Select all
Oracle:Whenever a creature enters the battlefield, Æther Flash deals 2 damage to it.
Code: Select all
Oracle:Whenever Lim-Dûl's Cohort blocks or becomes blocked by a creature, that creature can't be regenerated this turn.
I don't think this should matter because we won't have the same OS reading issues that file names have, and they are literally going to be used directly as strings. If we think it's a problem I can look into "simplifying" this type of instance.

Braids, hyphens and spaces are converted to underscores, commas and apostrophes are removed (I'm not sure if there are any other punctuation used).

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 12:27
by Hellfish
Alright, the special characters å,ä,ö,â,û and Æ are now present in Forge on the same cards as on Gatherer, but you can still search for their simplified form in the deck editor (a,o,u,ae)

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 13:10
by friarsol
Hellfish wrote:Alright, the special characters å,ä,ö,â,û and Æ are now present in Forge on the same cards as on Gatherer, but you can still search for their simplified form in the deck editor (a,o,u,ae)
Looks like cardforge.org isn't playing nice with the new card names. We probably need to simplify the characters there before requesting them when downloading set pics.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 13:52
by Hellfish
On it. Shouldn't be too terrible :)

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 14:06
by friarsol
Hellfish wrote:On it. Shouldn't be too terrible :)
Also, existing decks aren't translating in the same manner. I posted on the commit, but not sure if you see those. One Quest Opponent was using Dandan and I couldn't play him because of it.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 14:08
by Hellfish
Yeah, I saw that, and have changed all quest opponents already. Download Set LQ Pictures now also simplifies the name before requesting the card. Just questData remaining.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 15:04
by friarsol
The AI just played a Legions of Lim-Dul and the font is all messed up. We should probably get that fixed up if we are going to be displaying accented characters and the like.

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 15:23
by Hellfish
That's odd, it doesn't do that here. Which Look & Feel are you using? Where is the font messed up?

Re: Oracle Text In cards.txt Files

PostPosted: 25 Jun 2011, 15:37
by friarsol
Not sure, maybe Windows Classic?