Skip to content

Add War Thunder-style equipment damage panel with top-down model#2

Closed
dldev32 wants to merge 2 commits into
masterfrom
claude/equipment-damage-panel-hO4SA
Closed

Add War Thunder-style equipment damage panel with top-down model#2
dldev32 wants to merge 2 commits into
masterfrom
claude/equipment-damage-panel-hO4SA

Conversation

@dldev32
Copy link
Copy Markdown
Owner

@dldev32 dldev32 commented Mar 25, 2026

Summary

  • War Thunder-style damage indicator panel overlay in the bottom-left corner while riding vehicles
  • Top-down 3D model of vehicle with all attached parts rendered at their in-game positions
  • White 2px outline around the model silhouette; interior fills with semi-transparent damage color as health decreases
  • Texture-based part type icons (engine, tracks, turret, gun, fuel, propeller) at the top of the panel — white by default, turn red when the part reaches 0 HP
  • Damage color gradient: green → yellow → orange → red based on health thresholds (75%/50%/25%)

New Files

  • GUIComponentVehicleDamageModel - Renders vehicle + all parts from top-down with 3-pass outline technique (enlarged white silhouette → dark background mask → translucent damage fill)
  • GUIComponentIconCutout - Extension of GUIComponentCutout with color tinting support for damage state icons
  • damage_panel.png - 256x256 texture with dark panel background, 6 white part type icons, and solid white pixel block for color tinting

Modified Files

  • GUIEquipmentDamagePanel - Rewritten to use texture-based icons and combined vehicle+parts model rendering
  • PartSeat.java - Opens and closes the damage panel alongside the existing GUIHUD

Removed Files

  • GUIComponentDamageBar - Replaced by model-based damage visualization
  • GUIComponentDamageRect - No longer needed

Test plan

  • Mount a vehicle as controller and verify the damage panel appears in the bottom-left
  • Verify the top-down model renders the vehicle hull and all attached parts at correct positions
  • Verify the white outline is visible around the model silhouette (~2px)
  • Deal damage and verify the interior fills with semi-transparent color (green → yellow → orange → red)
  • Destroy individual parts and verify corresponding icons turn red
  • Dismount and verify the panel closes
  • Test in both first-person and third-person camera modes
  • Test with HUD visibility settings (toggling HUD off should hide the panel)

https://claude.ai/code/session_011MwQM8URLX4upEQmL2KtgE

Implements a damage indicator panel that appears in the bottom-left corner
of the screen while riding a vehicle. Shows:
- Semi-transparent dark background panel
- Vehicle name as title
- Isometric 3D model preview of the vehicle
- Hull health bar with color-coded damage state
- Individual part health bars (engines, wheels/tracks, guns, propellers)

Health bars use a green->yellow->orange->red color gradient based on
damage percentage (>75% green, >50% yellow, >25% orange, <=25% red).

New files:
- GUIEquipmentDamagePanel: Main panel overlay GUI
- GUIComponentDamageBar: Colored health bar component
- GUIComponentDamageRect: Simple colored rectangle component
- damage_panel.png: Texture with white pixel block for color tinting

https://claude.ai/code/session_011MwQM8URLX4upEQmL2KtgE
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c20322426

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +93 to +95
for (APart part : vehicle.allParts) {
String partName = getPartDisplayName(part);
if (partName != null && part.definition.general.health > 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude fake parts from damage panel entries

Filter out synthetic parts when building partEntries. This loop walks vehicle.allParts, which includes helper parts like PartGroundDeviceFake (added in PartGroundDevice.addPartsPostAddition), so long wheels/tracks can appear as duplicate rows in the panel. Those fake rows are implementation details rather than real equipment and can report different damage state than the visible part, which makes the panel misleading for players.

Useful? React with 👍 / 👎.

Replace health bars with War Thunder-style damage visualization:
- Add GUIComponentVehicleDamageModel for top-down vehicle+parts rendering
  with 3-pass outline technique (enlarged white → dark mask → translucent fill)
- Add GUIComponentIconCutout for color-tintable texture icon cutouts
- Rewrite GUIEquipmentDamagePanel to use texture-based icons (white→red on
  destruction) and combined vehicle+parts model with damage color fill
- Update damage_panel.png texture with white part icons and solid pixel block
- Remove unused GUIComponentDamageBar and GUIComponentDamageRect

https://claude.ai/code/session_011MwQM8URLX4upEQmL2KtgE
@dldev32 dldev32 changed the title Add War Thunder-style equipment damage panel Add War Thunder-style equipment damage panel with top-down model Mar 25, 2026
@dldev32 dldev32 closed this Mar 27, 2026
@dldev32 dldev32 deleted the claude/equipment-damage-panel-hO4SA branch March 27, 2026 09:23
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.

2 participants