Editing VSAV files as text

I was hoping to use python to auto generate some scenario set-ups (.vsav files) for a module. The script could read the plain text in the game rules and then output a scenario file as plain text. Is this doable at all? Thanks

Yes, you could do it, but you’d have to get an understanding of the file format by reading the relevant code. I wouldn’t spend time doing this with V3, myself, but it’s up to you. We’re redesigning the file format for V4 to be human-readable.


Glad to hear you guys are working on making VSAV files human readable!

Opening up the savedGame part of a vsav file gives me a very long string of letters and numbers ie. f01060109010405…(on and on and on). Is this where any theoretical text changes would have to take place in version 3? You’re probably right that it’s not worth the time to mess around with then!

Yes, that’s the place. You’d need to run them through the deobfuscator first to see anything semi-readable.

1 Like

Can you point me in the direction of the deobfuscator? Was expecting to find it in the vassal-master folder under tools but no sign of it and windows search is of no help as is usual.

VASSAL.tools.io.DeobfuscatingInpitStream, it’s not a stand-alone tool as such, thought it has a main() that will deobfuscate a file and write it to standard out. You won’t be happy with the output either :slight_smile:

1 Like

It is doable because I have done it. I have written my own tools in C# .NET to read/write .vsav files to/from JSON so I can manage the 1100+ scenarios included with my module. But it is not a minor undertaking and you need to know at least some Java to reverse engineer the file format.