I’m slowly piecing together a module for War of Resistance. Obviously, the 2,240 counters are the main obstacle.
I recently realized that I can use Fireworks (although I’m sure most anything would do) to slice my countersheets as if they were going to be posted into a table-based webpage. This is quickly formatted and assigns each individual counter a row/column number. In this way, I can take a countersheet scan and cut it into 560 (280 front, 280 back) matched images resized and ready for input in less than 20 minutes.
But manually adding them one at a time into the module still sucks.
So today I was wondering if I could rip apart the module and do it “the back way.”
Here’s a relevant-looking chunk of text from my current buildFile:
<VASSAL.build.widget.ListWidget divider="406" entryName="British Forces" height="-85" width="44">
<VASSAL.build.widget.PieceSlot entryName="0-1-6 Inf II 2RS" gpid="8" height="70" width="79">+/null/prototype;B prototype;A\ piece;;;0-1-6 Inf II 2RS Br.jpg;0-1-6 Inf II 2RS/ \ null;0;0;8</VASSAL.build.widget.PieceSlot>
<VASSAL.build.widget.PieceSlot entryName="0-1-6 Inf II 5/7Raj" gpid="12" height="70" width="79">+/null/prototype;B prototype;A\ piece;;;0-1-6 Inf II 5n7Raj.jpg;0-1-6 Inf II 5\/7Raj/ \ null;0;0;12</VASSAL.build.widget.PieceSlot>
<VASSAL.build.widget.PieceSlot entryName="0-1-6 Inf II 2/14Pun" gpid="7" height="70" width="79">+/null/prototype;B prototype;A\ piece;;;0-1-6 Inf II 2n14Pun.jpg;0-1-6 Inf II 2\/14Pun/ \ null;0;0;7</VASSAL.build.widget.PieceSlot>
</VASSAL.build.widget.ListWidget>
There’s obviously a consistent format in play here.
What I want to know is - can I just dupe those lines several hundred times, changing the relevant unit & image names, then stick the images straight into the “images” subfolder and zip it all back up and call it a day?
Or are there some other variables elsewhere in the buildFile that would need adjustment?
In the medium-term, I have built a tool that allows you to point to a directory of images, give a counter template, and have Vassal import and create all of counters automatically. Look for it in v3.2.
Unique but sequential by order of creation. The only reason they’re not in order on the code I posted is because I rearranged those counters after creation.
Seeing as your using Fireworks, before slicing, might want to save the
graphic file out as a png8 and reload it first. Your sample code shows your
using jpg
There are other threads here that discuss the merits of the graphic file
type.