First Module for a 2 week Newbie

After starting 2 weeks ago with Vassal I have created my first module. Some of the information I used was found on this forum, some in the Vassal designer’s guide but mostly from looking through other modules and seeing how things were done. It’s B-17 Queen If The Skies…yeah I know been done before but this is all from scans of the boardgame and counters which I own and all from scratch. It seems to work OK but one thing with Vassal is the problem with creating editable Mission Logs. The only way I have seen is to fill each cell with an At Start Stack and Text Trait which is time consuming and there doesn’t seem to be a way to clear all the text for the next mission unless I have missed something. My work around was to create a PDF with Form fields that I use outside the game. It is a shame that PDF cant be used within Vassal itself.

Regards;
Darren

2 Likes

Hi Darren, congratulations on your first module!

There are ways to automatically reset of a bunch of Text Labels or other traits.

In this case, consider using a Dynamic Property trait to store the contents of the Text field. To reset all labels, define a Global Key Command button that searches for pieces with those Text labels and sends a Key Command that resets the Dynamic Property.

You would display the Dynamic Property in the Text Label in place of the text that you were previously entering there e.g.

Notice that I’ve completely removed the Menu Command / Key Command from the text label. That is now set via a command in the missionText Dynamic Property.

The Dynamic Property trait might look something like this:

Other traits that can be useful for a status sheet type of game component include Action Button and Layer.

I hope that helps. If you need some more help, please share a few more details of what your dealing with.

1 Like

Wow, I understand probably half of that. So in that example I would have the GKC send a Ctrl+V to have the Dynamic property set the value directly through that Text label trait. Yes? But what would the value be? I dunno. Much of what I do is trial and error and the language used to explain these things goes over my head. I have used the Action Button to make Xs that mark things on Logsheets and I have been able to clear them with a GKC but not the text. I have also removed the Logsheet from the game now having given up but could experiment with this elsewhere. Would you like to check out my module? It is pretty much done except for the Logsheet. Thank you Mark.
Regards:
Darren

Yes, but I’ve assumed that all you want to do is clear out the text label values (hence Ctrl/V is setting the dynamic property to null i.e. a blank field). If you need them set to something specific, then that won’t do.

Can you paste a screen shot of your GKC and Text Label into this thread?

1 Like

I deleted that particular GKC when I removed the Logsheet. I do have others that clear the entire board at the end of a mission and restore markers to their original position. They’re all game pieces though but I couldn’t get the text to clear. I will set up some kind of test tomorrow (I am in Australia) and try what you said, yes wiping the text is what I want to do. I could always upload the module somehow and you could have look at what I done. Thanks for your help.

Regards;
Darren

OK, I set this up as per your example and it worked. Here are the screenshots of my setup including the GKC;
Text

GKC

What I don’t understand is how the DP knew I wanted to clear the text. There is nothing written there other than the comment “Clear Text” which appears in the Right-Click menu in the game and “Set value directly”…directly to what value??? I don’t see how vassal knew it was what I wanted. A better understanding of how features such as Expressions, Prompts and Beanshell would go a long way and save me a lot of time.

Regards;
Darren

I’m guessing that some of your confusion stems from the ambiguous heading of this field in the Dynamic Property trait.
image

The thing is that the values below “Prompt” are only actually prompts when you specify the action Type “Prompt user”. In the case of Ctrl+V, the action Type is “Set value directly” which means that the value in the Prompt field is the actual value to which the Dynamic Property will be set; in this case, blank. That is how Vassal knew to blank out TestMe.

This page should help.

1 Like

That is one of the many things I did not know but now I do. Thanks for your help.

Darren

I have found one issue with using Vassal to fill out a Logsheet with this method. If I want to add a note of say a +2 DRM is to apply in a game, the “2” shows but not the “+”. A -2" seems to work OK. I could always make a button that scrolls up and down from +2 to -2 using an image but if, in the future I wanted to include a “+” in a text field and be sure it will appear is there a way?

Regards;
Darren

I don’t think so; VASSAL always attempts to treat property values as numbers first, and only keeps them as strings if that fails, so “+2” immediately gets converted to just “2” as soon as it gets saved. There may be a convoluted way around the problem by displaying a “+” before the actual contents of the property only if the value is greater than 0…

2 Likes

Ok, well its not a real problem with this game anyway. I created a layer with image of the numbers required then added a Dynamic Property so that the numbers are listed individually. Would there be a problem adding this module to this site? i am asking because I noticed there are already B-17 QOTS modules already here. Mine is pure Avalon Hill B-17 and I even used the original counters. I intend to add the variants from the issues of General Magazine (only) in the near future but the core B-17 is almost complete except for one more editable Chart I have to make. Thank you to yourself and Mark for taking the time to help me here it is very much appreciated.

Regards;
Darren

1 Like

That’s the method I would use, for a text label at least. I think this Beanshell expression would work for the previously mentioned test example, in place of $TestMe$ in the Text Label:

{TestMe > 0 ? "+" + TestMe : TestMe}

1 Like

That works perfectly, much obliged to you. I will keep this handy in case is needed in the future.

That may be why if a letter or word is typed after the +2, it will show as +2 but will not on it’s own.

1 Like

Another simple way around this is to type something before the “+” then it will show. The best way is to use a Full Stop (Period) which is hardly noticeable (.+2)