PDA

View Full Version : DR - Damage Resistance coding



Bloodright
December 6th, 2019, 02:28
Hi everyone,

This used to work, lately I have been unable to get DR coding to work in Starfinder. tried to get the coding to work for Tiefling racial resistances, and mechanic's drone. neither are working when they did months ago. any info would be appreciated.

edit, sorry, title should have been Damage Reduction.

HoloGnome
December 6th, 2019, 02:36
Yeah - I noticed some issues with energy resistance and maybe types. But, the base DR:x effect seemed to work.

Quick test of DR shows that it only works vs. kinetic attacks (B,S,P) and does not work if you try to specify a DR type. It has to be just straight DR:x. I'm sure they're still working on it.

Bloodright
December 6th, 2019, 02:37
Yeah - I noticed some issues with energy resistance and maybe types. But, the base DR:x effect seemed to work.

couldn't even get that to work.. might have been a space in a spot there shouldn't be one.

deer_buster
December 6th, 2019, 02:38
Hi everyone,

This used to work, lately I have been unable to get DR coding to work in Starfinder. tried to get the coding to work for Tiefling racial resistances, and mechanic's drone. neither are working when they did months ago. any info would be appreciated.

edit, sorry, title should have been Damage Reduction.

Can you provide a detailed example of how to reproduce the problem?

HoloGnome
December 6th, 2019, 02:45
It doesn't work vs. energy attacks. So, you put a DR:2 effect on a PC in the CT, then hit with an E attack and it goes through. If you put DR:2 B in the effect and hit with a bludgeoning attack, it goes through. And, from my other testing, I don't think it recognizes all the other damage type modifiers (and RESIST:x type) wasn't working.

But...as above, if you put DR:2 in the effect and hit with a B, P, or S attack, it gets DR'd.

I think part of the problem is that the code that is deducting stamina points is getting in the way. DR and RESIST and their types should resolve before trying to deduct stamina. If you max out stamina so that you take hit point damage, you can probably make RESIST:x type work, for example.

HoloGnome
December 6th, 2019, 02:53
Yes...that works. For example, if I set fatigue to max stamina and put an effect like RESIST:5 fire in the CT, then hit with fire damage. I can see it being resisted. But, if fatigue is not maxed, then it does not apply the RESIST effect. So, one part of the problem is that the order is wrong...and there might also be issues with it not matching the correct type based on what I saw with the DR testing above.

Bloodright
December 6th, 2019, 02:53
It doesn't work vs. energy attacks. So, you put a DR:2 effect on a PC in the CT, then hit with an E attack and it goes through. If you put DR:2 B in the effect and hit with a bludgeoning attack, it goes through. And, from my other testing, I don't think it recognizes all the other damage type modifiers (and RESIST:x type) wasn't working.

But...as above, if you put DR:2 in the effect and hit with a B, P, or S attack, it gets DR'd.

I think part of the problem is that the code that is deducting stamina points is getting in the way. DR and RESIST and their types should resolve before trying to deduct stamina. If you max out stamina so that you take hit point damage, you can probably make RESIST:x type work, for example.

ok, this answers what i was seeing.. thank you!

HoloGnome
December 6th, 2019, 02:54
A good reminder - there are definitely a couple of bugs in there.

deer_buster
December 6th, 2019, 03:26
I just tested a Tiefling

1d4 F never touched him with this effect applied: RESIST: 5 cold; RESIST: 5 electricity; RESIST: 5 fire​
1d6+2 P did a maximum of 3 damage with this effect applied: DR: 5
1d6+2 P did a maximum of 8 damage with this effect applied: DR: 5 piercing [BUG]



I fixed this in v1.2.4

deer_buster
December 6th, 2019, 03:28
Trying to find the missing "not" in the code was a chore...I must have used 15 Debug statements...

HoloGnome
December 6th, 2019, 07:07
Does your change also affect all other types of DR?
For example:
DR:5 E does not stop energy damage. It goes to stamina.
DR:5 fire does not stop fire damage. It goes to stamina.

I was seeing a problem with RESIST earlier unless I maxed out fatigue, but now I can't reproduce it.

deer_buster
December 6th, 2019, 07:42
Why would DR: 5 E or DR: 5 fire stop either of those? DR only works against kinetic damage (bludgeoning, piercing, or slashing damage) per pg 263 of the CRB.

Trenloe
December 6th, 2019, 09:02
Why would DR: 5 E or DR: 5 fire stop either of those? DR only works against kinetic damage (bludgeoning, piercing, or slashing damage) per pg 263 of the CRB.
Yep:
Damage reduction (DR) applies to kinetic damage—any bludgeoning, piercing, or slashing damage—that a character takes, regardless of that damage's source. It does not apply against damage with no damage type or any other damage type, including acid, cold, electricity, fire, or sonic, though these can be mitigated by energy resistance (see page 264)

Samarex
December 6th, 2019, 14:17
Yep:

Beet me to it.

HoloGnome
December 6th, 2019, 15:50
Yes - but, unfortunately, that definition is not complete.

I have researched this issue in the past, and it minimally at least includes magic and as a type as well as aligned damage. There are multiple references to using magic to bypass DR. And, the smart money is making it work with all the energy types.

Why would you design a ruleset and remove support for the expanded set of DR damage types when it's just easier to leave it in place and support the other defined uses now or in the future?

For example, there are differences in the setups for PCs vs. Monsters. Monsters get multiple attacks, trample and other things PCs don't have. And, it is likely that they will also have other types of DR that PCs do not have. So, if you hack out all the DR tags, then they may not end up working with the monster setups.

So, please add support for DR for all the damage tags so that we have the needed flexibility. If we need them, they are there, and if we don't, there is no downside.

HoloGnome
December 6th, 2019, 15:58
Alien Archive, p. 32: Deh-Nolo: DR 10/magic
Alien Archive, p. 34: Endbringer Devil (Dhalochar): DR 14/good and magic
Alien Archive, p. 38: Young Adult Blue Dragon: DR 5/magic (and other dragon templates)
Alien Archive, p. 66: Anhamut: DR 10/chaotic
Alien Archive, p. 100: DR 5/adamantine -- others have DR/cold iron, the SF Armory includes DR/silver (electroplating - p. 157)
Bunch have DR/evil, or other aligned types

A quick look through Alien Archive shows that they are consistent with respect to energy resistance types vs. DR types. But, DR obviously still requires an expanded set that includes alignment, special materials and magic. Do those currently work? Have you checked through Alien Archive 2 and 3? (I don't own them.)

I also just quickly checked the Armory and the COM and those also seem consistent with the base ruling of resistance for energy types and DR for other types. Maybe cleaner than Pathfinder. So, maybe the situation of DR for an energy type won't arise...but, again, having that functionality doesn't hurt. It's mostly semantic anyway and it may be useful as a workaround when you want to bypass a certain resistance.

And some quick effect unit retesting as I did in the past when checking some of these DR types:
adamantine, cold iron, silver: still doesn't work
good, evil, chaotic, lawful: still doesn't work
magic: still doesn't work

The DR rules should probably also include the force descriptor as an override as we needed on the PF side to ensure that certain damage would always get through, bypassing all resistance, DR, etc. For example, CRB p. 112: Rune of the Eldritch Knight (Su) bypasses DR and hits incorporeal.

Is the ghost touch damage type implemented?

Trenloe
December 6th, 2019, 16:15
DR only effects physical damage types - B, P and S - it doesn't effect energy damage types, which is covered under energy resistance (RESIST). The damage type mentioned in the DR statement is to overcome the base DR (which resists damage of types B, P and S). DR still only ever reduces B, P or S damage types. It will never reduce energy damage types (fire, acid, electricity, etc.) that is energy resistance. And, energy doesn't overcome DR - from the same page (263) of the core rulebook:


Weapons made from a certain material, magic weapons (any weapon with a weapon fusion; see page 191), and weapons imbued with a specific alignment often can overcome this reduction.
This ties in with the DR entries mentioned by @HoloGnome in post #16 above.

The FG Starfinder ruleset should cater for these types of damage types to overcome DR (as per the rules) but, IMO, shouldn't cater for energy damage as this is not called out as something that overcomes DR and is covered by Energy Resistance.

HoloGnome
December 6th, 2019, 16:37
Interesting discussion. I'm still relatively early in my digging into the Starfinder rules, but I agree that DR for energy is obviously not called out. However, I don't think it hurts to include those tags as they may prove functionally useful at some point, perhaps as work-arounds. I don't know. They also may end up never being used, but in that case, there is no harm in having them there. They don't break anything.

I like that Starfinder makes a clear distinction relating to damage types, but in the world of FG, flexibility has often proved valuable, since the ruleset can't handle every circumstance that might arise. And DR vs. RESIST tags basically do the same thing in terms of functionality, which is what I meant by "semantic" above.

Otherwise, all the other types above still need to be implemented, and should probably include force and ghost touch.

HoloGnome
December 6th, 2019, 17:13
Since we are having this discussion, I just had a look through some of my character sheets and the wiki.

Other tags not mentioned above are:
negative, positive: the Positive and Negative energy planes still exist in the SF world, so maybe these will be needed (Death Ward or mitigating other negative energy effects?)
epic: there is an epic difficulty tier, but this tag may not be useful
spell: there are definitely modifiers relating to spell-specific damage - incorporeal, etc.

So, in your review of this stuff, it would probably be good to make sure the "incorporeal" condition tag is working. I haven't specifically checked it.

Also, with respect to force and spell damage types, it looks like SF brings forward similar rules to PF:


"An incorporeal creature takes full damage from other incorporeal creatures and effects, as well as from all force effects. Corporeal spells and effects that do not cause damage have only a 50% chance of affecting an incorporeal creature. An incorporeal creature is immune to critical hits."

Bloodright
December 13th, 2019, 01:28
wow, thanks for digging into this and explaining this out for me guys. I was originally confused on this due to a player making a Tiefling and the racial traits stated Resistance 5.. to cold, electricity, and fire. the number after Resistance confused me into thinking that it was like DR for Physical attacks, and would negate the first 5 points of damage from those types. As was pointed out numerous times DR is strictly for B,P, and S damages.. so from here on, I will just ignore the 5 and just give the player resistance to those damage types.

Trenloe
December 13th, 2019, 09:30
wow, thanks for digging into this and explaining this out for me guys. I was originally confused on this due to a player making a Tiefling and the racial traits stated Resistance 5.. to cold, electricity, and fire. the number after Resistance confused me into thinking that it was like DR for Physical attacks, and would negate the first 5 points of damage from those types. As was pointed out numerous times DR is strictly for B,P, and S damages.. so from here on, I will just ignore the 5 and just give the player resistance to those damage types.
Don't confuse this with D&D 5E resistance. Starfinder energy resistance has a number and that reduces the amount of damage caused by that energy type. See page 264 of the Core Rules:


A creature with resistance to energy has the ability to ignore some energy damage of a certain type (acid, cold, electricity, fire, or sonic) per attack. Each resistance ability is defined by what energy type it resists and how much damage is resisted. It doesn’t matter whether the damage is from a mundane or magical source.

The difference between DR and Energy Resistance is that DR can be overcome (ignored) by certain damage types, whereas energy resistance can't can't be overcome.