Translation - 2 versions of an image

Hi,

It’s possible to add translation to all existing texts in a module.

However, when an image contains text, and you would like to propose another version of the image, it’s not possible.

Do you think of an easy way to propose 2 versions of an image ?

What if I add a Mask that rolls from the 1st image to 2nd image.

Can I make a Deck Card Mask depending on the preferences menu, so when I choose to use the interface in french instead of english, the image will be automatically taken from the 2nd Mask level, and not the 1st ?

If my Deck Card depends on a prototype which has a Mask. Can I add a Mask in the Card definition too ?

Thanks for your help

Regards

Sounds like a Layer trait with a calculated level expression would do the trick. Set a Global Property to the language and write an IF condition into the level calculation expression. Or, easier, set a number as a language flag and see to it that the correct image is at that layer #.

Thanks. I’ll try that one.

So far, with 2 layers and a mask, I have a conflict … when I change my layer, it seems I can’t mask the card anymore.
I wished the 2 layers were independent from the mask.
So I tried to create 3 layers … the Basic, the 2nd language, and the backside of the card as if masked … It could work, with some shortcut to directly reset to layer Mask with Ctrl M, for example … but again I have strange behavior. Plus now the deck is face up, instead of showing the back (as there are no more mask).

It sounds like you may be adding additional Layer traits with the additional language images? All of the images should be in the one Layer trait.

I can’t have this work :frowning:
I have a Card defined in a Deck.
It has a Basic Piece Trait, with the original english image.
It also has a Mask Property, with a back image, in Plain, associated to CTRL M.
I created a Layer with a new image, in french, with a level name -french as a suffix (for reporting), Activated by key CTRL L (for language).
It seems I need the Mask, because the default Deck view on the map show the back of the cards.
When I pick the card, it’s showing the english image. From there I can mask or display next layer.
From Masked, I can unmask, and return to english image.
From French Layer, I can’t Mask. The CTRL M option is visible, but the card is not masked :frowning:.

Now, about the Calculated Level expression, I checked Levels follow expression value, follow expression Language (that’s a global property) Level 1 = 1.
When I change the Language from my Menu Action from english to french (O to 1), this does not activate the new layer for my deck cards. How should I test the IF condition ?

Thanks for helping.

Gotcha !

I find Follow Expression quite complex to manipulate with conditions.
I made simpler (I think … but one could argue :unamused:).
I finally understood the Global Property needed to be numeric or the tests would be difficult to manage.

Deck
Card

No Mask Option on the cards ! This is not compatible with the multiple layers. (At my skills level).
Basic Piece trait uses the Back image of the card → The Deck trait Contents are Face-Down set to Never.
Layer trait contains 2 levels : 1st level uses english image, 2nd level uses french image
Levels follow expression value ? Checked
Follow Expression: language Level 1 = 0 (aka Image 1)
Activate Layer Menu Command:[/i] Show/Hide
Module [Global Properties]
language[Global Property] → contains 2 buttons
Initial value:0
Is Numeric
Between 0 and 1, no Wrap
1st [Change-property Toolbar Button]
Button text : (empty)
Tooltip Text:English
Button icon:36x36 round Union Jack
Hotkey: Language
Type: Set value directly
New Value: 0
2nd [Change-property Toolbar Button]
Tooltip Text:English
Button icon:36x36 French round flag
New Value: 1

Now when I click on French flag, all my cards (when showing face) will automatically show French version ! And when I cilck Enlighs flag, they all show English, independently from the Preferences menu.

Should I make that depend on the preferences ???

Just noticed the topic : [url]https://forum.vassalengine.org/t/combining-masking-and-layers-not-working-for-picked-sides/9147/1] where the solution to have Mask and Layers work together was to change their order.