Shadows-of-Fire / Apotheosis

All things that should have been.
Other
177 stars 128 forks source link

[Suggestion] New Attributes and grouped Attributes #1253

Open Raptorrotas opened 5 months ago

Raptorrotas commented 5 months ago

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:

Energy Shield mechanic like in PoE:

Minecraft specific:

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,
        },
}
Shadows-of-Fire commented 4 months ago

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.

Raptorrotas commented 4 months ago

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