Numeric field contains a non-number followProperty

How to fix the problem with module that worked with previous version of Vassal and now (in 3.1.2) it reports “Numeric field contains a non-number followProperty” for Layer trait?

Also transparent PNGs don’t work.

Thus spake “morvael”:

Don’t work how?


J.


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

Post generated using Mail2Forum (mail2forum.com)

Transparent PNGs saved using IrfanView report as Bad Image or something like that, and they are no longer transparent. The same images saved using Paint.NET work. I guess there is problem with 24-bit PNGs with transparent color flag (that’s how Irfan View saves them I think), when I used a 32 bit mode in Paint.NET (which resulted in slightly larger files) they work.

So I have this problem with PNGs partially fixed (I will stick to Paint.NET and 32 bit PNGs).

Of more concern is the problem with Layer error message. Could you help me with that?

Thus spake “morvael”:

Please post one of these PNGs so I can have a look. We’ve been finding that
ImageIO doesn’t read some PNGs properly, that some programs write PNGs which
aren’t standards-compliant, and that some video drivers are broken in ways
which will make transparency render improperly. I’d like to try to determine
which of these is happening.

That’s someting Brent worked on. You’d have to ask him.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Is that the complete error message? Didn’t it tell you the property name and the value causing the problem? Can you track down which Embellishment is causing the problem from that? When does the message occur? What sort of property is it?


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

Post generated using Mail2Forum (mail2forum.com)

Yeah, it told me the name of the property. It was perfectly working in old Vassal so I thought it’s not necessary to present it here.

Bad Data in Module: Peasants [Layer - Allied marking] - Numeric field contains a non-number followProperty[allied_with]=null

Peasants is a Single piece placed in At-Start Stack on main map. It has only the traits Basic Piece, Prototype - Unit and Prototype - Hosar Access. Unit prototype has a Layer which follows the allied_with property. It was not used by regular units, only those which can be allied. Maybe I have to set this property for regular units to 0 or some unused value so that the Layer would be satisfied?

Old one, saved with IrfanView:

New one, saved with Paint.NET:

Strange, even though I ordered Paint.NET to save the file as 32 bit, IrfanView shows it as 24 bit. Anyway, the new one works.

Thus spake “morvael”:

Thanks.

This PNG appears to conform to the standard. I’ll try to figure out why
Java is failing to read it.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “morvael”:

Try build 3.1.3-svn5377 (or later):

nomic.net/~uckelman/tmp/vassal/

This should successfully load your original images. Please confirm for me
either way—this is a bug I’ve thought I had killed several times now,
and is likely to affect many, many modules.


J.


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

Post generated using Mail2Forum (mail2forum.com)

I can confirm that the version you said loaded the old version of the module and didn’t complain about PNGs. So PNGs created in IrfanView work now. Thanks!

Thus spake “morvael”:

Thank for testing it. This bug fix will be in 3.1.3, which I’m expecting
now that we’ll release before March is over.


J.


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

Post generated using Mail2Forum (mail2forum.com)

As far as the “Numeric field contains a non-number followProperty[…]=null” goes I would consider it a bug or reduction of options available to developer, and would like it changed to previous version.

Here is my situation:

Prototype Ally defines a Layer that follows a property called “allied_with”. It’s goal is to draw a proper frame around unit counter to show it’s allegiance without having to have 3 versions of each counter.

The property is set in game piece definitions before using prototype Ally with a Marker. So I have something like this:

[code]Single Piece

  • Basic Piece (Piece A variant 1)
  • Marker: allied_with = 0
    […]
  • Prototype: Ally
    [/code][code]Single Piece
  • Basic Piece (Piece A variant 2)
  • Marker: allied_with = 1
    […]
  • Prototype: Ally[/code][code]Single Piece
  • Basic Piece (Piece A variant 3)
  • Marker: allied_with = 2
    […]
  • Prototype: Ally[/code]

This worked with Vassal 3.0, yet now it won’t work saying

Bad Data in Module: [Layer - Allied marking] - Numeric field contains a non-number followProperty[allied_with]=null

when I want to open Allied prototype properties.

Before I had this with Unit prototype but since that was used also on units without the allied_with Marker I moved this to Allied. All units have this property set before using the Layer stored in Allied, yet Allied wants it in it’s own declaration.

Can someone help me here?

Yes, I will get back to you in detail about this, but I am tied up for a while.

Please be patient.

B.


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

Post generated using Mail2Forum (mail2forum.com)

Which module is this?

Thanks,
Brent.

*********** REPLY SEPARATOR ***********

On 24/03/2009 at 4:20 AM morvael wrote:


Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@exemail.com.au


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

Post generated using Mail2Forum (mail2forum.com)

Hi Dominik,

I have created an equivalent basic module and have the following observations to make:

  1. The module in fact still works as it did under 3.0. The Layer works correctly.

  2. You do not see the error at all in the Player and the module works correctly.

  3. The only time you see an error message is in the Editor when you open the prototype that contains the Layer definition. At this point, the Layer in the Prototype has no access to the counters, and so has cannot find a Property with a avalue to evaluate.

So basically, nothing is actually wrong, there is just a single error message that only you, as the Module Designer, sees.

I’m not exactly sure what to do about this. The error is being reported directly by the Layer, it doesn’t ‘know’ that it is in a Prototype definition that has no access to a property to determine it’s value.

Regards,
Brent.


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

Post generated using Mail2Forum (mail2forum.com)

Unfortunately even if there is no error-message in-game, the layer is never showing it’s images for value 1 or 2, only for 0.

Reference to module and a saved game showing problem please. I cannot debug your module by thought power.

B.


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

Post generated using Mail2Forum (mail2forum.com)

Please check the Demonlord module. The version uploaded on Vassal site last year will cause problems with images on Vassal 3.1.2 (those transparent PNGs) but with SVN version you will propably not have problems.

Please note that the Allied Marking layer trait is in that version in the Unit prototype, even though only allied units used it to full effect. Anyway, the way it was made back then, worked in Vassal 3.0.

Start a new game and go to any Neutrals stack (for example to the stack where “The Balron” is on top), then click one option, “Ally with Hosar” or “Ally with Demon”. All units should have orange or purple frame around their counter image (that’s what the trait was for).

As far as I can tell the reason the layer is not working (and also generating all your errors) is because although you have the layer “Allied marking” defined as having its levels follow the property “allied_with”, nowhere in the module is there actually defined the property “allied_with” as a marker trait, dynamic property or global property. So there is nothing for the layer levels to follow

If “allied_with” is defined in there - I cant find it! :slight_smile:

From: morvael messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Friday, March 27, 2009 9:44:34 AM
Subject: [Technical Support & Bugs]Re: Numeric field contains a non-number followProperty

Please check the Demonlord module. The version uploaded on Vassal site last year will cause problems with images on Vassal 3.1.2 (those transparent PNGs) but with SVN version you will propably not have problems.

Please note that the Allied Marking layer trait is in that version in the Unit prototype, even though only allied units used it to full effect. Any way, the way it was made it worked in Vassal 3.0.

Start a new game and go to any Neutrals stack (for example to the stack where “The Balron” is on top), then click one option, “Ally with Hosar” or “Ally with Demon”. All units should have orange or purple frame around their counter image (that’s what the trait was for).


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org

Post generated using Mail2Forum (mail2forum.com)

It is, look on the allied pieces, there are 3 versions of each, with allied_with 0, 1 and 2. No prototypes set this, but pieces. I did this that way to ensure the proper access control of allied pieces.

As I said above, the trait is in Unit prototype where in fact not all pieces using Unit prototype define allied_with Marker trait, so I think it can be moved to Allied prototype, which guarantees that all pieces using Allied define allied_with.

I’m 100% sure it worked in Vassal 3.0, I used the module extensively and if it wouldn’t work then I wouldn’t have released it :slight_smile: