Tiling Issue

The module uses multiple extensions built around a single template. Dozens of those, actually. They change how the board and character tokens look like, working as “themes” of sort. Changing a theme requires deactvating the current extension and activating the desired one - we normally do it about twice a week, when moving between multi-session campaigns we play on different days. Those extensions were designed so that modifying them between sessions or creating new ones only requires substitution of images within the archive and renaming the file. They were not meant to be activated at the same time, so image files in multiple extensions have the same names (as in wallpaper-##.jpg or token-###.png).

This approach worked great in 3.1.

In 3.2.6 tiling screws this up. After switching extensions and loading the game we still see the theme from the first tiled extension. It won’t load images from the current theme, as they share names.

I know the solution is probably clearing the tile cache before each game. However, would it be possible for Vassal to separate tiled images based on extension name and version and access only those from active extensions?

Thus spake Filip:

The module uses multiple extensions built around a single template.
Dozens of those, actually. They change how the board and character
tokens look like, working as “themes” of sort. Changing a theme requires
deactvating current extension and activating the desired one - we
normally do it about twice a week, when moving between multi-session
campaigns we play on different days. Those extensions were designed so
that modifying them between sessions or creating new ones only requires
substitution of images within the archive and renaming the file. They
were not meant to be activated at the same time, so image files in
multiple extensions have the same names (as in wallpaper-##.jpg or
token-###.png).

This approach worked great in 3.1.

In 3.2.6 tiling screws this up. After switching extensions and loading
the game we still see the theme from the first tiled extension. It won’t
load images from the current theme, as they share names.

DataArchive doesn’t distinguish between images present in the base
module and images present in extensions. It never has. I’ve always
considered this to be a design flaw, as you then can’t determine what
the source of an image was. The reason behavior changed between 3.1
and 3.2 is that tiled images are retrieved by name, but written once
at tiling-time.

I know the solution is probably clearing the tile cache before each
game. However, would it be possible for Vassal to separate tiled images
based on extension name and version and access only those from active
extensions?

Yes, it’s certainly possible. I’d consider merging at a patch do to it
if someone contributed one.


J.

Thought so.

Out of curiosity, would it be possible to disable tiling code in 3.2 without messing up Vassal, or would it no longer be able to access images from the module as in 3.1 should tiling code be disabled? It’s a solution that I should be able to apply on my own for my hack, assuming it’s still possible.

Thus spake Filip:

“uckelman” wrote:

The reason behavior changed between 3.1
and 3.2 is that tiled images are retrieved by name, but written once
at tiling-time.

Thought so.

Out of curiosity, would it be possible to disable tiling code in 3.2
without messing up Vassal, or would it no longer be able to access
images from the module as in 3.1 should tiling code be disabled? It’s a
solution that I should be able to apply on my own for my hack, assuming
it’s still possible.

Sure, it would be possible, but it would require a pretty good
understanding of the image pipeline and considerable effort.


J.