Speedy Counter Creation via Hard Edits...

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?

Yes. Just be be careful to edit accurately and make plenty of backups. If you stuff up, the module can become unusable.

No.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Shad”:

If you do it correctly, yes.

In the long term, I plan to change the buildFile format so that it is
human-readable XML rather than what we have now.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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.

B


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

What happens to the gpids? They’re all unique.

  • M.

2009/2/25 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>

Post generated using Mail2Forum (mail2forum.com)

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.

Stepping them incrementally wouldn’t be hard.

You don’t have to worry about duplicated. Vassal now (from 3.1.0-beta8) automatically detects duplicates and renumbers them.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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.

Post generated using Mail2Forum (mail2forum.com)

Yeah, those are the old counters for the test module. Everything new is PNG8.