Shared dynamic Property between multiply game pieces

Ok This is my first post so, sorry ahead of time if this has been discussed. What I want to do is the following.
In the Game Pieces tray there are 6 items, AA, BB, CC, [[, ]], \, !!, @@, ##. A player may have multiply numbers of any of the items in the tray and each item has some dynamic properties attached to it: AA,BB,CC have properties 11, 22, 33, 44, 55, 66 [[,]],\ have 11,22,33,44 and !!,@@,## have 55,66. What I want to have happen is that AA,BB,CC can spawn [[,]],\,!!,@@,## and the values 11,22,33,44,55,66 are the same on each piece AND when one of the spawned pieces changes the value the pieces that spawns it also changes the value or visa versa.

So what I need is the the Main piece to create a dynamic variable that is unique to it BUT can be effected by the pieces that it spawns.

I have been able to make piece AA,BB,CC start with values in it that are do not effect any additional pieces that are drawn, but when it spawns a piece that spawned piece does not have any values and if I change the values on anything it does not effect any other thing.

Not sure if that makes sense of not or if it could be done.
The logic is, when an item spawns a piece it doesn’t just pass values to its children but instead points them to it’s current values and allows them to modify it.

I would like to use prototypes so each piece just has to have the base stats and it allows the prototype to display the values.

Vassal Engine Version 3.2.15
Module is my own that I am scratch building using only what vassal has in it. (no importing)
Os is Windows.

Any help would be nice.
(the AA,BB,CC pieces each have values for 11,22,33,44,55,66 and pass them up to a prototype that then displays them), When they spawn new items the items look at the prototype to get values but the values are blank but are dynamic and can be changed, they just don’t effect the piece that spawned them.

Very, very difficult (if not impossible) to do using standard Vassal functionality. The only way to do this would be via custom coded Java traits.

You can’t have a value in one piece used by another piece without custom code (though if you change your mind about using custom code, I already have some that does this). You can achieve the same effect, however, by having a value in each piece which is kept ‘in sync’ by sending a Global Key Command whenever the value in any piece changes.

Basically, you need a Trigger Action that fires whenever the value changes. The Trigger first puts the new value into a Global Property (so that other pieces can access it), then sends a GKC to all the pieces which need to be kept in sync. Upon receiving the GKC, those pieces copy the value from the Global Property into their own Dynamic Property.

Do not think this would work as there would be more than one of the same piece that could spawn on the board at a time and I only want to effect one copy of it. (I’ve never really done anything like this before). How hard is it to use the custom code you made and what would I need program wise to tailor it to my needs if it doesn’t quite work the way I want?
All the code needs to do is spawn a predefined object that has traits linked to the object that spawn it, but only the copy of the unit that spawned it.

You need to give the spawning piece an id which the spawned pieces know. Then the GKC is only sent to pieces with the right id. I’ve attached an example module demonstrating what I mean.

The custom code I have would only help with part of this (it lets you read properties from other pieces, but doesn’t enable you to modify them, so you would still need the GKCs). It’s probably not worth it if you’re reluctant to use custom code, but I can make it available if you like.