Distinct Damage Descriptions

Distinct Damage Descriptions

7.9k Downloads

[Q] Tetra Compat

mmmilord opened this issue ยท 4 comments

commented

Hey, so a mod I'm planning to use with yours in a modpack is the Tetra mod. For it's modular weapons, it uses NBT tags instead of creating a new item for every single combination. I wanted to know if your mod is compatible with that.

A tool can have a left or right "head". If it's possible, the calculation can be half of each head's values combined, e.g. say if "basic_axe/cobblestone" was defined as 0.7;0;0.3, and "basic_hammmer/iron" was 0;0;1 the tool's DD would end up as (0.35;0;0.15) + (0;0;0.5) = 0.35;0;0.65

If the tool only has one head that has it's DD defined, then it uses it's otherwise full value. e.g. "basic_axe/cobblestone" would just remain as 0.7;0;0.3.

2020-09-17_05 27 41
2020-09-17_05 27 26
2020-09-17_05 28 22

commented

Same could apply for the following:

  • Tinker's Construct and its addons (tool damage distributions)
  • Tinker's Armory and its addons (armor damage resistance distributions)
commented

Hey, so a mod I'm planning to use with yours in a modpack is the Tetra mod. For it's modular weapons, it uses NBT tags instead of creating a new item for every single combination. I wanted to know if your mod is compatible with that.

Out of the box, no. But this has been something I thought about for a bit, at least for Tinker's. No reason Tetra can't be made compatible too, but the compatibility may have to be done separately from Tinker's compatibility.

The best way to do this is to give the user complete control of the distribution.

A tool can have a left or right "head". If it's possible, the calculation can be half of each head's values combined

So basically, users would have to define a damage distribution for each head piece. So an axe head piece made of stone would have a different distribution than an axe head piece made of iron, for example. Then we combine these distributions and slap that onto the item.

For Tinker's, we should only consider head pieces for damage distribution (makes sense, avoid any complications). Some items, like the Mattock, have multiple head pieces. All head pieces' distributions should be combined, like with Tetra.

Construct's Armory might be trickier. It may be best to define resistances for each material, then define what percentage of that distribution is used for each armor piece. For example, Cores could use only 85% of their distribution, Plates could use 10%, and the remaining 5% comes from the Trim. Combine that together, and that's the armor's distribution. The armor piece weight would be defined in the configs, so users can fine tune each piece's influence. This seems like a good idea, but I'm open to others.

I know Tinker's has a (hopefully useful and accessible) API that should make working with Tinker's items a snap, but does Tetra have any kind of API available for addons/compatibility? Should be possible with or without, but it might be easier with it. A link to their GitHub repository (Or whatever they use) would save me the search.

Anything else about Tetra I should know?

I'll work on this after DDD 1.0.1-beta.

commented

The source code for the 1.12 version of the Tetra mod is located at https://github.com/mickelus/tetra/tree/1.12. Note that this branch has not been updated since 23 October 2019, meaning that first-party support for that version is likely no longer available.

commented

I kind of suspected that there'd be no more support for 1.12 versions. Doesn't seem like there's much of an API to work with either. I'm still willing to do support for Tetra, although I'll probably focus on support for Tinker's first, then do Tetra after.