Skip to content

Feature: Option to force standard quality Attack Bar#87

Merged
Lexer747 merged 3 commits intongraves95:mainfrom
PedroSilvaAlves:main
Mar 19, 2026
Merged

Feature: Option to force standard quality Attack Bar#87
Lexer747 merged 3 commits intongraves95:mainfrom
PedroSilvaAlves:main

Conversation

@PedroSilvaAlves
Copy link
Copy Markdown
Contributor

Option to force standard quality Attack Bar regardless of option selected by Interface Styles

Raised in Issue #85

@RedSparr0w
Copy link
Copy Markdown

Instead of just forcing low detail as an option, could it instead be a select:

auto - current behavior (hd in hd, sd in sd)
standard - force standard
high detail - force hd

@PedroSilvaAlves PedroSilvaAlves marked this pull request as draft March 15, 2026 00:35
@PedroSilvaAlves PedroSilvaAlves marked this pull request as ready for review March 17, 2026 14:14
@PedroSilvaAlves
Copy link
Copy Markdown
Contributor Author

PedroSilvaAlves commented Mar 17, 2026

Hey, I've updated the PR based on the feedback. The Force Standard Quality toggle has been replaced with an Attack Bar Style dropdown.

Style dropdown with three options:

  • Auto — current behavior (HD when using HD interface styles, SD otherwise)
  • Standard — always forces the standard quality bar
  • High Detail — always forces the HD bar

Default is Auto, so existing behavior is unchanged. Tested in-game and all three options work as expected.
force_low
force_HD
auto_standard
auto_HD

@Lexer747 Lexer747 self-requested a review March 17, 2026 22:36
@Lexer747
Copy link
Copy Markdown
Collaborator

Testing looks great! I'll do a code review this week, thank you for working on this.

@Lexer747
Copy link
Copy Markdown
Collaborator

I'm getting two different exceptions while testing this:

[Client] WARN  n.r.c.ui.overlay.OverlayRenderer - Error during overlay rendering
java.awt.image.RasterFormatException: negative or zero width

And

[Client] WARN  n.r.c.ui.overlay.OverlayRenderer - Error during overlay rendering
java.awt.image.RasterFormatException: (x + width) is outside of Raster

With these settings
image

Both are thrown on line 107 of AttackTimerBarOverlay.java

Ah I just checked and this is happening on main not this branch specifically. I think it's issue #92 which has been around since #72. I guess I never saw this because I dont use the HD plugin 😅

Will review the code in this PR now.

Copy link
Copy Markdown
Collaborator

@Lexer747 Lexer747 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks for adding the option :)

@Lexer747 Lexer747 merged commit 113a14c into ngraves95:main Mar 19, 2026
1 check passed
Lexer747 added a commit that referenced this pull request Mar 27, 2026
## Summary

As reported by #92 (but I personally didn't encounter until #87 was merged) when the HD bar is empty it will spam the logs with exceptions.

Looking at what causes this it's two things:

* When the bar is nearly empty:
  * Ratio can be negative depending on the settings
  * If the ratio is negative then negative pixels are requested for the sub image
* When the bar is actually empty:
  * `progressFill` is `0`  which asks for a 0 width sub image

Therefore to make the code more robust `ratio` is always clamped between `0` and `1`. And when `progressFill` is less than or equal to `1` we should just not draw the second image. (which was what was already happening if you think about because the exception is complaining it can't draw an image).

-----

Aside: updated the copyright (git history) and formatting of the file.

## Testing

A minute of gargoyle killing flicking through the settings showing the RL logs and the lack of spam :)

https://www.youtube.com/watch?v=WBdZh-M7X_c
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.

3 participants