javierriveracastro / betteroll-swade

A Better Rolls port for SWADE
GNU General Public License v3.0
16 stars 32 forks source link

Unlinked tokens trigger BR2 actions from their proto actor not their token #631

Closed grendel111111 closed 11 months ago

grendel111111 commented 1 year ago

When BR2 actions are put up they look at the actual actor to decide what effects are present. This is not a problem as when the token and actor are linked they are always the same. However when you have an unlinked token it creates problems. This image is a linked token. As you can see it has the blind condition (and so does the actor) and BR2 trigger the blind effect.

image

This one shows what happens if we unlink the actor and remove blind from the token. The actor still has blind but the token doesn't so it should not have the blind effect. (But it does)

image

Now if we make the actor not blind but the token is blind and we try Agility again the blind condition isn't picked up on the token because the actor doesn't have it.

image

This happens for everything including actor has / target has etc. when the token is unlinked. Work arounds would be to have all tokens linked and separate actors for each minion on the board. Or check the token if they are unlinked instead of the actor (But I'm not sure if that is possible). Any ideas?

javierriveracastro commented 1 year ago

Unlinked tokens inherit the effects from their actor. The other way is not true (a token actor can have an effect and it doesn't change the main actor). It has nothing to do with better rolls.

https://github.com/javierriveracastro/betteroll-swade/assets/8113700/3c1f2631-7e4e-4360-b50d-c80304cfc6a8

If you only set effects on tokens it should work.

grendel111111 commented 11 months ago

Sorry to reopen this but I didn't explain it clearly. If you put an effect on an unlinked token, and the actor doesn't also have that effect then BR2 will not find the effect when it uses the actor_has_effect selector. I made a short video to show what I mean. https://youtu.be/XxwustNMukQ

javierriveracastro commented 11 months ago

Can it be a Token Action HUD issue?.

This will also explain some strange things that have been talked in discord about vulnerable...

Can you try it rolling directly from the sheet?

grendel111111 commented 11 months ago

Your right. If I run from the character sheet it gives the top result, from HUD it gives the lower result. image

javierriveracastro commented 11 months ago

I will have to take a look at the token hud source.

grendel111111 commented 11 months ago

Thanks

javierriveracastro commented 11 months ago

The source makes sense to me. It is always sending the token to br... or at least it looks like that.

grendel111111 commented 11 months ago

OK so I have finally discovered the problem. After I came back from holiday I seem to have had it running the token Action HUD classic, not the Core+SWADE. The problem occours when using classic, and having swapped, it has now stopped. I'm very sorry.

javierriveracastro commented 11 months ago

Nice.