Issue with custom traits in prototypes

I am developing a custom trait that will handle gunnery in a naval game.
After importing the trait and inserting the trait into the prototype, it looks like this:

No problems - but when I close and reopen the prototype the trait is transformed into a marker:

If, instead of creating a prototype, I insert the same trait directly onto the counter and then closing and reopening the trait window, there is no problem. Works like a charm…

This behaviour is in 3.7.14 and also 3.7.13.
Either there is something wrong within my Java code - or there is an error in Vassal.

Can you help me out?

/henrik

It’s hard to speculate without seeing the code.

I have reviewed my code and can find nothing obviously wrong…

And then it dawned upon me: I have received a new copy of the module I am modifying. It had so many modifications that I decided to reimplement my custom modifications. And In the process, I completely forgot to insert my derived BasicCommandEncoder in buildFile.xml. DOH!

I didn’t use prototypes in the first version and when I tried that in the new version, I mistakenly believed the prototype was the cause of the error. It turned out not to work in counters either - I just assumed it from previous experience with the old module.

The morale: Drink less beer and more coffee when coding :slight_smile:

Thanks for your time
Henrik

1 Like