Images by Set
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Images by Set
by Rob Cashwalker » 24 Nov 2010, 04:50
Actually, adding numbers to the card names isn't going to make any difference.PhoenixAvenger wrote:All right, that's what I feared. So the solution for the time being would then have to be setting the alternate pics as rancor1.jpg, rancor2.jpg, etc. in the pics\ULG\ folder, and similar for other cards. Thanks for the heads-up, and keep us posted for when that support does come.
Rancor only appeared in one set, ULG, Urza's Legacy, right? Then in the ULG sub-folder there may be a file present, rancor.jpg. If there is, then use it, if not, just use rancor.jpg from the regular pics folder. If that's not present then it will be a black background.
Take Rampant Growth as a different example. It's been printed a lot.
- Code: Select all
SetInfo:8ED|Common|http://magiccards.info/scans/en/8e/274.jpg
SetInfo:TMP|Common|http://magiccards.info/scans/en/tp/139.jpg
SetInfo:7ED|Common|http://magiccards.info/scans/en/7e/262.jpg
SetInfo:9ED|Common|http://magiccards.info/scans/en/9e/263.jpg
SetInfo:10E|Common|http://magiccards.info/scans/en/10e/288.jpg
SetInfo:M10|Common|http://magiccards.info/scans/en/m10/201.jpg
SetInfo:6ED|Common|http://magiccards.info/scans/en/6e/246.jpg
SetInfo:MIR|Common|http://magiccards.info/scans/en/mr/133.jpg
One possible option I may throw in, if the card isn't necessarily locked to a particular set, is to then keep trying more and more recent versions until it's found, or it simply defaults.
Another option, will be to download the URL specified, on the fly.
As I said I would look into attempting the alternate set codes as well, I may consider trying to find the file by including "_full", so that the standard HQ MWS distribution can be used more directly. I'm not sure if MWS pics names follow our exact string cleaning rules.
I haven't seen anyone take notice of my change to the CardDetailPanel, where I added a label with the set code in a color scheme according to the rarity.
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 » 24 Nov 2010, 04:57
I noticed it. It looks nice.
Has Unique ID been replaced by Set ID? If that's the case and the AI targets something of mine, and I have two in play, I don't really know exactly which one is targeted. This only matters if the stack description prints the Unique ID as well (which it should). Without a Unique Identifier how can I really tell the difference between two identical objects.
Has Unique ID been replaced by Set ID? If that's the case and the AI targets something of mine, and I have two in play, I don't really know exactly which one is targeted. This only matters if the stack description prints the Unique ID as well (which it should). Without a Unique Identifier how can I really tell the difference between two identical objects.
- 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 » 24 Nov 2010, 05:10
No, the Unique ID is still Unique. Didn't touch the number, just the label...
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 » 24 Nov 2010, 05:25
Ah good. It was just missing so I wasn't sure. I hadn't dug very far into it, just mostly curious.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Images by Set
by PhoenixAvenger » 24 Nov 2010, 05:45
Yeah, sorry, I forgot to add "...and set the PicCount SVar to X in CARDNAME.txt, where X is the highest {n} attached to CARDNAME{n}.jpg plus 1" to that logic. I know the workaround I was going for, anyways. =pRob Cashwalker wrote:Actually, adding numbers to the card names isn't going to make any difference.
The MWS-distro images a) have spaces and b) keep characters like apostrophes, dashes, and the like - so they would have to be mass-renamed to fit Forge's data structure, unless someone (zerker, maybe) changes the card/image parser to auto-trim the extraneous characters. I might pester woogerboy to add Forge conversion functionality to his renaming tool, but until then, I would be content with just manually renaming everything.Rob Cashwalker wrote:As I said I would look into attempting the alternate set codes as well, I may consider trying to find the file by including "_full", so that the standard HQ MWS distribution can be used more directly. I'm not sure if MWS pics names follow our exact string cleaning rules.
I haven't seen anyone take notice of my change to the CardDetailPanel, where I added a label with the set code in a color scheme according to the rarity.
And the set info bit in there seems... different than I would have imagined it. Looks fairly good, though. Does it support mythic rarity? I haven't seen it in the couple times I've run Forge since the conversion...
-

PhoenixAvenger - Posts: 62
- Joined: 31 Aug 2010, 23:34
- Location: NorCal
- Has thanked: 0 time
- Been thanked: 0 time
Re: Images by Set
by Chris H. » 24 Nov 2010, 12:52
`As I said I would look into attempting the alternate set codes as well, I may consider trying to find the file by including "_full", so that the standard HQ MWS distribution can be used more directly. I'm not sure if MWS pics names follow our exact string cleaning rules.
I haven't seen anyone take notice of my change to the CardDetailPanel, where I added a label with the set code in a color scheme according to the rarity.
Yeah, the naming format used by the HQ images here at CCGH are:
- Code: Select all
cardName() + ".full.jpg"
rather than
- Code: Select all
imageName
I like the idea of having forge recognize this format as it may make it easier for the users. I could download the HQ archives at night, uncompress and put the pic files into the proper folders. And not having to rename these HQ pics would be an awesome bonus.
Oh, and BTW, I noticed the new Set ID, it is attractive.
-

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: Images by Set
by Rob Cashwalker » 24 Nov 2010, 23:15
In theory, the set boosters will support mythics. When I get to that part.
There have to be some characters that the HQ pics don't use. I don't think a comma can be in a filename, can it?
There have to be some characters that the HQ pics don't use. I don't think a comma can be in a filename, can it?
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 » 24 Nov 2010, 23:22
Comma can be in a filename.
\ / : * ? " < > | can't.
Also, seconding Chris here, some way of not having to massrename would be nice for us who've already downloaded most/all HQ cardpics rather than let Forge do it for us. Also for the factor of other program's using other naming schemes. I think using <Full non-cleaned name>.full.jpg is standard for several programs, so at least being able to use that would be nice.
Edited because of font.
\ / : * ? " < > | can't.
Also, seconding Chris here, some way of not having to massrename would be nice for us who've already downloaded most/all HQ cardpics rather than let Forge do it for us. Also for the factor of other program's using other naming schemes. I think using <Full non-cleaned name>.full.jpg is standard for several programs, so at least being able to use that would be nice.
Edited because of font.
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 » 25 Nov 2010, 00:34
How is Boom / Bust and other split cards handled?
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 Chris H. » 25 Nov 2010, 01:42
`Rob Cashwalker wrote:How is Boom / Bust and other split cards handled?
I looked inside of the /res/pics_link/ folder and I found this:
- Code: Select all
boombust.jpg http://[server]/PLC/BoomBust.full.jpg
-

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: Images by Set
by Rob Cashwalker » 25 Nov 2010, 02:10
Pang Tong, "Young Phoenix" -
pang_tong_young_phoenix.jpg http://[server]/P3/Pang%20Tong,%20Young%20Phoenix.full.jpg
So, in the case of " or /, the characters are dropped.
pang_tong_young_phoenix.jpg http://[server]/P3/Pang%20Tong,%20Young%20Phoenix.full.jpg
So, in the case of " or /, the characters are dropped.
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 PhoenixAvenger » 26 Nov 2010, 08:43
So as to note this for the record in the forum, Rob added MWS-style card name parsing in revision 3863.
So far, in the tests I've run (after syncing to r3865 and extracting pics en masse from my CCGHQ zips), everything seems to be in order except for basic lands and a few assorted cards. I suspect this has something to do with the number right before the .full.jpg not being properly handled (the parser is probably expecting .full{n}.jpg instead of ...{n}.full.jpg); there might be a similar problem with cards from early expansions like Hymn to Tourach, which has four possible images.
So far, in the tests I've run (after syncing to r3865 and extracting pics en masse from my CCGHQ zips), everything seems to be in order except for basic lands and a few assorted cards. I suspect this has something to do with the number right before the .full.jpg not being properly handled (the parser is probably expecting .full{n}.jpg instead of ...{n}.full.jpg); there might be a similar problem with cards from early expansions like Hymn to Tourach, which has four possible images.
-

PhoenixAvenger - Posts: 62
- Joined: 31 Aug 2010, 23:34
- Location: NorCal
- Has thanked: 0 time
- Been thanked: 0 time
Re: Images by Set
by Rob Cashwalker » 26 Nov 2010, 14:58
Yeah, I wanted to get the code for it pushed up to the SVN, but my wife was pushing me to get to sleep....
Funny enough, I forgot about testing the lands, my test deck consisted of 10 Giant Growth, so I could make sure the various images were found.
I'm not expecting more than one card for any given name, unless the set image isn't found and it defaults back to the original Forge filename format. I guess I could try to work that in..
Edit - Looking at Alpha, there are only 2 land images. Revised only 3. Fifth was the first to have 4 images.
So how should this work? No matter what, the code will always default back to regular images..
Funny enough, I forgot about testing the lands, my test deck consisted of 10 Giant Growth, so I could make sure the various images were found.
I'm not expecting more than one card for any given name, unless the set image isn't found and it defaults back to the original Forge filename format. I guess I could try to work that in..
Edit - Looking at Alpha, there are only 2 land images. Revised only 3. Fifth was the first to have 4 images.
So how should this work? No matter what, the code will always default back to regular images..
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 » 26 Nov 2010, 16:01
We could use a Regex to look for the files. If we just have two optional characters in the spot where lands and multiple images go, we could just randomnly pick one that fit the regex and go with that. The LQ pics from magiccards.info will never use any other pictures except for the the first one it finds for multi-images.
- 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 » 26 Nov 2010, 17:40
That's a little bit more complicated than I wanted.... Especially when considering if Forge downloads the pic, there will only be one image per set.
The original Forge format assumed that the first picture had no number, and each additional picture incremented, starting at 1.
The original Forge format assumed that the first picture had no number, and each additional picture incremented, starting at 1.
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: NadineBaits and 13 guests