Page 1 of 4

HQ Cards Picture Support

PostPosted: 02 Dec 2009, 21:39
by Vasiliy
Hello.
I add to project (Forge) HQ Cards picture Support (picture 480*680) and URL links of many HQ cards picture.
Now project use only HQ picture. Project resize picture.
In Deck Editor you can see HQ picture. Move mouse on card picture. Open popUp window:
Image

If you move out mouse, popup window is close:

Image

Before first run need remove all picture cards from pics folder!!!
Then need download all HQ picture. Forge download only support cards picture.

If you add new cards, you can download HQ picture for these. URL Links for this picture is include now!!!

Source is in attachment.

I have one question: Add this code in SVN?

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:04
by Marek14
Hm, if Forge can use HQ pictures, could it take them from elsewhere?

The HQ project here means that some people (me, for example) already have the HQ images sorted in directories according to sets.

Wouldn't it be great if Forge could simply use these pictures from their existing directory instead of requiring a separate copy of each?

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:13
by Triadasoul
Great news. Thank you. It is the thing i wanted most in MTG forge! =)

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:16
by DennisBergkamp
Awesome stuff!
Yes, please add this to the SVN.

Marek, I think if you just copy your existing HQ pics into /pics/, nothing will get overwritten (provided of course they have the correct naming convention) - just like the way it works right now. Correct me if I'm wrong, Vasiliy... by the way, how do they show up in game? If the pictures are too big, I'm not sure if they would show up correctly, unless you resize them.
If this is the case, maybe we should make a separate HQ pics directory.

EDIT: or does the "pop up" feature also happen in game ? That would really be awesome :)

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:21
by Triadasoul
I think Mark14 meant that we can use already downloaded Magic Workstation picture folder. But there are several complexities:
1. Directory structure for sets
2. Card naming with spaces and *.full.jpg extension
3. Various card art for different sets

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:26
by DennisBergkamp
Oh right, I misread... no that would be trickier :(
Currently, Forge doesn't even have set information stored.

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:39
by silly freak
...wich wouldn't matter if we didn't have to match cards to the right folder. we could just search for it, trial and error-like

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:42
by Triadasoul
Nevertheless for now it's a great improvement.
What if card-pictures.txt could be transformed someday into read picture index with a certain path/name for each card? If there's a way to convert MWS masterbase with SQL to this index format the idea with sets/directory support doesn't seems to be so tricky in this part.

Re: HQ Cards Picture Support

PostPosted: 02 Dec 2009, 22:55
by DennisBergkamp
I've just updated my local source with the update. It really looks awesome, thanks again Vasiliy!!!
I'm still in the progress of downloading all of the pictures though (it's at pic #351 right now...)

What would be cool is to show the same full size 640x480 picture when hovering (or maybe clicking, to have it stick?) over the lower right pic in game as well.

EDIT: downloaded all pics, it's quite large, 400+ megs.

Re: HQ Cards Picture Support

PostPosted: 03 Dec 2009, 01:38
by Huggybaby
This is fantastic news! I'm always happy when our HQ Pics are able to enhance another program. My only question is, what took so long. Just kidding!

I'm going to make this an announcement.

Thanks Vasiliy and the rest of the Forge team.

Re: HQ Cards Picture Support

PostPosted: 03 Dec 2009, 06:46
by Marek14
DennisBergkamp wrote:Oh right, I misread... no that would be trickier :(
Currently, Forge doesn't even have set information stored.
Well, if this is not possible, how about simply allowing local links in card-pictures.txt?

I.e. you select the directory, and the file will copy pictures from it, as specified in the path.

For example instead of

acolyte_of_xathrid.jpg http://www.wizards.com/global/images/ma ... athrid.jpg

it would say

acolyte_of_xathrid.jpg M10\Acolyte of Xathrid.full.jpg

And if you specify "D:\magic\" in your sets, it will search for it on D:\magic\M10\Acolyte of Xathrid.full.jpg

The advantage is that if you already HAVE all those pictures, you wouldn't need to download them again, and you wouldn't have to search for them by hand and copy them over either.

As for tokens, if we agree on general nomenclature, I can rename the HQ versions and prepare an image folder myself - that's easy.

Also, this might be a good time to think about general multi-image support. I'd suggest this:

The general structure of picture name will be card_name.code.jpg

Where card_name is the card name and code is (optional) string that can be anything you want. When the game starts, images are being loaded. Every card corresponds to unique card_name string, and the code can be specified in the deck file (but doesn't have to). For example in parenthesis after the card name. In deckbuilder, you could switch between basic input without codes and input with codes. In this mode, arrows will appear next to the card image (when multiple codes are available), and you could scroll them.

If no code is specified, on creation of card it's assigned a random image out of all that have the specific cardname. If a code IS specified, Forge will try to find image with this code, and will use a random one when it's impossible.

The standardized code will be three-letter set code plus a number, when needed. For example forest.zen1.jpg

This would allow to use the HQ pics to their full extent.

What do you think?

Re: HQ Cards Picture Support

PostPosted: 03 Dec 2009, 07:44
by Vasiliy
Hello.

Marek14:
I can add to project next algoritm :
1. User select folder, where he has all HQ picture.
2. Forge analysing all picture in folder and all subfolder.
3. If it found HQ cards, it copy these card to pics catalog in Forge.

In this algoritm i can add support only such cards name format. Example: Bad Moon.full.jpg, Ballista Squad.full.jpg and so forth.
Algoritm found this card, copy in pics folder and rename it to Forge Cards format.
Example: Bad Moon.full.jpg -> bad_moon.jpg
Ballista Squad.full.jpg -> ballista_squad.jpg

If you want, then i start writing this algoritm.

Re: HQ Cards Picture Support

PostPosted: 03 Dec 2009, 08:42
by silly freak
we could make a properties file that separately stores the paths to every card picture. then we would just have to look up the pictures there, and not copy them.

if we place it in the HQ pics folder, we can use relative paths also. all we need is someone writing the file, and changing the picture-finding code to using it.

Re: HQ Cards Picture Support

PostPosted: 03 Dec 2009, 09:57
by Marek14
silly freak wrote:we could make a properties file that separately stores the paths to every card picture. then we would just have to look up the pictures there, and not copy them.

if we place it in the HQ pics folder, we can use relative paths also. all we need is someone writing the file, and changing the picture-finding code to using it.
I could probably make the file, although not the code. But what about the multipic idea I illustrated before? If there's any chance of it being implemented, I could take it into account when making the file.

Vasiliy's algorithm also sounds like a good idea, but it needs to address cards with multiple versions as well. Would it just copy the first relevant picture it finds?

Re: HQ Cards Picture Support

PostPosted: 03 Dec 2009, 10:51
by Vasiliy
Marek14 wrote:
silly freak wrote:Vasiliy's algorithm also sounds like a good idea, but it needs to address cards with multiple versions as well. Would it just copy the first relevant picture it finds?
Yes, copy first picture.