Mark moved button

You can save a module with a Map Window that marks pieces that move. The editor will let you save it if you don’t give a filename for a “mark moved” icon or no text, but when you load the module it will complain about an IllegalArgumentException when it tries to load the empty-name icon.

I think this might have worked in 3.0.17, but it appears that with the new graphics rendering code, VASSAL is more strict about empty-string arguments. Some previous modules were using an empty button, but Gregory has given me one that does and it works fine in 3.0.17.

More info: Gregory has informed me that in older versions of VASSAL, if there was nothing to show on the button, the button was not shown. In the present version, we get a NullPointerException. Apparently, this was a common trick to hide the “mark moved” button when it wasn’t wanted.

  • M.

On 05/03/2008, mkiefte <messages@forums.vassalengine.org (messages@forums.vassalengine.org)> wrote:

Post generated using Mail2Forum (mail2forum.com)

Hi mkiefte,

Well, i’m getting this when i open the module to play or edit it:

And i don’t have the “Mark When Moved” trait on any Prototype Definition (the only place i found where you can set up that), although i have “Mark pieces that move” set on Always, because it’s needed to use the “unmoved” button.

What you’re getting there is a completely different problem, but I’m not sure why you’re getting it. Could you send me a link to the module? Alternatively, could you unzip that module and tell me if images/moved.gif really isn’t there?

One thing to try is to open the module in an editor, open all your mapboards and click on default for the mark moved button icon and then save it again.

  • M.

On 06/03/2008, Traxis <messages@forums.vassalengine.org (messages@forums.vassalengine.org)> wrote:

Post generated using Mail2Forum (mail2forum.com)

Hi,

There you go:

http://www.vassalengine.org/community/index.php?option=com_vassal_modules&task=display&module_id=121&page=Files

And no, there’s no “moved.gif” inside it :frowning: Oh, and where’s the “mark moved button icon” option? I can’t find it…

Regards, Traxis

Interesting. This was built with VASSAL v.2.4.2.

The moved.gif icon is clearly not in the module, so where is VASSAL supposed to find it?

I don’t know the answer, but I’m guessing that this particular module never had a ‘mark moved’ icon, but in a new revision, the default is enforced if no other alternative is found in the buildFile (there’s no icon mentioned in the buildFile). However, because the original module wasn’t supposed to have an icon, the new version of VASSAL is looking for an image that isn’t there.

Am I on track here guys?

  • M.

On 06/03/2008, Traxis <messages@forums.vassalengine.org (messages@forums.vassalengine.org)> wrote:

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

moved.gif is in Vengine.jar.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

So why can’t the module find it in this case?

  • M.

On 07/03/2008, Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)> wrote:

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

I downloaded the module, and I don’t understand why VASSAL is trying
to find moved.gif at all—it’s not referenced in the module’s buildFile.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Is moved.gif the default if none is specified?

  • M.

On 07/03/2008, Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)> wrote:

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

It is the default image for the “Moved” flag, but in the sense that
it’s what you get if you hit the “Default” button in the Editor.

The problem must either be in MovementMarkable or IconConfigurer.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Actually it is on line 564 of buildFile. The type is:
markmoved;moved;0;0;Clear Movement Trail;32,65

/images/ and .gif are filled in if it can’t find the basename.

I’m thinking that, at one time, if the program couldn’t find the image in the module, it would look for it in Vengine.jar. This is reasonable behaviour as it’s redundant otherwise. The problem is that it doesn’t (any longer).

  • M.

On 07/03/2008, Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)> wrote:

Post generated using Mail2Forum (mail2forum.com)

Thus spake Joel Uckelman:

I know now what the problem is: A long, long time ago we let module
designers specify GIFs by the basename only, and then tacked ‘.gif’
on for them. Unfortunately, people actually used this feature, which
is vexing, as that means that DataArchive has to support it and we
can’t just kick it to the curb. (Fortunately, new modules aren’t
saved this way.) If I were king of the world, I’d change DataArchive
to email a module designer every time someone loads a GIF with no
extension…

Anyway, I should be albe to fix this now.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake Joel Uckelman:

Fixed in trunk@3242.

nomic.net/~uckelman/tmp/vassal/


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Nice, but again, where’s the “mark moved button icon” option? i’ve never seen it :frowning:

Thus spake “Traxis”:

There is no “marked moved button icon” option. There is a “Mark unmoved”
button, the settings for which appear in the properties dialog for Maps,
and there is a “Marker Image” which you can set in the properties dialog
for the Mark When Moved counter trait.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)