Tip: Comments in piece & prototype definitions

Want to put a comment in your piece / prototype definitions ?

Many traits have a description field that is handy for that but if you want to go further and provide multi-line comments or breakup the traits for readability etc, consider re-purposing the Prototype trait. You can write whatever you like as the name of the prototype and simply not define it. Just make sure your comment doesn’t match an actual Prototype that you didn’t mean to use!

Simple example:

As far as I know, this abuse of the prototype trait is harmless but use at you own risk (hopefully an expert will comment here with reassurance or better advice!).

Perhaps a “Comment” trait will replace this idea in future.

1 Like

I can confirm that this will have zero performance impact on the final counters once they are on the map.

2 Likes

This is a good idea. I’ve used the report trait to do the same thing with a blank key code and blank text. I suggest though that you establish a personal protocol of perhaps starting every comment with *** to avoid accidentally tripping a real prototype.

This is fine for traits, by the way, but is there a way to fake a comment is the main component list? Maybe folders as comments? The only problem with this is folders in the component list don’t display their description fields, so it would all have to be jammed in the name field.

There is one downside to this comment trickery. Some time in the future a more rigorous Vassal might start reporting this usage via a prototype (or report in my case) as an error.

2 Likes

No, that won’t happen. Including prototypes that don’t exist in counters is a valid way to allow later extensions to implement those prototypes and modify the counter behavior (for new counters pulled after the extension is loaded).