Skip to content

feat(buffs): time bar and countdown on the buff strip, Increase Block's two parts (PR 3) - #1285

Merged
Mosch0512 merged 1 commit into
Mutizens:mainfrom
Mosch0512:feat/buff-strip
Dec 4, 2026
Merged

Mosch0512 merged 1 commit into
Mutizens:mainfrom
Mosch0512:feat/buff-strip

Conversation

@Mosch0512

Copy link
Copy Markdown
Collaborator

Buffs PR 3 (the strip), plus the client side of Increase Block's two sent parts (MUnique/OpenMU#1637).

What changes

  • Increase Block's master buffs (153, 154). OpenMU sends their increaseBlockBonus as two values: a flat AddFinal part and an AddRaw part its class rules multiply by the defense rate (fix(effects): send an effect's raw and final part of one attribute as two values MUnique/OpenMU#1637). The buff tooltip now adds every value sent for an attribute, and the new rawPartTimes in BuffAttributes.h multiplies the raw part by the hero's defense rate (new term defenseRatePvm). The character window and the tooltip show 52 + 0.44 x 600 = 316, where they showed 52. The master part passes the entry's maximum. The raw part is multiplied only when an AddFinal part of the attribute comes with it: OpenMU with feat(effects): the open source client gets the time left and the values of its effects MUnique/OpenMU#1476 but without fix(effects): send an effect's raw and final part of one attribute as two values MUnique/OpenMU#1637 (merged 2026-11-29) sends one combined AddRaw value (52.44), which is shown as it came (+52).
  • Skill 569 in MasterSkills.json raises increaseBlockBonus, as OpenMU has it since 588b08e71, and adds its percent of the defense rate; the skill tooltip shows Increase Block with its strengthener as 316. The stand-in attribute defenseRatePvmIncrease, its text and the empty power-ups of 153 and 154 are gone. The character window and the buff values share one function for the hero's defense rate (GetHeroDefenseRatePvm).
  • One icon per cast for the Rage Fighter's master party buffs. Casting the strengthened or mastery Increase Block, or the strengthened Increase Health, added the base buff (131, 130) next to the one the server sends (153, 154, 155), so one cast showed two icons until the next map change. The client now adds a buff only for the base skills, and the end of a master cast removes no base buff. The versions are the tiers of two new families in Buffs.json, increaseHealth (130, 155) and increaseBlock (131, 153, 154). The aura light, the MU Helper's recast check and the character window look for any buff of the family (GameLogic/Buffs/PartyBuffs.h, which looks the families up once per loaded buff table), without buff numbers in code, and the defense line shows as boosted under 153 and 154 too.
  • The time bar (buffs design B4, B5): a buff icon with a known time gets a bar as wide as the icon and 2 dp tall, inside the strip's row gap, so the rows keep their places: 1 dp under the icon in the legacy theme, right under the modern theme's 1 dp icon border. It empties with the time left, green for a buff and red for a debuff, and goes away when the time has run out (no empty bar while the buff waits for the server to end it). The colors are theme tokens (buff-bar, debuff-bar, buff-bar-empty in legacy and modern; classic inherits them).
  • The countdown (B6): under the player's limit the icon darkens a little (buff-countdown-shade, inside the border in the modern theme) and shows the whole seconds left. No blinking.
  • "Buff countdown" option (B14): a new row in the options window's Interface tab in the legacy and the modern theme, Off or 5 to 30 s, saved as [UI] BuffCountdownSeconds (10 by default, clamped to 0..30). A hand-edited value the row doesn't list shows the nearest lower choice, and 1 to 4 s shows as 5 s, not Off. Texts in all 12 languages.
  • showTime per buff in Buffs.json: false hides a buff's bar, countdown and tooltip time line even when the server sends its time. The shipped file shows it for 55 buffs: the 48 the Season 6 client kept a time for (InsertBuffLogicalEffect: seals, Jack O'Lantern, scrolls, elixirs, cherry blossoms, Expansion of Wizardry, Christmas, talismans, Gladiator's Honor, the party EXP bonus, the AG and SD auras), Expansion of Wizardry's master skill buffs (138, 139), which the strip shows in its place, and the item buffs with a duration it left out (104, 115 to 118). The other 103, skill buffs like Greater Defense among them, have "showTime": false. An admin who turns such a time on in OpenMU's Effect times page ships the same change in the players' Buffs.json; docs/buff-data.md says so.
  • The strip's model now changes only when a shown icon, bar percent or second does (coding rules, section 12); before, it was rebuilt and marked dirty every frame.
  • defenseRatePvm, the attribute Decrease Block sends, is a known attribute again.

Not in this PR

  • The hero's own computed cast times (design B2) are dropped: a bar shows when the server sends a time (item buffs without the extended packet fall back to their duration in Buffs.json) and the buff's showTime is true.
  • The client's defense rate leaves out two things OpenMU counts: a debuff that lowers it, under which Increase Block's master part shows a little more than the server counts (316 instead of 307 under one that takes 20), and the shield mastery master skills, with which it shows a little less. docs/buff-data.md says so.
  • A Buffs tool in MuEditor (with all on, all off and Season 6 defaults for showTime) comes later.

Testing

  • Full ctest -C Release (Windows, editor build, on main 129cfe7): 4764 of 4765 pass. The one failure is ci_build_plan, whose check that runs a PowerShell script fails on this machine; it passed in the run before, and this PR doesn't touch it.
  • New tests: test_buff_strip_time (bar percent, no bar at 0, countdown seconds, rounding, a uint32 of seconds, the config clamp, the option's choice for a hand-edited value, showTime on the strip and the tooltip); test_buffs (showTime reads, writes only false, rejects a non-boolean, the shipped 55; the two party buff families and their helpers); test_skill_buff_values (Increase Block's two parts in the tooltip and the character stats, 569 in the skill tooltip, the float multiplication 0.44f x 600 = 264, a single AddRaw value left as it is).
  • clang-format 21.1.8 clean on the changed lines.
  • In game against OpenMU master 526ced72f, as a level 400 Fist Master with 569, 572 and 573: before the fix, the strengthened Increase Block gave the buffs 131 and 153 (two icons), and after a map change only 153. With the fix, the mastery Increase Block and the strengthened Increase Health give 154 and 155, one icon each, also after a teleport, and the character window shows the defense and stamina lines as boosted.
  • The time bar and the countdown aren't checked in game yet; screenshots of them follow.

…'s two parts (PR 3)

Buffs PR 3 (the strip), plus the client side of Increase Block's two sent
parts (MUnique/OpenMU#1637).

- A buff icon with a known time gets a time bar under it (green for a buff,
  red for a debuff) and, in its last seconds, a shade with the whole seconds
  left. The new "Buff countdown" option ([UI] BuffCountdownSeconds, Off or 5
  to 30 s, 10 by default) sets the limit, in the legacy and modern themes,
  with texts in all 12 languages.
- showTime per buff in Buffs.json: the shipped file shows the time for the 48
  buffs the Season 6 client did, Expansion of Wizardry's master tiers and the
  item buffs with a duration it left out (55 in all).
- Increase Block's master buffs: the AddRaw part OpenMU multiplies by the
  defense rate (BuffAttribute::rawPartTimes) counts with the AddFinal part;
  the tooltip and the character window show 52 + 0.44 x 600 = 316. Skill 569
  raises increaseBlockBonus, as OpenMU has it.
- A master Increase Block or Increase Health cast shows only its own buff.
  The versions are the Buffs.json families increaseHealth and increaseBlock,
  which the aura light, the MU Helper and the character window look up.
- The strip's model changes only when a shown icon, bar or second does.
@Mosch0512
Mosch0512 merged commit 5128d18 into Mutizens:main Dec 4, 2026
7 checks passed
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.

1 participant