How to have VASSAL print/report the current value of ALL global properties while testing

I’m attempting to add a new feature to my module. It involves a spaghetti of global props. It’s not behaving in the way I want (surprise!). I might find the problem quicker if I could print the state of all global properties before and after I test the action.

Is there already a built-in way to do this? Or would I need to add it myself (a report action each time a global property is changed?)

(also added a comment on discord: Discord)

Thanks, jas…

You don’t need to link reports to real functioning GKCs. You can hook them to any key. When I want to dump a bunch of global properties, first I pick some piece on the target map, such as a turn counter or a first-player marker. I then add report traits to it that print global properties, and I link the reports to the F1 key (something I’m not using for anything else). The F1 key is not part of any GKC.

When I want to see all the global properties, I select the piece and press F1. Out come the reports. Note that a right-click on the piece won’t show anything for F1 because I don’t have a functioning trait for it. It’s a “secret” key that dumps reports. I can then press it whenever I want—before and after real GKC sequences, for example.

2 Likes

In addition to the above answer, here’s a tip for peeking at the value of any property from a piece. Use trait position or restrictions to prevent a cheating loophole if that is a concern.

Core vassal also has a console level property peek function but this is disabled for multiplayer games which seems to include all the preset scenarios that I tried to test it with.

1 Like

This is good info, thanks. It’s helpful to know that it can be any piece on the map. It’s helpful to know that it can be any key you want and you can keep it unadvertised.

This is helpful - thanks for giving such a descriptive post. In the case I care about, I don’t just have one GP but a couple of dozen - so a combination of what you’re suggesting and what @shilinski suggests is probably the correct solution. But the forum only enables me to select one post.

Still… I wonder what the console level property peek is. I don’t want to have to make loads of report functions if I run into trouble, I’d just love a global variable dump of everything.

1 Like

See here: https://vassalengine.org/wiki/VASSAL_3.5_Release_Notes#Console_Commands

3 Likes