DICE PACKS BUNDLE
Page 1 of 4 123 ... Last
  1. #1

    D&D Miniatures Resizing Script

    This script was based off of work done by "valeros". The original can be found here.

    The included script is designed to download images files from a website (in this case, WotC's D&D Mini Preview pages), convert the files to PNG and remove the originals.

    BE AWARE: The VBScript file (ending in VBS) uses features that some antivirus programs may consider the file to be a virus. You may view the details of the file by editing the file as described in the "Before Running" section.

    Before Running
    ================================================== ========
    • ImageMagic needs to be installed on the system.
    • You must configure the "START UPDATE" sections in the file.
      • To edit, right click the file and choose "Open With..." and choose "Notepad" or another text editor.
      • Version 1
        • Line 17
          • Change the location to where you would like to store the files.
          • The location must be enclosed in quotation marks.
          • The location must end in a \
          • Example:
            Code:
            CurrLoc = "C:\Downloaded Files\Fantasy Grounds\tokens\"
        • Line 19
          • Change the location to where ImageMagick is located.
          • The location must be enclosed in quotation marks.
          • The location must end in \convert.exe
          • Only change the location of the line (In the example below, c:\program files\ImageMagick-6.5.7-1)
          • Example:
            Code:
            ConvertLoc = chr(34) & "c:\program files\ImageMagick-6.5.7-1\convert.exe" & chr(34) & " "
        • Line 46 & 47
          • If you would like to keep the original JPG files that were downloaded, put an apostraphe (') before the text on these lines.
          • Example 1:
            Code:
                  'AddToBatchFile("PING -n 20 127.0.0.1>nul")
                  'AddToBatchFile("DEL " & chr(34) & CurrLoc & arySets(i,0,SysNum) & "\*.jpg" & chr(34))
          • Example 2:
            Code:
            '     AddToBatchFile("PING -n 20 127.0.0.1>nul")
            '     AddToBatchFile("DEL " & chr(34) & CurrLoc & arySets(i,0,SysNum) & "\*.jpg" & chr(34))


    To Run
    ================================================== ========
    • Extract the files.
    • Double Click on the "DownloadAndResize.vbs" file.
    • When prompted, enter the size of the of the Medium sized pixel.
    • After all files are downloaded, you will be notified and a DOS box will populate to modify the file.
    • When the DOS box goes away, the files are complete.
    • The images will be located in the folder on Line 17.


    Version 1 Features:
    ================================================== ========
    • Saves downloaded images to a folder created for each set of miniatures.
    • Modifies background to remove white space.
    • Resizes the images based on the size of the creature (ex, Small is 0.75x the size of Medium, Large is 2x the size of Medium)
    • Currently configured for 3.x Edition
    • Includes the following sets:
      • Set Symbols
      • Harbinger
      • Dragoneye
      • Archfiends
      • Giants of Legend
      • Aberrations
      • Deathknell
      • Angelfire
      • Underdark
      • War Drums
      • War of the Dragon Queen
      • Blood War
      • Unhallowed
      • Night Below
      • Desert of Desolation
      • Dungeons of Dread
      • Against the Giants
      • Demonweb
      • Players Handbook Heroes Series 1
      • Dangerous Delves
      • Legendary Evils
      • Players Handbook Heroes Series 2
      • Savage Encounters


    Any feedback is appreciated!

    EDIT: Original file did not download the files due to testing bug. This has been fixed in the current attachment.
    Last edited by tdewitt274; April 12th, 2010 at 14:06.

  2. #2
    Downloading does not start after entering the pixels
    Everybody lies...
    -Dr. Gregory House, HOUSE MD-

    Urge to destroy world, rising...
    -Black Mage, 8-Bit Theater-

  3. #3
    Quote Originally Posted by Czarisyn
    Downloading does not start after entering the pixels
    Doh! Thanks! I disabled the last piece while testing. You can either download the file again or remove the apostraphe from line 1460 so that it says Call StartDownloading

    Thanks!

  4. #4
    worked nicely, good work
    Everybody lies...
    -Dr. Gregory House, HOUSE MD-

    Urge to destroy world, rising...
    -Black Mage, 8-Bit Theater-

  5. #5

    Version 2

    Here's a newer version that will set everything up for making your own modules.

    Previously noted lines have been changed to account for new code. Please review the "READ ME.TXT" file in the zip folder for details.

    • Adds a "definition.xml" and "thumbnail.png" (using the set name, where available from the WotC website) file for module creation.
    • Moves the files to a \[Set Name]\tokens\[Set Name] format to allow for module creation.
      • To create the module, go into the \[Set Name]\tokens folder and select all files, add to your favorite zipping utility.
      • Rename as appropriate, with the extention ".mod" instead of ".zip"
    • Modified code to handle new features.


    Any feedback is appreciated!

  6. #6

    Version 3 - Creates MOD files

    The script now creates a Module (MOD) file for each set. After the scripting is completed, copy the Module to your "modules" folder for Fantasy Grounds.

    See the screen shot for an example of the finished product.

    Previously noted lines have been changed to account for new code. Please review the "READ ME.TXT" file in the zip folder for details.

    EDIT: Updated the ZIP file to resolve the War Drums and Night Below thumbnails show in the modules.
    Code:
    Line 306
    	aryNames(0,0,11,0) = "ddm_setsymbol_11.jpg,Blood War.jpg,M"
    Line 308
    	aryNames(0,0,13,0) = "ddm_setsymbol_13.jpg,Night Below.jpg,M"
    Last edited by tdewitt274; April 15th, 2010 at 13:07.

  7. #7
    tried version 3, the mod file doesn't get made, I do see a definition file and a zip file though
    Everybody lies...
    -Dr. Gregory House, HOUSE MD-

    Urge to destroy world, rising...
    -Black Mage, 8-Bit Theater-

  8. #8
    Quote Originally Posted by Czarisyn
    tried version 3, the mod file doesn't get made, I do see a definition file and a zip file though
    There's another thread same name as this one with "Problem") that I've been working through the issue. If you scroll to the bottom, I have a solution that has worked for me.

    Sorry, I'm on a mobile phone and can't provide the link.

  9. #9
    Thread on troubleshooting an issue with the v003 script.

    I'll post a more permanent solution when available.

  10. #10

    Version 4

    A new version has been posted. This is pretty much the same as the previous version, with a few enhancements, code revisions, and a bug fix.

    Dialog boxes are now used instead of modifying the actual script file. Please see the below instructions of how to run the script (also included in the Read Me text file).

    • Extract the files.
    • Double Click on the "DownloadAndResize.vbs" file.
    • You will be asked to choose a folder for saving the files.
      • Navigate to the folder desired.
      • If the folder does not exist, you can create a "New Folder" by clicking the "New Folder" and typing a name.
    • The system will automatically determine the location of ImageMagick.
      • If ImageMagick is not found automatically, you will be prompted to find the "convert.exe" file.
        • Navigate to the folder location of ImageMagick and double click on the "convert.exe" file.
    • When prompted, enter the size of the of the Medium sized pixel.
    • After all files are downloaded, you will be notified and a DOS box will populate to modify the file.
    • When the DOS box goes away, the files are complete.
    • The images will be located in the folder chosen at the begining of the script.
    • Copy the created Module (MOD) files to your "module" folder for Fantasy Grounds.


    Let me know if you encounter any issues.

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in