HQ Cards Picture Support
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
HQ Cards Picture Support
by Vasiliy » 02 Dec 2009, 21:39
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:
If you move out mouse, popup window is close:
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?
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:
If you move out mouse, popup window is close:
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?
- Attachments
-
- Forge_HQ_support_source.zip
- Source
- (215.95 KiB) Downloaded 2572 times
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by Marek14 » 02 Dec 2009, 22:04
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?
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
by Triadasoul » 02 Dec 2009, 22:13
Great news. Thank you. It is the thing i wanted most in MTG forge! =)
- Triadasoul
- Posts: 223
- Joined: 21 Jun 2008, 20:17
- Has thanked: 0 time
- Been thanked: 4 times
Re: HQ Cards Picture Support
by DennisBergkamp » 02 Dec 2009, 22:16
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
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
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by Triadasoul » 02 Dec 2009, 22:21
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
1. Directory structure for sets
2. Card naming with spaces and *.full.jpg extension
3. Various card art for different sets
- Triadasoul
- Posts: 223
- Joined: 21 Jun 2008, 20:17
- Has thanked: 0 time
- Been thanked: 4 times
Re: HQ Cards Picture Support
by DennisBergkamp » 02 Dec 2009, 22:26
Oh right, I misread... no that would be trickier
Currently, Forge doesn't even have set information stored.
Currently, Forge doesn't even have set information stored.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by silly freak » 02 Dec 2009, 22:39
...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
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: HQ Cards Picture Support
by Triadasoul » 02 Dec 2009, 22:42
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.
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.
- Triadasoul
- Posts: 223
- Joined: 21 Jun 2008, 20:17
- Has thanked: 0 time
- Been thanked: 4 times
Re: HQ Cards Picture Support
by DennisBergkamp » 02 Dec 2009, 22:55
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.
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.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by Huggybaby » 03 Dec 2009, 01:38
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.
I'm going to make this an announcement.
Thanks Vasiliy and the rest of the Forge team.
-
Huggybaby - Administrator
- Posts: 3207
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 701 times
- Been thanked: 594 times
Re: HQ Cards Picture Support
by Marek14 » 03 Dec 2009, 06:46
Well, if this is not possible, how about simply allowing local links in card-pictures.txt?DennisBergkamp wrote:Oh right, I misread... no that would be trickier
Currently, Forge doesn't even have set information stored.
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
by Vasiliy » 03 Dec 2009, 07:44
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.
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.
Last edited by Vasiliy on 04 Dec 2009, 13:02, edited 1 time in total.
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: HQ Cards Picture Support
by silly freak » 03 Dec 2009, 08:42
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.
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.
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: HQ Cards Picture Support
by Marek14 » 03 Dec 2009, 09:57
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.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.
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
by Vasiliy » 03 Dec 2009, 10:51
Yes, copy first picture.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?
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
51 posts
• Page 1 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 88 guests