Visual Customization
This guide explains how to customize the visual appearance of the dialogue HUD.
π¨ Overviewβ
The standalone rendering system lets you customize:
- Backgrounds: interface backgrounds (dialogue, answers, NPC name)
- Avatars: NPC images
- Layout: X/Y positions of each element
- Scale: size of visual elements
π Folder Structureβ
plugins/KGInfoServs-BQBetterHud/
βββ avatars/ # NPC avatars (PNG)
βββ backgrounds/ # Interface backgrounds (PNG)
βββ fonts/ # Custom fonts (TTF)
βββ resourcepack/ # Generated pack (folder mode)
πΌοΈ Backgrounds (interface backgrounds)β
Available Filesβ
Backgrounds are global (not tied to a specific NPC):
| File | Use | Recommended dimensions |
|---|---|---|
dialogue.png | Dialogue box background | Variable |
answer.png | Answer area background | Variable |
hand.png | Selection indicator (hand) | 8x8 pixels |
name_start.png | Start of the NPC name background | Variable |
name_mid.png | Middle of the NPC name background | Variable |
name_end.png | End of the NPC name background | Variable |
Customization processβ
- Create your PNGs with the desired dimensions
- Place the files in
plugins/KGInfoServs-BQBetterHud/backgrounds/ - Reload with
/bqhud reload - Test in-game
The files name_start.png, name_mid.png, and name_end.png form a "9-slice" system to adapt the background width to the NPC's name.
Example: Dark themeβ
To create a custom dark theme:
# Structure of your files
backgrounds/
βββ dialogue.png # Semi-transparent black background
βββ answer.png # Dark gray background
βββ hand.png # White hand for contrast
βββ name_start.png # Black left border
βββ name_mid.png # Repeatable black background
βββ name_end.png # Black right border
After adding them:
/bqhud reload
foldermode: after/bqhud reload, you must rebuild and republish your server resource packself-hostmode: after/bqhud reload, the pack is automatically regenerated and sent back to players
π NPC Avatarsβ
See the Avatars and Backgrounds page for the avatar system.
π Layout: Positioning elementsβ
Coordinate systemβ
The HUD uses a coordinate system in pixels:
- Origin (0, 0): reference point of the BossBar
- Positive X: to the right
- Negative X: to the left
- Positive Y: upward
- Negative Y: downward
Global offsetsβ
Before positioning individual elements, you can move the entire HUD:
standalone:
x-offset: 0 # Moves everything horizontally
y-offset: -200 # Moves everything vertically
Examples:
x-offset: 50β HUD shifted 50 pixels to the righty-offset: -250β HUD lower on the screeny-offset: -150β HUD higher on the screen
Configurable elementsβ
Interface backgroundsβ
standalone:
layout:
dialogue-bg:
x: 0
y: 20
scale: 1.0 # Size (1.0 = 100%, 1.5 = 150%)
answer-bg:
x: 180
y: -30
scale: 1.0
name-bg:
x: 0
y: 14
Text and NPC nameβ
standalone:
layout:
# NPC name (with options)
npc-name:
x: 10
y: 19
# NPC name (no options, "spoken")
npc-name-spoken:
x: 6
y: 23
# Dialogue text (with options)
dialogue-text:
x: 10
y: 32
split-width: 166 # Width before line wrap
# Dialogue text (no options, "spoken")
dialogue-text-spoken:
x: 10
y: 36
# Text height
text-height: 8
Answer optionsβ
Two modes available: scroll and fixed
Scroll mode (scrolling list):
standalone:
layout:
options-scroll:
x: 226
y: -25
line-height: 14 # Spacing between lines
Fixed mode (fixed list with indicator):
standalone:
layout:
options-fixed:
x: 190
y: -25
line-height: 8
split-width: 160 # Max width before line wrap
hand: # Selection indicator
x: 175
y: -26
spacing: 8 # Vertical spacing between hands
NPC Avatarβ
standalone:
layout:
avatar:
x: -20
y: 0
scale: 0.75 # Avatar size (0.5 = 50%, 1.0 = 100%)
Custom layout examplesβ
Centered layoutβ
standalone:
x-offset: 0
y-offset: -180
layout:
dialogue-bg:
x: 0
y: 20
scale: 1.2
dialogue-text:
x: 15
y: 35
split-width: 180
avatar:
x: -25
y: 5
scale: 1.0
Layout shifted to the rightβ
standalone:
x-offset: 100
y-offset: -200
layout:
dialogue-bg:
x: 0
y: 20
scale: 1.0
answer-bg:
x: 200
y: -30
scale: 1.0
Compact layout (small screen)β
standalone:
x-offset: 0
y-offset: -220
layout:
dialogue-bg:
x: 0
y: 15
scale: 0.8
dialogue-text:
x: 8
y: 25
split-width: 140
avatar:
x: -15
y: 0
scale: 0.6
π¨ Text alignmentβ
You can choose the alignment for each section:
standalone:
text-alignment:
dialogue: center # left, center, right
speaker: left # NPC name
options: left # Answer options
Usage examples:
dialogue: centerβ Centered text for a cinematic styledialogue: leftβ Left-aligned text for a classic styleoptions: rightβ Right-aligned options
π§ Customization workflowβ
Step 1: Prepare your assetsβ
- Create your PNGs in an image editor (GIMP, Photoshop, Paint.NET)
- Use transparency (alpha channel) for empty areas
- Follow the recommended dimensions
Step 2: Test locallyβ
- Place your files in the appropriate folders
- Run
/bqhud reload - Test with a BetonQuest dialogue in-game
- Adjust the positions in
config.yml
Step 3: Iterationβ
Repeat until you get the desired result:
# 1. Edit config.yml
# 2. Reload
/bqhud reload
# 3. Test in-game
# 4. Adjust and repeat
Step 4: Deploymentβ
Folder mode:
- The
plugins/KGInfoServs-BQBetterHud/resourcepackfolder contains the generated assets - Integrate this content into your server resource pack
- Rebuild and redistribute your pack
Self-host mode:
- The pack is automatically regenerated
- Players receive the update on reconnection
π Scale summary tableβ
| Element | Config key | Default scale | Effect of scale |
|---|---|---|---|
| Dialogue background | dialogue-bg.scale | 1.0 | Enlarges/shrinks the background |
| Answer background | answer-bg.scale | 1.0 | Enlarges/shrinks the background |
| NPC avatar | avatar.scale | 0.75 | Enlarges/shrinks the avatar |
Recommended values:
0.5: Very small (50%)0.75: Small (75%)1.0: Normal (100%)1.25: Large (125%)1.5: Very large (150%)
π Performance tipsβ
PNG optimizationβ
For better performance:
- Compress your PNGs with tools like TinyPNG or pngquant
- Use reasonable dimensions (max 512x512 for backgrounds)
- Avoid oversized images that bloat the resource pack
Resource pack sizeβ
The plugin generates an optimized pack:
- Automatic ZIP compression
- No unnecessary files
- SHA-1 cache to avoid redownloads
β Frequently asked questionsβ
The layout does not apply after /bqhud reloadβ
Solution:
- Check the YAML syntax in
config.yml - Look at the server logs to detect errors
- In
foldermode, you must rebuild your server pack
Backgrounds are not displayedβ
Possible causes:
- PNG files misnamed (respect the exact case)
- Corrupted files or invalid format
- Resource pack not loaded by the client
Solution:
/bqhud reload
# Check the logs to see if the backgrounds are detected
How do I revert to the default layout?β
Remove your changes in config.yml and restore the default values, then:
/bqhud reload