wsaunders1014 / ShowDragDistance

Shows distance you dragged the token, similar to pressing ctrl.
10 stars 13 forks source link

Special movements for 5e #28

Closed mech-tools closed 4 years ago

mech-tools commented 4 years ago

Hello,

Not sure if it's a bug. With the latest version, if a character or a npc has a description as part of the special movement field on 5e. No path is shown when dragging the token.


Example: A npc with these two fields:

Dragging the token doesn't show the path and the colored squares.


The previous version used parseInt() or 0 to compute the values of value & special So:

That had a nice side effect. It showed the path for what it could compute. And that was quite OK. Because Swim and ground movement shouldn't be added up in this situation.

I allowed me to configure the special field these ways:

I was able to configure characters this way:

That was not perfect, but that was working. Any thoughts on that?

wsaunders1014 commented 4 years ago

I didn't realize that was what went in to the special section. You can just delete the reference to the special section and it won't add it. I'm not sure about metric movement.

mech-tools commented 4 years ago

@wsaunders1014 actually, having "swim 6 m" is the special movement field is really helpful. Can you make it so when the special field can not be read (NaN) it still shows the path for the value?

As for the metric system, this is not a metric system bug but rather a decimal issue. (another issue here: https://github.com/wsaunders1014/ShowDragDistance/issues/26)

wsaunders1014 commented 4 years ago

I've removed the special component from the max speed calculation. Since special movement is only for indicating movement like Climbing, Flying,Swimming, etc it doesn't make sense to add it to base speed. You can set a flag though using TokenReference.setFlag('ShowDragDistance','speed',{base:n,dash:n} and it will add that to the base movement speed defined in the settings.