Place Marker trait does not place marker using offset

I can’t figure out why this Place Marker trait uses an offset of 0,0 when I have specified 200,100. Another Place Marker trait on the same map works fine, so I tried to make them similar, but no: thee new marker is placed in the same stack as the creating unit.

Isn’t that expected when you have it set to go on top of stack?

I have also tried with other positions, but with the same result. Besides, the Place Marker trait that works also places the marker on top of the stack.

For comparison, this is the one that works as intended. Maybe someone can spot something that I can’t see - apart from the fact that I load some more dynamic traits in the marker, and calls a key command.

I found the same problem. Mentioned it on discord.

I did some experimenting, and I have now found that this bug is dependent on which marker is to be placed. A number of markers are OK, but this “Max Radius” marker causes trouble.

It just consists of two lines: a Basic Piece, and a Prototype trait. Obviously, the problem must be in the Prototype.

I’ll investigate further.

1 Like

Hi, did you get to the bottom of this. I am experiencing the exact same issue. Making it non-stackable works but in my case I want it stackable.
Thanks

I’m not sure that I’m going to be able to do the fix but I took a look at the java code for Place Marker and I’ve raised issue #13719 with my initial thoughts.

I would be curious to see if this behavior stopped if you just increase the offsets. I suspect what’s happening is that it is offsetting the piece initially, but then it ends up close enough to the stack that it gets added back to the stack. Unfortunately, I don’t see any way to control how close a piece needs to be to be automatically added to a stack.

(To be honest, I don’t really understand why you would
want the piece to both be able to stack but also placed at an offset; it seems to be asking for exactly this sort of problem. Would it work to place the marker on a different Game Piece Layer, so it will only stack with other markers on that layer?)

I did notice that the documentation page claims that a piece with an offset will not stack with the original; I suspect the actual behavior is that it might not stack with the original, depending on how close to the original stack it is placed.

It does not.

in principle, I would expect that regardless of offset, the piece would normally snap to grid (unless that is disabled via Does Not Stack), which in turn might cause it to re-stack at that new location. However, that’s not the issue here.

If you can replicate this issue, please try one of these builds and let me know how you get on.

In summary, in this build I have bypassed Place Marker’s stack operations when one or both offsets are non-zero (I expect that this change will also affect Replace Marker).

Do not edit your module with this build (or if you do, work on a disposable copy).