#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, BuildingOther 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.
SetupTo 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).
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. |
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.
- Text:In this field, enter the maximum health value for the figure you are adding.
- Menu Forrmat: Don't remove any text from this field, but add a /X just before the final close-parenthesis, where X equals the maximum health value for the figure you are adding.
- Menu Command: Remove the text "label" and replace it with the text "HP".
- Keyboard Command: With your cursor in this field, hit Control+H, and CTRL H will appear.
- Font Size: 18
- Vertical/Horizotal Position/Justification: If the default location for the text overlaps a portion of the image you are using for that figure, change some or all of these values until the text label is in the spot you want it. To start, I have both Vertical fields as "bottom" and both horizontal fields as "right."
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.
- Name: Enter the name of your deck. Example: Darth Maul – Shadow Assassin
- X Position: Enter the X coordinate your deck will appear at. This is location you choose from the Extension Registry.
- Y Position: Enter the Y coordinate your deck will appear at.
- Width: 150
- Height: 200
- Allow Multiple Cards…: Unchecked
- Allow Specific Cards…: Unchecked
-
Re-shuffle: Never
- Reversible: Unchecked
- Draw Outline When Empty: Checked. Choose White or Black as the color, they show up the best.
- Include
Command to send...: Checked. In the options
that appear when this is checked you need:
- Menu Text: Enter the text, "Send to game table"
- Report Format: Enter the text: "$playerName$ sends $deckName$ to game table." Use the drop-down menu to the right of this field to enter the text with $$ tags.
- Name of deck to send to: West Deck.
- Mask Command: Change to "Flip Card".
- View when masked: This is the card back image for your deck.
- Name when masked: XYZ Card, where XYZ equals the name of your deck. Example: Darth Maul Card.
- Display Style: Use Image.
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:
- Name: "Flip Card"
- Report on Command: CNTRL F
- Report: $playerName$ ($playerSide$) $menuCommand$ $oldName$ $newName$

