adamk33n3r / runelite-watchdog

Custom notification plugin for RuneLite
BSD 2-Clause "Simplified" License
6 stars 21 forks source link

[Feature] Improve Chat Picker #123

Closed CreativeTechGuy closed 6 months ago

CreativeTechGuy commented 7 months ago

Example: I'm trying to make an alert for the "Your cannon has broken!" message. I assume that it is a Notification so I make that alert type, I use the message picker tool to verify that it is of that type from chat history, then I pick it. Turns out, that's actually a Game Message not a Notification so the alert doesn't work.

It'd be great if the message picker feature only showed messages which were relevant for the current alert type that you had configured so it wouldn't give you the option to pick something that ultimately wouldn't work.

adamk33n3r commented 7 months ago

Well, it's a chat message picker, not a notification message picker. There's not a way to tell if a game message came from a notification, so filtering isn't possible. Regardless, if you see a message in your chat, then that's a game message. So you can/should just use the game message alert. The use case for using the chat message picker on a notification fired alert is if you know it's a notification.

Aside from tracking every notification message fired (potentially viable, but not high priority in my mind), there's nothing that can be done. The alternative is not having the picker at all on notification fired alerts. Better than nothing!

CreativeTechGuy commented 7 months ago

Regardless, if you see a message in your chat, then that's a game message. So you can/should just use the game message alert

If you have the RuneLite "Game message notifications" setting enabled (which I do), then RuneLite Notifications show up in the chatbox and are indistinguishable from Runescape messages. I was hoping that the message picker would help identify which was which since it's nearly impossible to tell without guess and checking.

So I think if someone has that setting enabled, it's incorrect both ways. If someone is picking a Game Message, it'll show RuneLite Notification Messages in the message picker. If someone is picking a Notification, it'll show Game Messages in the message picker. I think it'll only work correctly for Game Messages if that setting is disabled.

Aside from tracking every notification message fired

Funny enough, that's what I assumed it was doing currently. But I guess it's actually just reading from the chatbox whenever you click the message picker rather than keeping it's own in-memory copy of the messages pre-categorized.

That'd also enable really useful things like the Player Chat Message which has the new Chat Type filter, if you select Chat Type friends and then click the message picker, it should only show you messages from friends, etc.

adamk33n3r commented 7 months ago

If you have a game message alert, and are sending notifications as game messages, it will work. I think that's what you're saying wouldn't work but correct me if I'm misunderstanding you.

Funny enough, that's what I assumed it was doing currently. But I guess it's actually just reading from the chatbox whenever you click the message picker rather than keeping it's own in-memory copy of the messages pre-categorized.

I just checked and actually I am storing chat messages myself, in an evicting queue of 20. So it keeps the 20 last messages. It was previously just reading the chat box, but it would have been more complicated to sort and such. So adding another tracker for notifications would be fine.

That'd also enable really useful things like the Player Chat Message which has the new Chat Type filter, if you select Chat Type friends and then click the message picker, it should only show you messages from friends, etc.

I really like that, that's a good idea.

CreativeTechGuy commented 7 months ago

If you have a game message alert, and are sending notifications as game messages, it will work. I think that's what you're saying wouldn't work but correct me if I'm misunderstanding you.

Ah I didn't realize that. What I had done was used the Notification Fired alert type. So I guess Notification Fired is actually a subset of Game Message? I guess I wonder why there's a difference then, that's confusing haha. TIL thank you!

adamk33n3r commented 7 months ago

So I guess Notification Fired is actually a subset of Game Message?

not technically. notifications going to your game messages is a runelite setting that is outside of watchdog

I guess I wonder why there's a difference then

So that you can have alerts fire on things without needing them to go to your game messages (having that setting off). It's not a common use case, that's why I have it at the bottom of the list, and why I recommend against using it unless you know what you're doing.

CreativeTechGuy commented 7 months ago

Ah okay. So Notification Fired will work regardless of that RuneLite setting, but Game Message may or may not work depending on the RuneLite setting. So I guess yeah, if it's an alert based on a RuneLite notification it should use the Notification Fired alert type to make sure that it isn't broken by an external setting.

Thank you for explaining. 😄

adamk33n3r commented 7 months ago

Ya, and messages that are from runescape itself will only work with game message.

adamk33n3r commented 6 months ago

Fixed in f6bd7802849e95dc88a48a884b5d28c84a92b0c4 and dfff8d2f2dbdb1477642a004a265fcc92f547693