Images by Set
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Images by Set
by Hellfish » 26 Nov 2010, 17:40
Just realized something: Conflux's set code is CON and when looking for images for those cards Forge will look in Pics\CON\<card>. This will always fail on windows (at least XP and earlier.) because CON is a reserved file/foldername, no other folders can be named that.
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
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
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Images by Set
by Rob Cashwalker » 26 Nov 2010, 17:52
<charlie brown>AUUGGHH!</charlie brown>
Edit - Just checked, actually it's CFX. YEEAAAHHH!
Edit - Just checked, actually it's CFX. YEEAAAHHH!
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Images by Set
by Hellfish » 26 Nov 2010, 18:40
Phew..So, just a matter of using grep to replace SetInfo:CON with SetInfo:CFX then. Arch's mtg-data also says CON, that's where I got it from.
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
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
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Images by Set
by Rob Cashwalker » 27 Nov 2010, 08:14
I just looked at friarsol's setInfoScript, and sure enough it's listed as CON. However, the set code list in the SetInfoUtil class has CFX. My list comes from the HQ pics thread in the Pictures forum. The Wizards set code may be CON, however the MWS folks figured it out already and use CFX instead....
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Images by Set
by friarsol » 27 Nov 2010, 15:11
Ahh.. probably, I was going off a list on Wizards site, and had wrote up the set list before you had written your class. I didn't even consider it wouldn't be the same. Stupid Bill Gates and his secret folder names.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Images by Set
by Rob Cashwalker » 27 Nov 2010, 16:21
I did a search and replace in eclipse and took care of 92 card files. No grep, no problem!
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Images by Set
by friarsol » 27 Nov 2010, 20:59
Did you update the script too? I won't be home till tmrw night.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Images by Set
by Rob Cashwalker » 28 Nov 2010, 01:41
No, haven't updated the script.. but I could.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Images by Set
by Rob Cashwalker » 28 Nov 2010, 17:05
I just committed an update that should take care of the slow down issue.
I reverted the ImageCache, then made a couple changes to pull the file from a new property of the Card.
I added a buildFilename method to CardUtil to actually process the set image searching.
I added a getMostRecentSet method to the Card, to enable display of the most recent printing for DeckEditor.
If the set image can't be found, use none.jpg:
I reverted the ImageCache, then made a couple changes to pull the file from a new property of the Card.
I added a buildFilename method to CardUtil to actually process the set image searching.
I added a getMostRecentSet method to the Card, to enable display of the most recent printing for DeckEditor.
If the set image can't be found, use none.jpg:
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Images by Set
by Hellfish » 29 Nov 2010, 15:01
Things work much better now, almost all cards show up properly.A few things, however:
-Cards that are Regress -ed, Gravedigger -ed or the like seem to lose all setinfo and just show up completely blank.
-It would be nice if the quest Card Shop was updated, like the deck editor has been.
-Cards that have multiple versions, such as most cards in Alliances and most lands, show up blank.(Still)
-none.jpg doesn't seem to be used. Shouldn't I place it in the /pic root?
-Cards that are Regress -ed, Gravedigger -ed or the like seem to lose all setinfo and just show up completely blank.
-It would be nice if the quest Card Shop was updated, like the deck editor has been.
-Cards that have multiple versions, such as most cards in Alliances and most lands, show up blank.(Still)
-none.jpg doesn't seem to be used. Shouldn't I place it in the /pic root?
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
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
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Images by Set
by friarsol » 29 Nov 2010, 15:46
Cards that move zones sometimes(always?) are copied before they enter the new zone. We should make sure to copy over the SetInfo stuff there.Hellfish wrote:Things work much better now, almost all cards show up properly.A few things, however:
-Cards that are Regress -ed, Gravedigger -ed or the like seem to lose all setinfo and just show up completely blank.
-It would be nice if the quest Card Shop was updated, like the deck editor has been.
-Cards that have multiple versions, such as most cards in Alliances and most lands, show up blank.(Still)
-none.jpg doesn't seem to be used. Shouldn't I place it in the /pic root?
I don't use the HQ files on my machine. What is the format for Alliances Commons, and other cards with multiple images per set? I think we'll need to use a regex to find them since there may be optional characters in the filename.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Images by Set
by Hellfish » 29 Nov 2010, 16:05
The filename format for all cards is, AFAIK, <Full name with characters illegal in a filename removed>[1-4 usually].full.jpg. Only if there are multiple versions, they are all numbered starting at 1.
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
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
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Images by Set
by Rob Cashwalker » 29 Nov 2010, 18:18
For cards with multiple artwork, they need the PicCount SVar in the card data. So far, only lands have it.
yes, none.jpg goes in the normal picture folder. Unless you've changed your Image_Base folder. (in which case, the normal picture folder is whatever folder that is....)
I'll look at adding the image setup to the card shop.
There's a good chance Regress and Gravedigger may also affect SVars. Not only SetInfo needs to be copied, but the ImageFilename property I just added. There's a copy method in CardFactory, that may or may not be used in this case, but I think the Card object needs to become Cloneable, then the copy method is built-in, and usable from anywhere.
yes, none.jpg goes in the normal picture folder. Unless you've changed your Image_Base folder. (in which case, the normal picture folder is whatever folder that is....)
I'll look at adding the image setup to the card shop.
There's a good chance Regress and Gravedigger may also affect SVars. Not only SetInfo needs to be copied, but the ImageFilename property I just added. There's a copy method in CardFactory, that may or may not be used in this case, but I think the Card object needs to become Cloneable, then the copy method is built-in, and usable from anywhere.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Images by Set
by Hellfish » 29 Nov 2010, 18:50
Found some more issues:
-I have none.jpg in the /pic root and the cards Forge can't find a proper image for are still blank black.
-Something is still up with lands.I had a TMP swamp and a RAV swamp in hand. The TMP showed the proper picture while the RAV one was blank.Other RAV cards show properly. (Later on a 10E island was blank together with a proper 7ED mountain, 10E Distress showed fine.) I have card pictures for all mentioned, named in the same manner (Swamp1,Swamp2,Swamp3 etc...)
-Draft window also needs the same upgrade as the card shop.
-I have none.jpg in the /pic root and the cards Forge can't find a proper image for are still blank black.
-Something is still up with lands.I had a TMP swamp and a RAV swamp in hand. The TMP showed the proper picture while the RAV one was blank.Other RAV cards show properly. (Later on a 10E island was blank together with a proper 7ED mountain, 10E Distress showed fine.) I have card pictures for all mentioned, named in the same manner (Swamp1,Swamp2,Swamp3 etc...)
-Draft window also needs the same upgrade as the card shop.
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
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
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Images by Set
by Rob Cashwalker » 30 Nov 2010, 13:33
I did get everything working in my local copy, but when I went to play a game, it was so slow I couldn't deal with it. Not sure what's going on, but the biggest change I made was I finally unzipped ALL (almost all, torrent doesn't cover past 10E) of the HQ images. I'm using a resize script in PaintShopPro, to see if it makes a difference.
With no images at all, the none.jpg works fine now, the ImageCache file reverted to one of my previous revisions, even though I thought I uploaded something completely different.
With no images at all, the none.jpg works fine now, the ImageCache file reverted to one of my previous revisions, even though I thought I uploaded something completely different.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Who is online
Users browsing this forum: No registered users and 7 guests