-
-
Notifications
You must be signed in to change notification settings - Fork 124
Improve Damage Number Display Configuration and Readability #1999
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
base: develop
Are you sure you want to change the base?
Conversation
|
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. |
|
Keep the DebugKeysEnabled tag under GlobalControls too, with a priority. |
Coronia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to draw 2 texts I think, DrawText function allow you to choose a TextPrintType other than NoShadow, so you could try with other options for a text with shadow (search TextPrintType in Phobos to see how it's been defined and used). Drawing 2 texts would be a bit perf costy considering this will be displayed frequently
Also this shouldn't overwrite the existing DebugKeyEnable function. It should be done in a way that DebugKeyEnable can still enable or disable it, but would be overwritten by DisplayDamageNumbers
Jump positioning issue with duplicate headings (anchor)
If `DamageNumbersEnabled` is not specified, its value defaults to the value of `DebugKeysEnabled`.
Thanks for the suggestion! And now, 感谢您的建议! 另外,修改了 注: |
actually, idk there has any thing different either use |
other options about shadow is same |

Description
This PR improves the Display Damage Numbers feature in the following aspects:
1. Independent Configuration Toggle
The feature depends on:
If
DamageNumbersEnabledis not specified, its value defaults to the value ofDebugKeysEnabled.The initial state of the feature (enabled or disabled when entering a game) is controlled by a dedicated setting in
ra2md.ini:2. Sign Display Adjustment
Damage number formatting has been updated:
Damage taken now displays as a negative value with “-” prefix
-35Healing now displays as a positive value with “+” prefix
+50This change avoids visual ambiguity when multiple numbers appear close together — for example:
50 50could previously be misread as5050.3. Suppress damage number display for individual warheads
Introduces a new optional flag for WarheadType, allowing modders to suppress the display of damage numbers on a per-warhead basis.
By setting
HiddenDamageNumbers=trueon a warhead, any damage dealt by that warhead will not generate floating damage numbers, regardless of the global or player-enabled settings.本次改动对“显示伤害数字(Display Damage Numbers)”功能进行了优化与完善,主要包含以下三点:
1. 独立配置开关
“显示伤害数字”功能依赖
rulesmd.ini -> [GlobalControls] -> DamageNumbersEnabled = true才可使用。若未指定
DamageNumbersEnabled的值,则其默认值与DebugKeysEnabled相同。该功能在游戏开始时的默认状态由
ra2md.ini的 Phobos 配置决定:2. 数字正负号规则调整
调整伤害数值的显示逻辑:
受伤:显示负数(前缀“-”)
-35治疗:显示正数(前缀“+”)
+50此改动可有效避免多个数字紧密排列时被误认成单一数值的情况,例如:
50 50容易被视觉上误读为5050。3. 在弹头上禁用伤害数字显示
为WarheadType引入了一个新的可选标志,允许为每个弹头单独设置是否显示损伤数字。
通过在弹头上设置“HiddenDamageNumbers=true”,该弹头所造成的任何伤害将不会产生浮动伤害数字,无论全局或玩家启用设置如何。