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

Players unable to apply damage #132

Open
3 tasks done
tinwe opened this issue May 11, 2023 · 3 comments
Open
3 tasks done

Players unable to apply damage #132

tinwe opened this issue May 11, 2023 · 3 comments
Labels
qol Quality of Life or Bells & Whistles

Comments

@tinwe
Copy link
Contributor

tinwe commented May 11, 2023

Describe the bug

My players aren't able to apply damage themselves. It says they lack permissions.
Is this by design, so that only the Referee can apply the damage, or what settings should I enable for them to be able to apply the damage themselves?
I really don't want to give all players ownership to the NPC characters nor their tokens, for this.

Reproduction

Have a player fire a weapon, target an enemy token, and try to apply the resulting damage from the attack.

System Info

Several different player clients, mostly Chrome, but using the latest Foundry and T2k system.
Foundry 10, build 291
T2k4: 10.2.0

Logs

We only excperience these errors while during our sessions, but when I tried to recreate it on my own using their login, I don't get the same error message, but I do experience these logs when trying to apply the damage.

t2k4e.js:15 Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'length')
[Detected 1 package: system:t2k4e]
    at ActorT2K.applyDamageToCharacter (t2k4e.js:15:16219)
    at ActorT2K.applyDamage (t2k4e.js:15:15719)
    at _applyDamage (t2k4e.js:15:29588)
    at Object.callback (t2k4e.js:15:28139)
    at #onClickItem (foundry.js:56177:11)
    at HTMLElement.dispatch (jquery.min.js:2:43064)
    at y.handle (jquery.min.js:2:41048)
applyDamageToCharacter @ t2k4e.js:15
applyDamage @ t2k4e.js:15
_applyDamage @ t2k4e.js:15
callback @ t2k4e.js:15
#onClickItem @ foundry.js:56177
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2

Priority this issue should have?

High (a broken feature, major functional impact)

Validations

  • Done a clean install of the system.
  • Disabled all modules.
  • Checked if the issue is present in a new world instance (create a new world in foundry using the Twilight 2000 system).
@tinwe tinwe added the bug Something isn't working label May 11, 2023
@Stefouch
Copy link
Member

Related: #110

It is a design issue, because Foundry "sees" that a player is trying to apply a change (damage) to an NPC (controlled by the GM) and since that player does not have permission over the NPC (obviously), Foundry forbids the change.

I'll investigate on how to force Foundry to ignore player permissions for this command.

@Stefouch Stefouch added qol Quality of Life or Bells & Whistles and removed bug Something isn't working labels May 30, 2023
@uhu79
Copy link

uhu79 commented Sep 3, 2023

it seems that "apply damage" does not work anymore at all, neither for players nor for GM

@stories-with-dice
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qol Quality of Life or Bells & Whistles
Projects
None yet
Development

No branches or pull requests

4 participants