It is currently 13 Aug 2025, 21:12
   
Text Size

Oracle Text In cards.txt Files

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Oracle Text In cards.txt Files

Postby Chris H. » 25 Jun 2011, 18:02

Using the default LAF for MacOS: "gui.laf=com.apple.laf.AquaLookAndFeel"

I get the same result with "Use LAF Fonts" on or off.

Using Apple Mac OS X Snow Leopard v10.6.8

`
Attachments
Screen shot.jpg
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Oracle Text In cards.txt Files

Postby Hellfish » 25 Jun 2011, 18:09

Yeah, I know why it's happening. The font used is not a UNICODE font and tries to represent the single two-byte character û as two separate ASCII one-byte characters.I'm poking around,trying out different solutions right now. EDIT: It worked for me because I'm on a different ASCII codepage, which happens to contain those characters.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Common methods? (Re: naming convention of cards.txt files)

Postby Braids » 25 Jun 2011, 18:34

Braids wrote: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"
i'm glad I posted here, it seems that my mention of unicode helped with the oracle text, even though it was ever so slightly off topic.

are there common methods to perform either of these conversions? if so, where? if not, i can take a crack at 'em.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. ;)
User avatar
Braids
Programmer
 
Posts: 556
Joined: 22 Jun 2011, 00:39
Location: Unknown. Hobby: Driving myself and others to constructive madness.
Has thanked: 1 time
Been thanked: 1 time

Re: Oracle Text In cards.txt Files

Postby Hellfish » 25 Jun 2011, 18:54

I added CardUtil.simplifyNameString(String) for this purpose, but it's not exactly UNICODE->ASCII conversion, just replacement operations.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Oracle Text In cards.txt Files

Postby Braids » 25 Jun 2011, 19:23

Hellfish wrote:I added CardUtil.simplifyNameString(String) for this purpose, but it's not exactly UNICODE->ASCII conversion, just replacement operations.
we wouldn't want exact unicode to ascii conversion, because that would prohibit asymmetric replacements. for example, when replacing accented vowels with non accented versions, one cannot convert it back to the original unicode because the information about the accent mark has been lost.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. ;)
User avatar
Braids
Programmer
 
Posts: 556
Joined: 22 Jun 2011, 00:39
Location: Unknown. Hobby: Driving myself and others to constructive madness.
Has thanked: 1 time
Been thanked: 1 time

Re: Oracle Text In cards.txt Files

Postby Hellfish » 26 Jun 2011, 13:23

Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Oracle Text In cards.txt Files

Postby Chris H. » 26 Jun 2011, 13:30

Hellfish wrote:Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
`
I will try to check this out in a few hours, my wife wants me to go out with her for a few hours. :mrgreen:
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Oracle Text In cards.txt Files

Postby slapshot5 » 26 Jun 2011, 16:00

Hellfish wrote:Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
I have the same setup as Chris basically, and thus, the same problem. I changed those 3 things to Arial. The problem still exists as described.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Oracle Text In cards.txt Files

Postby friarsol » 26 Jun 2011, 17:15

Hellfish wrote:Chris & Sol, could you try something for me, just to rule something out?
Get r10066 or later and go into res/gui/gui.properties and change CardPanel/font, CardDetailPanel/font and DeckEditor/CardTable/font to Arial instead of Dialog.See if that helps.
Just tried this and I got stuck in an Infinite Loop of Errors.

Code: Select all
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.awt.EventDispatchThread.handleException(Unknown Source)
   at java.awt.EventDispatchThread.processException(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.Dialog$1.run(Unknown Source)
   at java.awt.Dialog$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Dialog.show(Unknown Source)
   at java.awt.Component.show(Unknown Source)
   at java.awt.Component.setVisible(Unknown Source)
   at java.awt.Window.setVisible(Unknown Source)
   at java.awt.Dialog.setVisible(Unknown Source)
   at forge.error.ErrorViewer.showDialog(ErrorViewer.java:140)
   at forge.error.ErrorViewer.showError(ErrorViewer.java:76)
   at forge.error.ErrorViewer.showError(ErrorViewer.java:48)
   at forge.error.ExceptionHandler.handle(ExceptionHandler.java:48)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Oracle Text In cards.txt Files

Postby Hellfish » 26 Jun 2011, 17:29

The Security error was accidental, and was fixed r10067. (Java is surprisingly sensitive about certain imports..)

I'm scrounging for time tonight, but I'm on this every second I can.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Oracle Text In cards.txt Files

Postby friarsol » 26 Jun 2011, 18:07

Hellfish wrote:The Security error was accidental, and was fixed r10067. (Java is surprisingly sensitive about certain imports..)
I'm not sure why I was getting that, maybe Eclipse hadn't refreshed. Changing the font doesn't seem to help though. It might have been the display Option. I was on Napkin and it was just giving me the same thing.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Oracle Text In cards.txt Files

Postby Hellfish » 26 Jun 2011, 18:23

Wait, you're still getting the same error, after r10067?
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Oracle Text In cards.txt Files

Postby Hellfish » 26 Jun 2011, 18:23

Wait, you're still getting the same error, after r10067?
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Oracle Text In cards.txt Files

Postby friarsol » 26 Jun 2011, 18:49

Hellfish wrote:Wait, you're still getting the same error, after r10067?
Yep I was never on r10067, I didn't get home till after it was up to 71, and sync'd straight to that and then tried it.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Oracle Text In cards.txt Files

Postby Chris H. » 26 Jun 2011, 19:14

Chris H. wrote:I will try to check this out in a few hours, my wife wants me to go out with her for a few hours. :mrgreen:
`
Like Slapshot said we have very similar system setups. I am currently using rev 10070 and a new test. My gui.properties file was edited and now looks like this:

Display--file=display_layout.xml
Display/new--file=display_new_layout.xml
DeckEditor--file=deck_editor_layout.xml
CardPanel/font=Arial
CardDetailPanel/font=Arial
DeckEditor/CardTable/font=Arial
`
and I am still getting the incorrect two character interpretation for the accented character for the Lim Dul creatures. I opened one of these creature's modified card txt files and this is what I see:

Name:Lim-Dûl's Cohort
ManaCost:1 B B
Types:Creature Zombie
Text:no text
PT:2/3
T:Mode$ Blocks | ValidCard$ Card.Self | ValidBlocked$ Creature | Execute$ TrigBlocks | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, that creature can't be regenerated this turn.
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | ValidBlocker$ Creature | Execute$ TrigBlocked | Secondary$ True | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, that creature can't be regenerated this turn.
SVar:TrigBlocks:AB$Pump | Cost$ 0 | Defined$ TriggeredAttacker | KW$ HIDDEN CARDNAME can't be regenerated.
SVar:TrigBlocked:AB$Pump | Cost$ 0 | Defined$ TriggeredBlocker | KW$ HIDDEN CARDNAME can't be regenerated.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/lim_duls_cohort.jpg
SetInfo:ICE|Common|http://magiccards.info/scans/en/ia/33.jpg
End
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 17 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 17 users online :: 0 registered, 0 hidden and 17 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 17 guests

Login Form