[Magiclysm] What effect does RIng of Protection do?

“passive_effects”: [
{
“has”: “WORN”,
“condition”: “ALWAYS”,
“values”: [
{ “value”: “ARMOR_CUT”, “add”: -8 },
{ “value”: “ARMOR_BASH”, “add”: -8 },
{ “value”: “ARMOR_STAB”, “add”: -8 },
{ “value”: “ARMOR_BULLET”, “add”: -4 }

Does it mean decrease damage?

I was curious about this myself, as it didn’t seem all that self explanatory. Seems kinda vague other than ‘protection’

From looking at that code, I would expect that it adds a negative value to incoming damage. Need a code diver to confirm if this is the case.

Well, yes. As the description says:
A [MATERIAL] ring that [INTENSITY] reduces some of the force of damage you take when you wear it.
It does just that: It reduces the damage you take.

I have no idea good explanation why it was coded to take negative values for a positive effect, but it works as intended (tested):
On a naked character a monster with a fixed damage value, the character takes 4 damage each hit.
Wearing a ring of protection+2 (copper) reduces that damage to 1 each hit.
With a ring of protection+8 (platinum, the one you’ve pasted the code here), the character no longer takes any damage (“The [MONSTER] hits your [BODYPART], but your armor protects you.”)…

1 Like

because the values act upon the incoming damage

I mean, yeah, sure, I’ve figured that much.
Hovever, given that monsters have identical (uppercase aside) variable names with positive values assigned to them which prevent them from damage… it just seems a bit weird.
That’s why I’ve stated that I have no good explanation for why it’s coded that way for the player, but the other way around for the monsters.

well the idea is, if a monster does + damage to you, (say, bites you for 8 damage) then the ring does - damage to you, (removes 4)

oldschool RPG’s used to do that too, in that they’d show you ‘taking’ negative damage in order to heal yourself.

no not exactly -
the monster tries to do 8 damage to you. the ring subtracts 4 from that.
that’s the only reason it’s like that.

yeah i didnt mean that as in like, you take 8 damage and then immediately heal 4… just that its removing from that number before it actually affects your character. -4 being you take 4 less damage than you would otherwise have taken.

2 Likes

Again… I got that. I understand that. I understand how the math behind that and the code in itself works (see my tests and explanation above).

Now please try to understand what I am talking about:
Compare this to this.
I have no explanation why it’s one way for monsters and the other way for the player character. That’s all I’m saying. That’s all I’ve ever said.

And before someone says “it’s because the monster’s armor value gets turned negative in the code and then subtracted from the attack” - yes, sure it does, but why can’t it do it that way for the player’s character too?

It’s the inconsistency I have no good explanation for (aside from “an oversight”), not on “how it works”.

1 Like

i mean, realistically you’d have to take it up with the magiclysm mod author for his reasoning behind it

that’s just what i was replying to. an explanation. monsters don’t get enchantments, it’s different code.