[Patch] Forge inline card image acquirer
Posted: 03 Nov 2014, 02:26
Hi everyone.
I have created a patch for Forge which will acquire the card images on an "as required" basis.
This patch adds an extra instruction to the end of Forge's card image loading method.
If the card can not be found in the card image directory, it will attempt to acquire the image via mtgimage (higher resolution than the in-game downloader) and save it to the card image directory so it will be available for immediate and future use.
It will do this only if the image does not already exist and it will acquire the set image for that card (IE. It will differentiate between Armageddon 5ED and Armageddon 6ED and will only download each one once).
As the image will need to be downloaded before it can be displayed, there is a small delay the first time a card is ever displayed while the image is being acquired (This is especially noticeable when viewing an entire deck).
I, however, prefer this to clicking a button to download all the images and waiting hours for it to complete as with this patch you can play the game with card images straight away and the image is still saved for future use as well to prevent having to download it again.
This has been built against Forge Desktop version 1.5.29 and tested under Windows 8.1.
I have not made it platform specific, but I have not tested any other platforms either.
Installation instructions (requires 7-Zip):
1. Download the attached ImageKeys.zip
2. Unzip ImageKeys.class from the ImageKeys.zip file
3. Navigate to the Forge directory
4. If Forge is currently running, close it
5. Make a backup of the Forge Jar file ("forge-gui-desktop-1.5.29-jar-with-dependencies" at time of writing) so you can revert this patch if you wish.
6. Open the original (not the backup) Forge JAR file as an archive in 7-Zip. You should be able to right click it, hover over 7-Zip and select the top "Open archive" option
7. In 7-Zip, navigate into the "forge" folder
8. Drag the extracted ImageKeys.class file into the 7-Zip window. It should replace the existing ImageKeys.class file
9. Close 7-Zip
10. Start Forge in your normal way and test the patch (I use Deck Editor for this)
Hope someone gets some enjoyment from this,
OpenSS
----------
Ver 1.0: 2014-11-03 (6 Downloads)
Initial version
Ver 1.0.1: 2014-11-05
1. Move exception handling earlier in case Forge call fails
2. Change hard-coded folder separator to OS-independent separatorChar
3. Build against 1.5.29 not 1.5.30
I have created a patch for Forge which will acquire the card images on an "as required" basis.
This patch adds an extra instruction to the end of Forge's card image loading method.
If the card can not be found in the card image directory, it will attempt to acquire the image via mtgimage (higher resolution than the in-game downloader) and save it to the card image directory so it will be available for immediate and future use.
It will do this only if the image does not already exist and it will acquire the set image for that card (IE. It will differentiate between Armageddon 5ED and Armageddon 6ED and will only download each one once).
As the image will need to be downloaded before it can be displayed, there is a small delay the first time a card is ever displayed while the image is being acquired (This is especially noticeable when viewing an entire deck).
I, however, prefer this to clicking a button to download all the images and waiting hours for it to complete as with this patch you can play the game with card images straight away and the image is still saved for future use as well to prevent having to download it again.
This has been built against Forge Desktop version 1.5.29 and tested under Windows 8.1.
I have not made it platform specific, but I have not tested any other platforms either.
Installation instructions (requires 7-Zip):
1. Download the attached ImageKeys.zip
2. Unzip ImageKeys.class from the ImageKeys.zip file
3. Navigate to the Forge directory
4. If Forge is currently running, close it
5. Make a backup of the Forge Jar file ("forge-gui-desktop-1.5.29-jar-with-dependencies" at time of writing) so you can revert this patch if you wish.
6. Open the original (not the backup) Forge JAR file as an archive in 7-Zip. You should be able to right click it, hover over 7-Zip and select the top "Open archive" option
7. In 7-Zip, navigate into the "forge" folder
8. Drag the extracted ImageKeys.class file into the 7-Zip window. It should replace the existing ImageKeys.class file
9. Close 7-Zip
10. Start Forge in your normal way and test the patch (I use Deck Editor for this)
Hope someone gets some enjoyment from this,
OpenSS
----------
Ver 1.0: 2014-11-03 (6 Downloads)
Initial version
Ver 1.0.1: 2014-11-05
1. Move exception handling earlier in case Forge call fails
2. Change hard-coded folder separator to OS-independent separatorChar
3. Build against 1.5.29 not 1.5.30