[ Question ] Mod integration /addon
HurtsAsHell opened this issue ยท 15 comments
I read what you wrote in md.
My question is, how can I create this addon / integration?
Is there a guide that I can follow?
do i just have to create integration for the basic tinker?
This is a fairly broad question that doesn't really have a good, concise answer. You would create this addon like any other mod, or any other integration if you're talking about adding support to an existing mod that you are developing. There's no guide, the only lead I can give you is to peruse the relevant folder for the classes and methods you might need. Of course I'll always be available if you have any questions, but you'll have to be much more specific before I can offer any solid help.
Base armor is just armor. Armor points. The attribute. The thing that shows up on the HUD. It's called base because armor points can be raised through modifiers.
Modifier means the modifier that will be multiplied by the durability. This is all very similar to the Tinkers' Construct parts of Head, Handle, and Extra.
Armor points.
like the Damage Reduction ?
And, if yes, it's the Damage Reduction of all pieces of armor or only of one piece?
Well, yes, but I don't want to call it damage reduction because that makes it sound like the points correlate to that one-to-one. It's defense points.
It's the defense points of all the armor pieces combined.
I'm trying to understand the code but I do not find where the armor item is created, could you help me? ( For example the copper armor trim )
because the TinkersArmor(EntityEquipmentSlot slotIn, PartMaterialType... requiredComponents)
call the super with a emptyMaterial and I am not understanding where it is created and i think the armor is created in ArmoryRegistry.registerAllArmorForging();
but it's the same thing
There's a difference between the armor item and the armor parts. It seems like you're referring to the armor item, which I don't think is what you want because you mentioned the copper armor trim. The armor items act as a basis from which the registered materials can construct themselves into new parts. So, you're looking at a TinkersArmor
but it doesn't mean much until a Copper
material uses it to construct the components.
So what you're likely to want to do is look at this part https://github.com/TheIllusiveC4/ConstructsArmory/blob/19d4c257a983478f98801777e2fa13ec962248f2/src/main/java/c4/conarm/lib/materials/ArmorMaterials.java#L104
where many of the materials are registered with armor stats. There's also traits registration a couple methods above that. These are the only really necessary parts, the system will take care of the rest (I might be forgetting a step or two, but I think that's how it goes).
Of course, this all assumes that you've registered a proper Material
with the Tinkers system. You'll have to look at base Tinkers' Construct to figure that out as I don't touch that at all in this mod.
Intagration done. The next step is to make custom traits ;
Thanks for helping us.
You can, but I'm not sure that you have to. It's been a while since I messed with this code and the registry we're talking about is from Tinkers' Construct. You'd have to figure that out on your own to be sure.
If I recall correctly, that happens when you don't register a trait for the armor parts. It will default back to the tools trait that was registered for them. I don't think you can remove it, although you might be able to figure out a workaround. The real solution is to just make sure you register a trait for all the armor parts.
Thanks, now i'm working on the traits and i will publish the new version of the mod when i finish the Armory Integration