Simple example wanted

Hello,

I would like to make a vassal module for our version of Europa Universalis. This is my first module. Since I generate automatically all images, I just need really basic things (more will come in due time, probably): one sided counters, two-sided counters (two sizes each time) (all stackable, movable: just counters, really; game logic I will do later). If possible, infinite counters for some (revolt markers) would be fine, but I can manage without.
Is there an example of module using only these basic things (for pieces)?
(currently 2407 counters, including 1203 double-sided). I can find my way in most programmatic things, but a starting point is usually a good boost.
[/quote]

Thus spake “jcdubacq”:

All of the module information is stored in the buildFile, which you’ll
find if you unzip a module. Right now, generating module content
programaticaly is non-trivial because the buildFile contents, while not
binary, are pretty far from being human-readable.

In order to generate buildFile entries for counters, you need two things:

  1. A model buildFile entry for each type of counter, and
  2. A database which links together the variable information for each counter
    you will create.

More concretely: Create your first counter by hand, save the module,
and then go look at the resulting entry for that counter in the buildFile.
Suppose, for simplicity, that this is just a one-sided counter, and the
only thing which differes between this one and your other one-sided counters
is the image. The buildFile entry for the manually-created counter will
contain the name of the image you used somewhere. The first thing I would
try is writing a program in your favorite language which reads in a list of
images and prints out buildFile entries just like the original entry,
except that each new entry contains an image name from your list instead of
the original image name. Once you have those, go paste these new entries
into the buildFile and copy the images you used into the module’s images
directory. Zip the module back up, and most likely you’ll see all of your
new single-sided counters in the module.

You can do the same thing for the double-sided counters, but then you
need to replace two image filenames, and so your program has to know
which two images should be together on each counter. You need to supply
that information some how. (When I did this for my module for The Longest
Day, I put this information into a spreadsheet and exported it as a CSV
file, which I then fed to the Perl script which writes out the buildFile
entries.)

Try this and let me know if you’re having problems.


J.


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

Post generated using Mail2Forum (mail2forum.com)