Robotic Parts

Robotic Parts

2M Downloads

Suggestion: More Threat Matrix Options

Hydraheads opened this issue · 9 comments

commented

The threat matrix could use more balancing options. It can be used with strange modded armor such as swiftness armor from vampirism which has a lot of defense, which players on my server believe to be kind of OP. Thus, I think there should be a way to configure the % chance of dodging with it, so I could for instance make it 70% or 60%.

commented

I also play a modpack that has this stuff and there is a giant meta where only that kind of armor is viable and anything else gets you insta killed, maybe a config option to choose what armor can be used as light and once again like he said change the %

commented

For the record, the dodge is already about 65% chance, as seen here: https://github.com/An-Sar/Cyberware/blob/1.12/src/main/java/flaxbeard/cyberware/common/lib/LibConstants.java#L28-L29
Having it higher would make cyberzombie unkillable for noob players (it's already fairly hard as is).

Vampirism's Armor of swiftness related source code is here: https://github.com/TeamLapen/Vampirism/blob/1.12/src/main/java/de/teamlapen/vampirism/items/ItemArmorOfSwiftness.java
From a quick check, only the Normal tier should be considered a light armor, while Enhanced and Ultimate tiers should classify as Heavy armor. However, the mod is reporting only Leather as a material so it's probably only seen as light armor, ever.

@AttackHelicoptorB18 'giant meta' doesn't speak to me, please be more specific.

Either way, we'll need more example of good/bad armors classification before fixing the current approach.

commented

All tiers of vampirism swiftness armor are indeed forcefully seen as light armor. But that isn't really the only issue. It's possible for pack devs to make upgraded armors with nbt on craftweaker recipes or other mods, and if the base armor piece inherits dodge then so do they.

Thus the problem seems to be, in my opinion, the focus on materials rather than defense points. If the mod saw the armor points the armor piece was giving is above a threshold, then it should cancel dodge. But that is not the only approach, simply having a config option to lower that dodge value would help prevent the issue in my opinion.

commented

Vampirism is using attributes to change armor and toughness. In addition to raw materials, there's also an interface that's badly prioritized in Cyberware for historical/bad reasons.
I didn't check how craftweaker changes armor stats.

commented

Craftweaker in itself does not, but it lets you add nbt to output recipes, so in other words also using attributes to change armor and toughness.

commented

Sorry for not commenting sooner but by giant meta I mean the entire server only uses the dodge mechanic and the swiftness armor and nothing other than that is viable so if you are a vampire and not a hunter you can’t use swiftness armor meaning that you will be beaten 100% of the time.

commented

@Hydraheads I need more details than that to investigate the root cause.

commented

Lets say I add this script to craftweaker

recipes.addShapeless(vampirism:vampire_cloak.withTag
({ench: [{lvl: 1, id: 0}], display: {Lore: ["Lvl 2"],
Name: "Cloak of Bloody Mist"}, AttributeModifiers:
[{UUIDMost: 586773, UUIDLeast: 586774, Amount: 1,
Slot: "chest", AttributeName: "generic.attackDamage",
Operation: 0, Name: "generic.attackDamage"},
{UUIDMost: 436328, UUIDLeast: 436329, Amount: 6,
Slot: "chest", AttributeName: "generic.armor",
Operation: 0, Name: "generic.armor"}
]}),
[vampirism:vampire_cloak,
vampirism:human_heart]);

This makes the armor have 6 defense points, but it still is threat matrix compatible due to inheriting the base vampirism:vampire_cloak's compatibility.

commented

Checking the material makes it easier to test against a single threshold: light armor is no more than 4 armor points on chestplate or equivalent. This doesn't work with the armor attributes which are overwriting material properties.
=> checking only material or item registry name doesn't work

Existing approach also completely ignores armor toughness.
Toughness is found on heavy armors (at least in Vanilla) and compensates the armor reduction when receiving high damages, as such we could keep on ignoring it for now.
=> keep ignoring toughness

Attributes are slow to get, so we would prefer to cache them. The game already does that through the entity's Armor attribute. The mod only check once per tick on the player for the HUD icon (client side), and when an entity is hurt while having Threat matrix or subdermal spikes.
=> armor class computation should prioritizes fast decisions.

To extend the existing approach, we need to scale for each parts. Due to integer rounding, we need to start from the strongest armor, namely diamond/netherite. Scaling diamond down to 4 armor points on chestplate, gives 1.5 / 4 / 3 / 1.5 for Helmet / Chestplate / Leggings / Boots or a total armor value of 10. We could round it down to 1 / 4 / 3 / 1 for a total armor value of 9. Gold is considered heavy armor with a total armor value of 11.
=> entity total armor higher than 10 should be considered heavy

Gold leggings have an armor of 3, so it would be considered light armor with the caps per part.
=> we still need the scaling on material to complement

If we only use the entity total armor, a player could still use diamond leggings with leather chestplate, which is incorrect in terms of the lore.
=> a cap is needed per armor piece

In conclusion, we need 3 conditions:

  • entity total armor is no more than 10 (5 full icons in the vanilla HUD)
  • each part material is no more than 4 armor on chestplate or equivalent (same as legacy)
  • each part attribute armor is no more than half diamond level