VASSAL 3.1.16
Star Wars: Armada module
I’d like to assign “Additional scaling factor for draw” to all pieces using the “Upgrade card prototype” without having to assign it to every piece individually (there are very many different cards).
Is this possible?
Or is there another way to accomplish something similar?
What I’m trying to do is to have cards in fairly high-res so they are readable when you zoom, without having them take up a ton of space on the table.
I suppose I can just open the build file and Replace all the parts with layer/scaling but that feels rather inelegant if there is another way of doing it.
Are you comfortable with editing text files, and regular expressions? If not, no, there’s no way to do this other than editing each piece individually, that I’m aware of.
If you are, you could try:
- Extract the
buildfile.xml file from the module (the module is just a ZIP file with a different extension). Examine it closely in a text editor, and find the definition of one of the pieces you want to add this to. Note that the format is very obscure (it wasn’t intended to be human-readable)!
- Go into the editor and add the “Additional scaling factor for draw” to that piece, and save the module.
- Extract the newly modified
buildfile.xml to a new file. Compare the 2 versions of the build file, and find exactly what changed in the chosen piece.
- Use a text editor that supports regular expression replacements (or a command-line tool such as
sed, if you’re comfortable with it) to search for something unique to the old Layer trait, but common to every piece you want to adjust, and replace it with the modifications made by the editor. Note than the slightest syntax error could break the module!
- Make a backup of the module. (Important!)
- Use a ZIP editing tool (such as 7-zip) to replace the
buildfile.xml in the module .vmod file with the newly edited buildfile.xml. Warning: If you made any errors, the module may become unusable at this point! This is why you made the backup in step 5!
- Try to run or edit the module and see if you did it right. If not, replace with the backup and try again (or give up).
I’m fine with editing the build file. I did it and it works fine.
But thanks for confirming that this is the way 