
Mods / Attributer
Category:
#Tweak
#Utility
Author: Yew
Side: Both
Created: Sep 21st 2022 at 3:57 AM
Last modified: Sep 24th 2022 at 5:53 PM
Downloads: 1879
Follow Unfollow 23
Author: Yew
Side: Both
Created: Sep 21st 2022 at 3:57 AM
Last modified: Sep 24th 2022 at 5:53 PM
Downloads: 1879
Follow Unfollow 23
Latest file for Various v1.17.x:
attributer-1.0.3.zip
1-click install
A multi-class patch that makes lets you set attributes per item dynamically.
Basically wherever the code says "get parent object attribute" it instead "get object attribute if exists first".
Also adds a few new attributes that can be applied to items to modify their functionality.
Requirements:
- None.
Incompatibilities:
- Dunno yet, report some.
Mods requiring this:
New Attributes:
- maxdurability.
Supported Attributes:
- defaultProtLoss
- protectionModifiers
- protectionTier
- highDamageTierResistant
- flatDamageReduction
- relativeProtection
- statModifiers
- healingeffectiveness
- hungerrate
- rangedWeaponsAcc
- rangedWeaponsSpeed
- walkSpeed
- damage
- attackpower
- attackrange
- miningspeed
- miningtier
- health
- clothescategory
- breakChanceOnImpact
- requiresAnvilTier
- workableTemperature
- Please note, some attributes are enabled by the api by default and do not need this mod.
- Search the official API and official survival mod github repositorys to check.
Attribute Exceptions:
- perTierFlatDamageReductionLoss
- perTierRelativeProtectionLoss
These aren't mirrored as other attributes are, as arrays aren't supported by the API.
Instead, they should be TreeAttributes, with the float values of "0" and "1" placed into them.
This is a workaround until the API updates.
How to use (For developers):
- Set an attribute on an item.
- Example (Set an items attack power):
- itemstack.Attributes.SetFloat("attackpower", 12f);
- itemstack.Attributes.SetFloat("attackpower", 12f);
- Example (Set an items flat damage reduction):
- itemstack.Attributes.GetTreeAttribute("protectionModifiers").SetFloat("flatDamageReduction", 8f);
- itemstack.Attributes.GetTreeAttribute("protectionModifiers").SetFloat("flatDamageReduction", 8f);
- Example (Set an items attack power):
- That's it. It should work if the attribute is supported.
Please note you must mirror attributes exactly, including trees, to how the parent item is.
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.0.3 | 1462 | Sep 24th 2022 at 5:53 PM | Show | attributer-1.0.3.zip | Install now | |
v1.0.2 | 114 | Sep 23rd 2022 at 11:47 PM | Show | attributer-1.0.2.zip | Install now | |
v1.0.1 | 172 | Sep 22nd 2022 at 5:31 PM | Show | attributer-1.0.1.zip | Install now | |
v1.0.0 | 131 | Sep 22nd 2022 at 5:19 AM | Show | attributer-1.0.0.zip | Install now |
Crashing with the lastest update, along with the RPG Item Rarity. Any plans to update?
Will we see an update soon?
In case anyone is wondering - no, the current version (1.0.3) does not work with 1.18. The server thread freezes as soon as the game tries to apply damage from a creature to the player.
Can it be used to change transformations? E.g. groundStorageTransform