[Suggestion] New Attributes and grouped Attributes
Raptorrotas opened this issue ยท 2 comments
Copied from the Apotheosis discord:
Hello. Ive been thinking about some attributes to add to apothic attributes and think it'd be neat if we had them in your great mod!
I'm pretty sure the first few are definitely for apothic attributes, but it seems more likely to be seen here.
Basic arpg attributes:
- x life per second (basic health regeneration)
- x chance to block (reduces received attack damage by y% of the block value; I think a passive damage reduction shouldnt be as strong as the active blocking with the equipped shield)
- x block value (I think vanilla minecraft devs are playing with the idea of block values for shields in their combat tests, and some mods already do; might be useful to plan ahead for the future)
Energy Shield mechanic like in PoE:
- x maximum energy shield
- x modified energy shield recharge rate ( poe regnerates 20% max shield per second as base value)
- modified shield recharge delay ( delay in seconds after taking damage before the shield starts recharging)
(While vanilla minecraft has absorbtion, theres no set value that makes x amount of absorbtion recharge to a max "shield" value.)
Minecraft specific:
- x max hunger/saturation
- x% modified exhaustion rate (modified exhaustion cost per action)
- x oxygen (the vanilla timer before drowning)
(i think many people wouldnt want those as affixes, but it'd be neat for modpacks to expose those values to mods like skilltrees etc)
Main Attributes, or grouped Attributes (cant think of a better name)
Would it be possible to make a datapack driven framework for certain "main attributes" to affect multiple attributes? For example a +1 in "Strength" giving 1% attack damage and 0.1 armor. This is mainly inspired by diablo3 and PathofExile.
I imagine such being useful for mod compatibility, especially for multiple mods adding the same attribute multiple times, spellpower, mana and such come to mind. It probably could work similiar to the affix system for users, but i sadly have no idea of coding. Below a mockup for the user datapack:
data/apotheosis/groupedattributes/strength.json
{
"type": "apotheosis:attribute",
"attribute": "minecraft:generic.attack.damage",
"operation": "multiply_total",
"values": 0.01,
},
{
"type": "apotheosis:attribute",
"attribute": "minecraft:generic.armor",
"operation": "addition",
"values": 0.1,
},
}
I am unsure if Minecraft's attribute framework really supports chaining/rewriting attributes to manipulate other attributes like that. Affixes have the capability to provide multiple attributes at once, and you could define an affix whose description is +1 Strength that supplies +1 armor and +1 attack damage, but trying to bind attributes to that framework sounds hacky at best. I might look into it more at some point.
I wouldnt expect normal minecraft to handle it.
If you're interested, there's actually a framework mod for fabric that adds such chained attributes. Although I don't know if looking at fabric code would be helpful for Neoforge modding. As far I know theres no forge version and the connector didnt work for me, maybe I did something wrong tho.
https://www.curseforge.com/minecraft/mc-mods/data-attributes-directors-cut
and it even has a small wiki: https://clevernucleus.github.io/dataattributes-1.18.2_attribute_functions.html