Create account / Log in

Masked Unit Rotation

Discussion area for the development team.

Moderators: uckelman, Tim M

Masked Unit Rotation

Postby jimpyle » July 11th, 2009, 3:27 pm

I working on an AH 1914 VASSAL module. In the original game, the back, hidden side, of the pieces showed "defensive lines" on the top and an arrow on the bottom. I want to use layers to show the decrease and increase in unit values as they take losses and reinforcement so I thought I'd use masking to show the hidden side of the counters. The pieces need to rotate to show which hex sides they are defending.

I got it to work fine for the side that does the masking, see "Allied View" below. But when I switch to the German player, the masking only works as desired as long as the top of the unit is pointed to the top. The rotated pieces don't show the masked side, they show the display view. See "German View".

Anyone know if I can keep the masked side when rotating and if so, how do I do it? :)

Thanks,

Jim
Attachments
Allied View.jpg
Allied View
Allied View.jpg (37.15 KiB) Viewed 4576 times
German View.jpg
German View
German View.jpg (28.56 KiB) Viewed 4576 times
User avatar
jimpyle
 
Posts: 94
Joined: March 4th, 2008, 9:17 pm

And it gets stranger

Postby jimpyle » July 11th, 2009, 6:40 pm

I read where I had to have the "Can Rotate" as the last trait and obviously after the "Mask" trait. I had alreay done that.

I just added the "Text Label" trait between the "Mask" and "Can Rotate". If I actually add a text label, even just a space, everything works like I want. If I don't actually have any text or spaces, it doesn't work. :?

Jim
User avatar
jimpyle
 
Posts: 94
Joined: March 4th, 2008, 9:17 pm

Masked Unit Rotation

Postby Brent Easton » July 11th, 2009, 9:58 pm

Hi Jim,

Potential bugs can only be investigated if you supply a link to your module and a log or save file of a game situation demonstrating the problem.

Regards,
Brent.


On 11/07/2009 at 11:40 AM jimpyle wrote:

I read where I had to have the "Can Rotate" as the last trait and
obviously after the "Mask" trait. I had alreay done that.

I just added the "Text Label" trait between the "Mask" and "Can Rotate".
If I actually add a test label, even just a space, everything works like I
want. :?

Jim



_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
Brent Easton
 
Posts: 3393
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Copy of Module

Postby jimpyle » July 12th, 2009, 1:45 am

Hi Brent,

Here's where you can find a copy of the module.

http://www.mediafire.com/download.php?umzzkzmdi0i

Thanks for your help.

Jim
User avatar
jimpyle
 
Posts: 94
Joined: March 4th, 2008, 9:17 pm

Masked Unit Rotation

Postby Brent Easton » July 15th, 2009, 12:58 pm

Hi Jim,

Thanks for the link to the module and the detailed description on how to generate the error.

The way you have specified your traits is correct.

It turns out to be a bug in the way 'Can Rotate' draws pieces when you change sides without restarting the game. You will find that if you save the game as allies, then close the game, then change your password, then load the saved game as germans, the pieces will display correctly.

Joel, I have created bug 2821853 for this and assigned it over to you. I've done some investigation and tried to fix, but couldn't get it to work.

The problem appears to be in GamePieceOpImpl.isChanged(). It does not take into account that the current Player's side may have changed, thus affecting how he views the piece. A GamePieceOpImpl is only used when the angle of rotation is not 0, thus explaining the initial symptom. I thought saving the side when the GamePieceOpImpl is created and checking this in isChanged() would fix the problem, but it seems to be something deeper in the Op caching.

B.


On 11/07/2009 at 6:45 PM jimpyle wrote:

Hi Brent,

Here's where you can find a copy of the module.

http://www.mediafire.com/download.php?umzzkzmdi0i

Thanks for your help.

Jim



_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
Brent Easton
 
Posts: 3393
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Postby jimpyle » July 15th, 2009, 8:07 pm

Thanks for the help, Brent!

Jim
User avatar
jimpyle
 
Posts: 94
Joined: March 4th, 2008, 9:17 pm

Re: Masked Unit Rotation

Postby uckelman » May 13th, 2021, 1:34 pm

We believe we've fixed this bug in the current 3.5.6 development build. Please try VASSAL-3.5.6-SNAPSHOT-26b3c7d or later: http://www.vassalengine.org/builds/
User avatar
uckelman
Site Admin
 
Posts: 9399
Joined: December 10th, 2007, 9:48 am
Location: Durham, England


Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests