lost-ark-dev / loa-details

LOA Details allows you to track real-time stats of the game Lost Ark and view and parse its logged data.
GNU General Public License v3.0
130 stars 42 forks source link

Automatic Discord webhook screenshots #28

Open evilandrex opened 11 months ago

evilandrex commented 11 months ago

Adds feature to automatically upload screenshots of the damage meter every time there's a phase transition.

Settings for the feature are added in the Upload tab of settings. When a webhook URL is set in the settings, the tickbox is enabled to start auto uploading of screenshots. This also shows a new Discord button in the main window that is a toggle for this button allows users to toggle auto uploading of screenshots quickly.

image

It uses a Discord channel webhook that lets us POST a message with a screenshot attached. The function fires whenever a phase-transition message is sent to DamageMeter. I attempted to only trigger this behavior when the pause reason was Boss Dead but it appears that it is difficult to reliably figure out whether it's a wipe, phase change, or the boss died. This means that it does trigger in some odd places like on adds between G2 and G3 of Brel.

Further documentation may be useful for users in the Wiki.

Not sure if everything is exactly correct or styled right, let me know if there's some changes I should make.

evilandrex commented 11 months ago

Quick patch notes blurb: Added feature to automatically upload screenshots of the meter to a Discord channel through a webhook. Settings for this feature can be found in the Uploading settings. Details available in the wiki.

Updated Wiki snippets:

Live view

live_view_ui_features

  1. Current time of the encounter
  2. Version of the app, to be sure your bring the latest features & last game version support
  3. Encounter header: May include encounter wide stats (customizable in the settings), like:
    • Total damage done
    • Total damage tanked
    • Total dps
    • Current boss hp/max hp
  4. Current table page columns (see How to read data for more mode details). Right click here allow for quick settings edition
  5. Toggle auto uploading screenshots of the meter at the end of each fight to Discord (only appears if you have a Discord webhook set in the settings)
  6. Take screenshot of the current view, saved in logs folder & copied to clipboard
  7. Enable clickthrough, so that you don't miss click on the meter, until you alt-tab to it
  8. Pause timer (only for live view, not parses, and it doesn't pause the logger)
  9. Minimize: behaviour will vary depending on your settings
  10. Navigate between different data table view (see How to read data for more mode details). If the window is too small, you'll have to click the tiny uparrow to upen the tab list
  11. Current status of the auto-upload feature
  12. Resets timer & damage done to 0 (only for live view)

Discord Webhook

discord_webhook

You can set a Discord webhook in the settings in the Uploading tab. This will allow you to automatically upload screenshots of the meter at the end of each fight to Discord. The screenshot will be of the main damage tab with whatever settings you currently have enabled. The boss and the uploader's name will be sent in the message such that it will be searchable in Discord. When a Discord webhook is set, an extra button will appear in the live view UI to toggle this feature on and off.

To get a webhook URL, go to a Discord Channel's settings, then "Integrations", then "Webhooks", then "New Webhook". Copy that webhook into the Settings. Anyone can upload to this webhook if they have the URL, so keep it private.