Skip to content

Tooltips

Ready-made advanced description lines for the ability screen, built on the base mod's AbilityStat.

Explosion stats: ToolTipHelper

.addAdvancedDescriptionLine(ToolTipHelper.getExplosionTooltips(power, size, damage))

Adds an "Explosion" heading followed by power, size and damage lines. Each line is skipped when its value is 0 or less.

The damage shown is the number you pass

An AbilityExplosion with setStaticDamage deals its value without the x0.4 factor, so pass the real value here, not a scaled one. See Damage.

Zone stats: AwakenTooltipHelper

.addAdvancedDescriptionLine(AbilityDescriptionLine.NEW_LINE,
        AwakenTooltipHelper.getZoneRadiusTooltip(MAX_ZONE_SIZE),
        AwakenTooltipHelper.getEffectTickTooltip(EFFECTS_TICK_INTERVAL))
Method Shows
getZoneRadiusTooltip(maxRadius) the largest radius the zone reaches, in blocks; since 6.1.0, at the size of the body reading it (a giant sees the 128 a written 64 becomes), a man's line untouched
getEffectTickTooltip(ticks) how often the zone applies its effect, in seconds

Both lines are skipped for a value of 0 or less.

Library translation keys: AkumaI18n

The translation keys the library's own base classes and tooltip helpers use:

Constant Used by
ABILITY_DESCRIPTION_STAT_NAME_EXPLOSION, _SIZE, _POWER ToolTipHelper
ABILITY_DESCRIPTION_STAT_NAME_ZONE_RADIUS, _EFFECT_PULSE AwakenTooltipHelper
MESSAGE_GROUND_ONLY ensureOnGroundOrNotify, when a ground-only technique is used in mid-air
MESSAGE_MISSING_MATERIALS CraftingAbility's default message, when the materials are missing

The library ships their English text. Keys for your own fruits and abilities belong in your addon's lang file.

A key missing from the lang file shows raw

Registering a name supplies a default, but the client renders from the lang file: a key with no entry appears as the raw key in the tooltip, and nothing fails at build time.

Damage source metadata the icons cannot show: AkumaSourceTooltip

Since 2.9.0. The base mod shows an ability's haki nature, source types and element (setSourceHakiNature, setSourceType, setSourceElement on the builder) as a row of small icons after its name, and nothing else. A value with no texture is not drawn: the elements SLIME, RUBBER, RUST, GRAVITY and the type INDIRECT (and AIR before 2.11.0, which now has its icon: see Fixes to the base mod). They still change the fight, so say it in words:

.addAdvancedDescriptionLine(AbilityDescriptionLine.NEW_LINE,
        CooldownComponent.getTooltip(COOLDOWN),
        DealDamageComponent.getTooltip(DAMAGE),
        AkumaSourceTooltip.iconless(),                  // "Source Indirect", read from the core
        AkumaSourceTooltip.pierces(true, true))         // "Pierces Armour, Logia"
Method Shows
iconless() the core's icon-less element and types, read when the tooltip is drawn; skipped when every value has an icon
pierces(armour, logia) flags applied at hit time (addGlobalPiercing, bypassLogia), which the metadata cannot carry
describe(core) the iconless() text for a core, or null

SourceType.LOGIA_BYPASS is read nowhere in the base mod and has no icon: declare the hit-time bypassLogia() and show it with pierces(false, true).