Spreadfirefox Affiliate Button
Dorkistan What is Dorkistan? News Subscribe
#4

Building Your First VASSAL Extension

There is a lot of jargon when talking about decks. You can find definitions of most of the terms used on the Star Wars Epic Duels wiki.
Other terms, which might not be ED universal (but probably should be), will themselves be links to the definition.
Throughout this series, I refer to both Special and Power Combat cards as Talent cards.
This article treats on building an extension of your new deck to the Epic Duels module for VASSAL. The first thing you need is images for your cards & figures. If you’ve already built images for your PDF (Design This! #3) then you’re half done. If not, reading that article first will help you understand this one. Here's a quick guide to navigate this page:Setup, Assembly, Saving, Building

Setup
To save time and effort throughout the extension creation process (and the editing process) use a consistent naming convention for your image files. It requires only a small amount of effort on your part, and the payoff is enormous, especially to beginning designers: it keeps your files organized, both on your computer and in the extension, organized images makes them easier to find (and replace), and organized extensions load faster than unorganized ones.

There is a big difference between images for print and images for screen. Screen images are displayed at 72dpi, no matter what monitor they’re displayed on. That means you need to make 72dpi images, because anything higher won’t display correctly in VASSAL. So, using the templates you downloaded, convert the image size to 72dpi.
Assemble Your Images
To assemble your images for use in VASSAL, start with either your blank card templates (without text – like this one) or your individual .psd files (complete cards in .psd format – like this one). Convert the image to 72dpi. In Photoshop go to Image>Image Size, and in the resolution box enter 72. In GIMP go to Image>Scale Image, and in either the x or y resolution box (as long as they’re linked) enter 72. The card’s new pixel dimensions should be something like 148 X 206 (you may have to manually enter these dimensions in GIMP).

If you have complete cards already, open them all and change the resolution (be sure the text remains readable afterwards), save them as jpegs, and skip ahead. If you’re working with blank templates, after you’ve changed the resolution, place the full text for the first card, and save it. Then replace the text with text for the next card type, and save it under the new name. Repeat this process for all your template types until you have all the jpegs you need. You’ll need approximately 15+ jpeg images before you’re ready to start building in VASSAL: 1 image for each card type, 1 card back image, and 1 image for each figure type. You don’t need a separate image for cards that repeat, like the 5/1 in a red deck, or multiple Talent cards of the same kind, because VASSAL can re-use the same image for these cards. For example, my Even Piell deck requires 16 images. You’ll notice I don’t have images for Even’s Clone Troopers – that’s because I can re-use the images for CTs and CT cards that are already in the core ED module.
Re-using images will help keep the size of your extension down. This is important, because VASSAL uses a lot of RAM when running, and the larger the module (and extensions) the more RAM is required – so if you have extra or oversized images, you’re just making it harder for people to use your extension.
For unique figure images, check out Wizards of the Coast's website for images of their Star Wars Miniatures line. Many of the popular characters, and a lot of the not so common characters are available there. Once you have the base images for your figures, you'll neeed to size them to fit on the grid in VASSAL. I recommend having a square canvas 85 x 85 pixels with white background for all your figures; size the charcter image to fit within that canvas.
Anti-aliasing
I mentioned in DT! #3 that anti-aliasing your text will help make it readable when it is printed. It works for the screen too. In case you don't believe me, here is a great example.


Both of these quotes use the same font at same size, but one has no anti-alias, and one uses sharp anti-alias. Guess which is which.
Saving Your Images Pay attention to the quality of the jpeg as you are saving. In PS, choose Save As Web from the File menu. The screen that opens up will give you a preview window and a table to optimize your format. Choose jpeg as the output format, and change the quality according to what kind of card you are saving; for talent cards, use High or Very high (approximately 12k in size) and for basic combat cards use Medium (approximately 4-7k in size). In Gimp you have a similar menu, jpeg format has a slide bar to determine quality, from 0-100. For talent cards use a quality from 65-85, and for basics use 30-45. Optimizing the quality of your jpegs will reduce the overall size of your extension. Remeber, using a consitent naming convention can help save you time in this process.

Building the Extension
Once you have all the images you need assembled, you can start building the extension. In the initial splash screen VASSAL opens, choose "Load Module," and find the SWX-xx.mod file. After the module is open, choose "New" from the splash screen. The splash screen will close, and a new window called Edit Extension will open - this is where you input all the information for your extension. The first thing you want to do is enter the version number; I do this first because it is easy to forget, and useful to remember.

Next place your figures. Open the figures folder, open the sub-folder Tabbed Panel, and finally right click the sub-sub-folder Extension. From the right-click (or option) menu, choose Add Single Piece. The window that appears is divided into two columns. The left column, Available Traits are all java scripted items that you can add to any element in VASSAL, and the right column shows what traits are currently added to the properties of the element you are working on.. For Figures, there are only 3 things you need: Basic Piece (default), Prototype, and Text Label. Make sure they're listed in that order. Find the property you want to add in the Available Traits column. Repeat this process for each figure type you have - usually that's 1 for the major and 1 for the minor.
Basic Piece: Double clicking, or highlighting "Basic Piece" and hitting the properties button opens the menu for Basic Piece. Double-click in the window that appears where you are prompted to add the image for this figure. Be sure to name the figure in the Name: field. If a field is not mentioned in this list, the default value is fine.
Prototype: When you add this element, a window appears prompting you to enter a value. Enter "Figures" and hit ok.
Text Label: Highlight the Text Label element in the current traits column, and hit the properties button. The window that opens is the properties for that text label. The following is a list of the fields you should edit, and the values to enter.
Finally you need to add the deck, but first you need to know where you're going to place it. Unless you have a lot of custom decks to add, you're going to want to add your deck to either of the two windows in the core module for extensions: EXT1 or EXT2. This registry shows the location of all registered extensions to date. Pick any of the empty spaces to build in, but be sure to drop me an email about where it is, so I can update the registry. Once you've located where to build, right-click (or option) the folder in Edit Extension that correspons to the window your deck will be in, and choose "Add a Deck" from the menu. Here is a list of the fields you should edit, and the values to enter. If a field is not mentioned in this list, the default value is fine. Now that you have set up the location and properties of the deck, you need to add the images. Right-click (or option) the deck you just added, and choose "Add a card." You get the same menu you did when adding the figures. This time, all you need is the Basic Piece (default) and a Mask. The Basic Peice is the card image. Start with your talent cards. Enter the image for the first card, and the card's name. If there are multiple cards of that type, use the copy/paste tool to duplicate the card. Enter your talent cards first, followed by you major's basic cards, then your minor's combat cards. Once you've entered all 31 cards, right-click (or option) the deck, and choose "Edit all contained pieces." Be careful here, you don't want to end up editing all of the card Basic Pieces. Choose the Mask element, and hit properties. In the window that appears make the following changes:
Once done, select "Edit all containted pieces" again. This time, add a "Report Action" funciton from the left-hand column. After you add it, highlight it, and hit properties. In the window that appears make the following changes: When you save your extension make sure to add a ".zip" to the file name. So there you have it. In a later Desing This!, I'll talk about the various tricks you can add to your VASSAL extensions, making maps for VASSAL, and editing your extensions the easy way, but next time is devoted to the most important aspect of custom design for VASSAL, testing and editing your deck.