damageType = "pure"
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
damageType = "pure"
What does this do exactly? I've tried placing it under "class = "RangedAttack"," but it did not appear to do anything. I was hoping it would cut through protection entirely, as there appears to be no way for "class = "RangedAttack"," to have any protection bypass like "pierce".
Is "damageType = "pure"" meant for spells only? Monster attacks? Just curious.
Is "damageType = "pure"" meant for spells only? Monster attacks? Just curious.
Re: damageType = "pure"
I'm pretty sure it's similar to physical (doesn't do anything special at all). Just happens to be the only damage type that no standard monster resists (and no player resistance exists for it).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: damageType = "pure"
That is what it looks like. Is there anything other than "pierce" that can negate protection, then?
I tried making a RangedAttack that has damageType = "shock", but what that appears to do is come up against both resistance to shock AND protection, because RangedAttack (and I guess the other attack types also - MeleeAttack, ThrowAttack, FirearmAttack) is hard-coded as physical damage, I assume, no matter what damageType is added.
I tried making a RangedAttack that has damageType = "shock", but what that appears to do is come up against both resistance to shock AND protection, because RangedAttack (and I guess the other attack types also - MeleeAttack, ThrowAttack, FirearmAttack) is hard-coded as physical damage, I assume, no matter what damageType is added.
Re: damageType = "pure"
Damage type has nothing to do with protection. Some damage sources, like melee, missile, and firearm attacks (for players at least), check protection. Some damage sources, like tile damagers, ignore protection. Same situation with evasion. Damage type never enters into this at all, and none of the things you mentioned are hardcoded as physical damage.
The only impacts inherent to damage type that I know of are
1. which resistance is checked
2. whether extra special effects are created (fire and shock leave lingering particles on monsters, cold can give a different death effect)
3. if the damage type is dispel, it won't damage obstacles or monsters without the "elemental" trait
The only impacts inherent to damage type that I know of are
1. which resistance is checked
2. whether extra special effects are created (fire and shock leave lingering particles on monsters, cold can give a different death effect)
3. if the damage type is dispel, it won't damage obstacles or monsters without the "elemental" trait
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: damageType = "pure"
I wonder if it's possible to simply set the Protection of the enemy to "0" during the attack. Should have the same impact as negating protection, no?David Ward wrote:That is what it looks like. Is there anything other than "pierce" that can negate protection, then?
I tried making a RangedAttack that has damageType = "shock", but what that appears to do is come up against both resistance to shock AND protection, because RangedAttack (and I guess the other attack types also - MeleeAttack, ThrowAttack, FirearmAttack) is hard-coded as physical damage, I assume, no matter what damageType is added.
- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: damageType = "pure"
K, thanks for the input guys.
"I wonder if it's possible to simply set the Protection of the enemy to "0" during the attack. Should have the same impact as negating protection, no?"
Is that a fairly easy thing to code in, Azel? On this end, we have found no solution so far to making the RangedAttack component bypass protection.
"I wonder if it's possible to simply set the Protection of the enemy to "0" during the attack. Should have the same impact as negating protection, no?"
Is that a fairly easy thing to code in, Azel? On this end, we have found no solution so far to making the RangedAttack component bypass protection.
Re: damageType = "pure"
it would probably have to happen in the same way discussed in the thread about increasing player strength during an attack. Not very easy 

Re: damageType = "pure"
You could do it with ProjectileComponent.onProjectileHit and set protection back to its original value in MonsterComponent.onProjectileHit or MonsterComponent.onDamage, provided that the former is called before the damage is determined (I'm too lazy to test it). If it's not, then no; there aren't any other appropriate hooks and you would almost certainly end up having to set the protection to 0 for long enough during a frame that another attack might hit first which would be a major bug; the only methods that would avoid this would just introduce worse bugs (wrong damage text etc).
MeleeAttack, ThrowAttack, and FirearmAttack already have pierce available so I'm not sure why you're complaining about those in the first place - you can just set the piece to math.huge to bypass any amount of protection.
In fact, you asked the same question a couple months ago. I do wonder what the hell you're doing that makes pierce on missile attacks important, I mean, they're already redundant with throwing attacks...
MeleeAttack, ThrowAttack, and FirearmAttack already have pierce available so I'm not sure why you're complaining about those in the first place - you can just set the piece to math.huge to bypass any amount of protection.
In fact, you asked the same question a couple months ago. I do wonder what the hell you're doing that makes pierce on missile attacks important, I mean, they're already redundant with throwing attacks...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: damageType = "pure"
I assume he's making what would become the greatest Ranger Sniper in the history of Grimrock? Seems a noteworthy causeminmay wrote:In fact, you asked the same question a couple months ago. I do wonder what the hell you're doing that makes pierce on missile attacks important, I mean, they're already redundant with throwing attacks...

- David Ward
- Posts: 103
- Joined: Wed Jan 07, 2015 11:44 pm
- Location: Vancouver, BC, Canada
Re: damageType = "pure"
LOL Thanks Azel.
We've made a battle system where virtually every monster has protection. The reason we did this had to do with wrangling around with statistics, and especially the damage bonuses added by party character attributes. Since virtually every monster has protection, virtually every weapon, correspondingly, has pierce. But since RangedAttack cannot have pierce, there's had to be a bit of a workaround with ranged weapons. It's all good, just one of those silly little things that is the LOG2 editor (don't get me wrong, it's one of the best game editors I've ever seen).
We've made a battle system where virtually every monster has protection. The reason we did this had to do with wrangling around with statistics, and especially the damage bonuses added by party character attributes. Since virtually every monster has protection, virtually every weapon, correspondingly, has pierce. But since RangedAttack cannot have pierce, there's had to be a bit of a workaround with ranged weapons. It's all good, just one of those silly little things that is the LOG2 editor (don't get me wrong, it's one of the best game editors I've ever seen).