Create account / Log in

Wrong location report when using Delete trait

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Wrong location report when using Delete trait

Postby tozesantos » October 7th, 2013, 10:38 pm

Hi,
When using Report Action on a Delete trait, the $oldLocation$ or $location$ don't report the location where the unit was when deleted, but the previous location, if was moved. For example, if I place the unit on the map from the Game Piece Palette and delete it, the location is not reported. If I place the unit and move to other location, the reported location will be the one I initially placed the unit. I tried it using $location$ and $oldLocation$ properties but on both cases without sucess.
It just happens in Vassal 3.2.8.
When using 3.1.20 $oldLocation$ works fine, it reports the location where the unit was deleted...

(Sorry for my bad grammar, I hope I was clear enough...)

Toze Santos
---
Toze Santos
Braga - Portugal
tozesantos
 
Posts: 11
Joined: April 18th, 2008, 12:09 pm
Location: Braga - Portugal

Re: Wrong location report when using Delete trait

Postby shilinski » October 9th, 2013, 1:15 am

Try changing the order of the ReportDeleteAction and Delete traits in the piece's trait list. For example, if you list the ReportDeleteAction trait before the Delete trait, then move the Report Action trait so it is below Delete -- lower in the trait list.

Back in 3.1.19, I discovered if I listed a Report Delete Action first, then it would show the location as null. If I put the report trait after the delete trait, it worked properly. I have never checked it after 3.1.19, so I don't know if it now works properly.
shilinski
 
Posts: 170
Joined: December 22nd, 2007, 8:46 am
Location: Laurel, Maryland

Re: Wrong location report when using Delete trait

Postby tozesantos » October 9th, 2013, 8:40 am

Yep, I tried to do it (change the order of the traits) but the problem persists. I even created a new module with a piece with only Delete and Report traits just for test, changed the order of both and even so I got the same problem.
I think this is a bug of Vassal, but that's strange no one else has reported the same problem. Will be me doing something wrong?
But I really tried a lot of possibilities before place this mensage to be sure I was not doing anything wrong!!
---
Toze Santos
Braga - Portugal
tozesantos
 
Posts: 11
Joined: April 18th, 2008, 12:09 pm
Location: Braga - Portugal

Re: Wrong location report when using Delete trait

Postby JoelCFC25 » October 9th, 2013, 4:38 pm

It's possible that the Delete trait's interaction with the $location$ and $oldLocation$ properties needs to be updated. The Send to Location trait recently needed changes regarding these properties--Report Action was returning the correct values when StL was used to send a piece from one map window to another, but returning the wrong values when StL moved a piece to a new spot within the same map window.
JoelCFC25
 
Posts: 730
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Wrong location report when using Delete trait

Postby tozesantos » October 14th, 2013, 11:05 am

Well, while this bug is not fixed there is an easy way to make the Delete trait report the real location where the unit was delete using a Dinamic

Property to get the hex where the unit is and send it to the Report.

To the unit with the Delete trait give a DP named delete_loc, for example, and a command to "Set value directly" $LocationName$
On the map the unit will be deleted add the command that change the DP to "Key Command to apply to all units ending movement on this map".
(That will give to the DP the name of the hex where the unit is...)

On the Report trait add $delete_loc$ to the "Report format" (and other information you want, of course, like the name of the unit, etc.)

This way, when you delete the unit the Report will get $delete_loc$ that is the name or number of the location where the unit was deleted.
---
Toze Santos
Braga - Portugal
tozesantos
 
Posts: 11
Joined: April 18th, 2008, 12:09 pm
Location: Braga - Portugal

Re: Wrong location report when using Delete trait

Postby uckelman » October 14th, 2013, 11:18 am

Thus spake tozesantos:
> Well, while this bug is not fixed there is an easy way to make the
> Delete trait report the real location where the unit was delete using a
> Dinamic

If you want the bug fixed, make a minimal test module demonstrating
the problem, with instructions for triggering it, and post those here.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Wrong location report when using Delete trait

Postby tozesantos » October 14th, 2013, 10:11 pm

Hi Joel,
In the links below you can download the test modules demonstrating the problem.
I had made two modules, one using VASSAL 3.2.8 and other using 3.1.20.
Just open the modules and place the units on the mapboard and delete them. On 3.2.8 I created two units with a Delete and Report traits, one using $location$ on the Report and other using $oldLocation$. But you will see none of them reports correctly the location from where the unit is deleted. On 3.1.20 I have a unit with $oldLocation$ on the Report and this one reports correctly...

https://dl.dropboxusercontent.com/u/103 ... _1_20.vmod

https://dl.dropboxusercontent.com/u/103 ... 3_2_8.vmod

Thanks in advance for your help...


Toze Santos
---
Toze Santos
Braga - Portugal
tozesantos
 
Posts: 11
Joined: April 18th, 2008, 12:09 pm
Location: Braga - Portugal

Re: Wrong location report when using Delete trait

Postby samuelw3 » October 22nd, 2013, 12:00 pm

I'm seeing the same issue on modules I'm working on. Thanks for working on this.
But for some reason it works if the message contains Deleted piece -> $oldPieceName$ at $oldMapName$:$oldLocation$

But not if I use any none 'old' variables. $PieceName$ at $MapName$:$oldLocation$
samuelw3
 
Posts: 46
Joined: August 31st, 2011, 5:34 pm
Location: Columbus OH


Return to Technical Support & Bugs

Who is online

Users browsing this forum: No registered users and 2 guests