Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokens getting "Locked" in certain regions: "You cannot take this action while token object is locked" #64

Open
ConnorJBeck opened this issue Oct 6, 2024 · 4 comments

Comments

@ConnorJBeck
Copy link

So I've been having some issues with regions, and specifically they seem to be caused by this module. I am using PF2e system 6.4.1.

To start, I was setting up a fairly simple scene: a staircase leading up to a plateau. I created two regions, one for the stairs and one for the plateau. In this case, a token on the stairs was moving fine, and elevation was updating as expected, but as soon as the token crossed over into the plateau, it froze. In fact, it would get duplicated, one at the start of the move and one at the destination, with the drag ruler in the middle (using system drag ruler). At that point, I could not move the token any more, or I'd get the error message shown in the title. I could delete the token (at the source) but the destination "ghost token" could not even be selected, and the ruler measurement stayed. Refreshing would fix the issue. This was a client side issue - other clients would not see any of these things, they would just see the token not move at all. All clients suffered the same issue if they tried to move the token into the plateau. Creating an actor in the plateau, and trying to move it also suffered the same issue.

I experimented with a few things.

  • Recreating the plateau in the same way did not fix the issue.
  • Changing the plateau into a ramp did not fix the issue.
  • Making the top not a plateau (or a ramp) fixed the issue, but meant that the tokens elevation would drop back to 0 at the top of the steps when they entered the plateau.

SOLUTION

What DID fix the issue was using "Fill by grid" or "Draw Rectangle" options when creating the region. Previously, I had been using "Fill Space Enclosed By Walls" tool. My map (especially the plateau) has a lot of wall segments due to having curvy walls, so my suspicion is that the number of walls was creating a region so complex that the terrain mapper was getting overwhelmed and locking the token. Even when using these other options for creating simple, square regions, I'm still noticing a significant lag when transitioning from the plateau to the stairs and vice versa, maybe about 1 second, but it's manageable.

So yeah, hopefully this helps somebody else struggling with the same problem - simplify your regions! But also, if there's anything that can be done to make the performance better or make terrain mapping work better with complex regions, it would be very handy!

@KLSteinwand
Copy link

I haven't experienced the duplication effect, but I did notice that after an elevation change to a higher elevation, if the plateau mesa has holes in it, it'll lock the token. I had to redraw the region to manually include the hole for it to not lock the token.

@caewok
Copy link
Owner

caewok commented Nov 4, 2024

There is no system drag ruler, at least not in Foundry v12. If you are using Drag Ruler, the module, I cannot support it. Try my Elevation Ruler module.

@KLSteinwand I don't quite understand what you mean: If you are redrawing the region to manually include the hole, what were you doing previous to that? Was it the "Fill Space Enclosed By Walls" tool that created the hole that locked the token? Or something else?

@KLSteinwand
Copy link

I don't use the fill tool, so any holes I created were separate rectangles/ellipses/polygons. So to avoid the lock up, if I were drawing a rectangle for example, I'd create a polygon instead to manually draw out the rectangle and have it include the hole.

@ConnorJBeck
Copy link
Author

@caewok , to be clear, I mean the drag ruler that's built into the PF2e system that was only introduced in foundry v12. It's still in somewhat early support, but it's decent enough that I've been using it. If you haven't seen it, you need to disable all other drag ruler modules (including Elevation Ruler) to even get the setting to enable it.

I recall I tried to make elevation ruler work for a bit but had some issues with it so had to switch away, but I don't recall what those issues are now. I'll revisit it again, it's been a few months since I tried it.

Also, I can confirm that there were holes in the mesa area, so maybe that was it? I didn't try without the holes, but maybe I could. But yeah, using fill by grid I didn't seem to have that problem, but IIRC I also filled the holes in when using fill by grid because they didn't need a different region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants