promotional bannermobile promotional banner
header
logo

Apothic Attributes (AttributesLib)

Install

Description

Apothic Attributes is a library mod that provides a variety of attributes and attribute-related utilities, which makes interacting with, debugging, and using attributes much easier. The current list of Attributes is available here.  Most of the features are developer-facing, but there are a few user-facing components:

The Attributes GUI

Apothic Attributes provides an Attributes GUI, accessible via the sword button in your inventory.  This GUI shows all attributes that are attached to your player.  You can filter the displayed attributes to only show modified attributes, and hovering an attribute will show a description and detailed information.

Attributes GUI

Armor Calculations

To support the addition of Armor Pierce, Armor Shred, Protection Pierce, and Protection Shred, Apothic Attributes changes the way that damage reduction calculations are done, for both Armor and Protection.

In vanilla, armor reduces damage based on your armor toughness value and the incoming damage value. With Apothic Attributes, only armor reduces incoming damage, and armor toughness reduces the effectiveness of enemy Armor Shred and Armor Pierce. For specifics on damage formulas, see here.

The changes in damage taken as a result of this can be seen in the following chart, where "New Apoth" is the formula currently used by Apothic Attributes. This chart does not take protection calculations into account. The changes to protection can are described here.


Potion Tooltips

Another player-facing feature is the changes to potion tooltips. Descriptions will be added to potion items that are not simple attribute modifiers, and these descriptions (as well as the attribute modifiers) will be shown when hovering your active effects in the inventory.

Attribute Formatting

Apothic Attributes allows attributes to format their own tooltips. The most notable example of attributes with custom formatting are Percent-Based Attributes, which always display their values in percentage form, regardless of their modifier type.  The vanilla attributes Speed and Knockback Resistance are displayed in Percent-Based mode.

Part of this feature is the additional tooltip information. When advanced tooltips (f3+h) are enabled, additional information about the modifier type and the underlying value will be shown.

Advanced Tooltip Info Reference

Addition modifiers will show text similar to [+100]

Multiply Base modifiers will show text similar to [+20x]

Multiply Total modifiers will show text similar to [x10]

Note that Multiply Total values have their underlying value offset by +1, even in the advanced tooltip display. This is due to how they are applied (A multiply total modifier causes the final value to be multiplied by 1+value).

Developing

Apothic Attributes depends on Placebo, and is available via maven:

maven {
    // Shadows_of_Fire's Maven
    url "https://maven.shadowsoffire.dev/releases"
}

dependencies {
    implementation fg.deobf("dev.shadowsoffire:Placebo:${mcVersion}-${placeboVersion}")
    implementation fg.deobf("dev.shadowsoffire:ApothicAttributes:${mcVersion}-${attributesLibVersion}")
}

 

The API package of Apothic Attributes contains everything you should need to interface with from the mod.

Contact

Discord: https://discord.shadowsoffire.dev/landing