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

feat: Add varbit save-to-file #1299

Closed
wants to merge 1 commit into from

Conversation

pajlada
Copy link
Contributor

@pajlada pajlada commented Oct 1, 2023

This is enabled by default whenever you run RuneLite in developer mode

It saves files to the quest-helper directory in the RuneLite config directory (e.g. ~/.runelite/quest-helper/ on Linux)
Each launch creates its own file, formatted {unixtime}-varbits.txt (e.g. 1702671614895-varbits.txt)
The content of the files look like this:

[2023-12-16 00:44:38.813] [18951] VarPlayer 3079 changed: 502386 -> 502387
[2023-12-16 00:44:39.414] [18952] Varbit 12391 changed: 786 -> 387
[2023-12-16 00:44:39.414] [18952] Varbit 12392 changed: 38 -> 39
[2023-12-16 00:44:39.414] [18952] VarPlayer 3079 changed: 502387 -> 502388

I use this helper shell script to listening for changes in the most current varbit file:

#!/usr/bin/env bash

last_varbit_file="$(find . -type f -iname "*-varbits.txt" -exec ls -t1 {} + | head -1)"

ignores=(
    # Clan chat clock
    -e 'Varbit 8354 '

    # Chat interface size
    -e 'Varbit 5983 '

    # Fairy ring dialds
    -e 'Varbit 3985 '
    -e 'Varbit 3986 '
    -e 'Varbit 3987 '

    # HIDE_MINIMAP
    -e 'Varbit 542 '

    # Attack style
    -e 'VarPlayer 43 '

    # something to do with main hand weapon something
    -e 'VarPlayer 46 '

    # Equipped weapon attack style
    -e 'Varbit 357 '

    # ?? but they changes all the time
    -e 'Varbit 12391 '
    -e 'Varbit 12392 '
    # some league dialog thing
    -e 'Varbit 12393 '

    # Unknown but seems to change based off of attacking or getting attacked
    -e 'Varbit 5934 '

    # some regen timer
    -e 'VarPlayer 3079 '

    # some buff bar stuff
    -e 'VarPlayer 3078 '

    # Ignore all client-side things
    -e 'VarClientInt '
    -e 'VarClientStr '
)

tail -n 100 -f "$last_varbit_file" \
    | grep -v "${ignores[@]}"

I have it enabled-by-default since that's the best way to not forget to track things, and to ensure we actually track everything from start to finish.

Open questions

Should there be a setting to disable this functionality even in developer mode?
Should this even be enabled at all, or merged into the main repo at all? Or should developers working on quests just enable this by cherry-picking this commit or something

@pajlada pajlada force-pushed the feat/varbit-log-to-file branch from a69802f to 8936077 Compare October 1, 2023 20:29
@pajlada pajlada force-pushed the feat/varbit-log-to-file branch 4 times, most recently from 7d196a3 to 59d01bc Compare December 15, 2023 21:03
@pajlada pajlada changed the title [WIP] Add bad varbit log-to-file feat: Add varbit save-to-file Dec 15, 2023
@pajlada pajlada force-pushed the feat/varbit-log-to-file branch from 59d01bc to 7d70cb1 Compare December 15, 2023 23:56
@pajlada pajlada marked this pull request as ready for review December 15, 2023 23:57
This is enabled by default when in developer mode
@pajlada pajlada force-pushed the feat/varbit-log-to-file branch from 4911c6b to 9189189 Compare July 20, 2024 12:13
@pajlada
Copy link
Contributor Author

pajlada commented Oct 19, 2024

This use case is now covered by the Action Logger plugin in the plugin hub

@pajlada pajlada closed this Oct 19, 2024
@pajlada pajlada deleted the feat/varbit-log-to-file branch October 19, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant