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

Item information on "createChatMessage" hook #650

Open
ZotyDev opened this issue Jan 27, 2024 · 2 comments
Open

Item information on "createChatMessage" hook #650

ZotyDev opened this issue Jan 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ZotyDev
Copy link

ZotyDev commented Jan 27, 2024

Can't reliably get the item that got used

Currently, there is not way to get the item that got used during a roll. the most common way is to try finding it on the data returned at the createChatMessage hook, but Symbaorum does not pass any reliable data that can be used to get the item.

Possible solution 1

Maybe passing the uuid algonside the rest of the chatData that you pass to ChatMessage.create() when rolls are done.

Possible solution 2

Call a custom hook when the roll is made, something like symbaroum.attack-roll, and pass the uuid of the item as the data.

Thank you for your efforts developing the system!

@bithir bithir added the enhancement New feature or request label Jan 27, 2024
@bithir
Copy link
Collaborator

bithir commented Jan 27, 2024

We already do have some code to add item information that was required for Maestro in the past, so adding it as a flag to chat message is not bad idea.

I would like to note though that everything in Symbaroum works from the players perspective, so if a monster attacks and the player rolls their defence, it would be the armor as the item, not the weapon of the monster.

@ZotyDev
Copy link
Author

ZotyDev commented Jan 27, 2024

Hm, that's different from what I was thinking. Maybe a attackSource flag could be added, hidden to the player, but available at the hook, that way modules can do animations.
My use-case is my own module, OIF, which some players want support for but sadly, due to the way the system works, I can't extract the item data just from chat messages.
But a uuid of the item/weapon that is the source of the action would be great.

Again, thanks for maintaining the system and listening for suggestions!

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

No branches or pull requests

2 participants