Skip to content

[Highly Customized] Universal customize health bar#1635

Open
NetsuNegi wants to merge 13 commits into
Phobos-developers:developfrom
NetsuNegi:origin/feature/healthbar
Open

[Highly Customized] Universal customize health bar#1635
NetsuNegi wants to merge 13 commits into
Phobos-developers:developfrom
NetsuNegi:origin/feature/healthbar

Conversation

@NetsuNegi
Copy link
Copy Markdown
Contributor

@NetsuNegi NetsuNegi commented Apr 19, 2025

  • Now you can specify the type of Health Bar to customize its style.
  • 现在你可以指定血条的类型来改变其样式。
  • The same applies to Shield.
  • 这也同样适用于护盾。
  • It should also be easy to expand to other types of progress bars.
  • 它应当可以很容易地被用来作为其他进度条使用。

In rulesmd.ini

[AudioVisual]
DefaultHealthBar=                  ; healthbar, as default type for non-building technos
Buildings.DefaultHealthBar=        ; healthbar, as default type for buildings
DefaultShieldBar=                  ; healthbar, as default type for non-building technos
Buildings.DefaultShieldBar=        ; healthbar, as default type for buildings

Pips=16,17,18                      ; integer, frames of pips.shp (zero-based) for Green, Yellow, Red
Pips.Building=1,2,4                ; integer, frames of pips.shp (zero-based) for Green, Yellow, Red
Pips.Building.Empty=0              ; integer

[HealthBarTypes]
+=SOMEHEALTHBAR

[SOMETECHNO]
HealthBar=                         ; healthbar
ShieldBar=                         ; healthbar, priority over settings on the shield

[SOMESHIELD]
ShieldBar=                         ; healthbar

[SOMEHEALTHBAR]
Pips=                              ; integer, frames of pips.shp (zero-based) for Green, Yellow, Red
Pips.Building=                     ; integer, frames of pips.shp (zero-based) for Green, Yellow, Red
PipsEmpty=                         ; integer
PipsInterval=2,0                   ; integer, interval per two pips
PipsInterval.Building=-4,2         ; integer, interval per two pips
PipsLength=                        ; integer, default to 8 for infantry, 17 for others
PipsShape=pips.shp                 ; filename - including the .shp/.pcx extension
PipsPalette=palette.pal            ; filename - including the .pal extension

PipBrd=                            ; integer
PipBrdShape=                       ; filename - including the .shp extension
PipBrdPalette=palette.pal          ; filename - including the .pal extension
PipBrdXOffset=0                    ; integer

IsAnimated=false                   ; boolean
IsAnimated.Reverse=false           ; boolean
XOffset=0                          ; integer

healthbar

@NetsuNegi NetsuNegi added Needs testing ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable labels Apr 19, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 19, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Fryone
Copy link
Copy Markdown
Contributor

Fryone commented Apr 19, 2025

@Metadorius Metadorius added ❓New feature ⚙️T2 T2 maintainer review is sufficient and removed ⚙️T1 T1 maintainer review is sufficient labels Apr 19, 2025
@NetsuNegi NetsuNegi closed this Apr 19, 2025
@Otamaa
Copy link
Copy Markdown
Contributor

Otamaa commented Apr 20, 2025

uhh why is this closed ?
the code look more clean and easy to understand
please consider to reopen it .

@Metadorius
Copy link
Copy Markdown
Member

At the moment I am not really sure how to proceed, ideally I would like if @NetsuNegi and @Fryone cooperated on the same pull request and took the best parts of each, since you both seem to be interested in the feature.

@Coronia
Copy link
Copy Markdown
Contributor

Coronia commented May 6, 2026

reopen cuz there's no much progress on #1395, and this one is more suitable for a base due to its extendibility

@Coronia Coronia reopened this May 6, 2026
Coronia and others added 4 commits May 6, 2026 16:26
# Conflicts:
#	CREDITS.md
#	Phobos.vcxproj
#	docs/User-Interface.md
#	docs/Whats-New.md
#	src/Ext/Rules/Body.cpp
#	src/Ext/Rules/Body.h
#	src/Ext/Techno/Body.Visuals.cpp
#	src/Ext/Techno/Body.h
#	src/Ext/Techno/Hooks.Pips.cpp
#	src/Ext/TechnoType/Body.h
#	src/New/Entity/ShieldClass.cpp
#	src/New/Entity/ShieldClass.h
#	src/Phobos.Ext.cpp
@phoboscn-bot
Copy link
Copy Markdown

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/423/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs testing ❓New feature ⚙️T2 T2 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants