VBFG 2.0: Planet Rings

Hi Folks,

actually I’m completely redesigning the BFG Module.
After roughly 8 weeks into VASSAL Module Design and into VBFG 2.0 I came to a halt today.

I need some help or ideas how to implement the Rings one can place around a Planet in BFG.

What the BFG Game Manual says:

  • Large Planets (26cm … 50cm Diameter) may have up to 3 Rings
  • Each Ring is D6cm wide and starts D6*5cm above the planets surface

At game setup I would like to choose a planet of a certain kind and place it on the game board. Actually I have 7 large planets with different diameters included in VBFG 2.0.
After that, one should be able to set a Ring Position (0…6) and a Ring Width (0…6) for each of the 3 possible rings.
A Position of ‘0’ should hide a Ring.

First I tried to draw .PNG images for each possible Ring.
This very shortly was out of question just because the number of Rings I would have to draw (36 possible Ring Images per Planet Diameter minus some reusable ones - too many anyway with regard to module size)

After quite some thinking I came up with ~90 1cm wide .SVG rings to construct the required planet rings from.

Placing each of those 1cm Rings inside a seperate layer would enable me to switch them on/off one by one as needed.
Switching on/off could be achieved with the ‘Activate’ function of a layer and two ‘Trigger’ traits. Well that requires an awful lot of keys attached to the layers but with CTRL, ALT and UPPER together with 0-9, that should be manageable.

Now I have to calculate when each of those lill rings should show up or hide.

For that I could use two properties for each ring stating the inner and outer edge of the ring in cm from the center. With that I easily could trigger each required 1cm ring layer to compose the whole thing.

To get the inner edge I would have to evaluate…
InnerEdge = PlanetDiameter + RingPosition5
and to get the outer edge…
OuterEdge = PlanetDiameter + RingPosition
5 + RingWidth

The only question left is:
How could I animate VASSAL to do that calculation and to place the results into appropriate properties to trigger my bunch of layers?

Any Help on that is appreciated.

Actually I’m thinking of an generic ‘Eval’ Trait or like to handle the job, though I have to learn how to code such a Trait with Java first…

brgds
Harlekin