Skip to content

Faking Digital Display of Health #1418

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

Merged
merged 7 commits into from
Jun 13, 2025

Conversation

Coronia
Copy link
Contributor

@Coronia Coronia commented Nov 7, 2024

  • DigitalDisplay.Health.FakeAtDisguise, if set to true on an InfantryType with Disguise, will use the disguised TechnoType's Strength value as the maximum value of health display. The current value will be displayed as the percentage of its current health multiplies the new maximum value.

In rulesmd.ini:

[SOMETECHNOTYPE]
DigitalDisplay.Health.FakeAtDisguise=true      ; boolean

Copy link

github-actions bot commented Nov 7, 2024

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.

Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

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

Code looks mostly good, can be simplified though IMO.

@Metadorius Metadorius self-assigned this Nov 11, 2024
# Conflicts:
#	docs/Whats-New.md
#	src/Ext/TechnoType/Body.cpp
#	src/Ext/TechnoType/Body.h
@Coronia
Copy link
Contributor Author

Coronia commented Feb 13, 2025

there's another usage for DigitalDisplay.Health.FakeStrength now: when something has a lot of strength, like 9999999, you may want it to not show that many digits. This tag could scale down the number to a lower value. Ofc you can also do it by making a new techno and use DigitalDisplay.Health.FakeAtDisguise but that's way more complex

regardlessly, it's not bad to give a direct way to set this value since there'll always be cases that you want digital display to show something else from a given value, not to mention that only infantry can disguise as another so far

# Conflicts:
#	CREDITS.md
#	src/Ext/TechnoType/Body.cpp
#	src/Ext/TechnoType/Body.h
@Metadorius
Copy link
Member

there's another usage for DigitalDisplay.Health.FakeStrength now: when something has a lot of strength, like 9999999, you may want it to not show that many digits. This tag could scale down the number to a lower value. Ofc you can also do it by making a new techno and use DigitalDisplay.Health.FakeAtDisguise but that's way more complex

I think that's better to be handled using a display coefficient, like when people use big numbers like 1 500 000 HP instead of 1 500 HP on everything just to have more precision on game's calculations, no?

# Conflicts:
#	CREDITS.md
#	docs/User-Interface.md
#	docs/Whats-New.md
#	src/Ext/TechnoType/Body.h
@TaranDahl TaranDahl added ❓New feature ⚙️T1 T1 maintainer review is sufficient labels May 27, 2025
# Conflicts:
#	CREDITS.md
#	docs/User-Interface.md
#	docs/Whats-New.md
#	src/Ext/Techno/Body.h
#	src/Ext/TechnoType/Body.cpp
#	src/Ext/TechnoType/Body.h
@Coronia Coronia added the Tested label Jun 13, 2025
@Coronia
Copy link
Contributor Author

Coronia commented Jun 13, 2025

I can agree that coefficient on display type is a better approach than setting a fake value on techno type, also ValueScaleDivisor has been introduced already. Hence, I would only keep DigitalDisplay.Health.FakeAtDisguise since this is a special case, and remove the other tags

@Coronia Coronia requested a review from Metadorius June 13, 2025 09:27
@Metadorius Metadorius merged commit fea4401 into Phobos-developers:develop Jun 13, 2025
7 checks passed
DeathFishAtEase added a commit to DeathFishAtEase/Phobos that referenced this pull request Jun 15, 2025
Phobos-developers#1418
DigitalDisplay.Health.FakeAtDisguise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓New feature ⚙️T1 T1 maintainer review is sufficient Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants