It’s obfuscated not because it’s an initial setup, but because
initial setups are just regular save files which are packed up
inside the module, and save files are obfuscated.
There’s no point at all in obfuscating initial setups. There’s
nothing I could learn from surreptitiously unpacking one which
I wouldn’t already know from reading the setup information in
the game rules.
Perhaps the first byte should be a obfuscation flag. When an initial setup is loaded in, it should be deobfuscated by default?
I recall that the reason I chose at-start stacks over initial setups was because of the obfuscation. That was a poor choice in the end, because you can’t initialise rotations that way. I may have to switch over at some point.
The Deobfuscator already acts as a pass-through filter for plain text,
so all that needs to change is that initial setups are saved as plain
text when they’re imported.
The real trick is knowing whether it’s been obfuscated or not without waiting for an exception. Or VASSAL could just know that initial setups are not obfuscated. Should be easy to do, I suppose. I might look into that later but it requires a change in how setups are read.
This deobfiscation trick saved my butt, thanks guys. It’s going to save me hours of work going forward, I’ve always been hesitant to create pre-defined setups. Knowledge is power.