Author Topic: Damage Effects  (Read 1191 times)


  • Developer
  • Great Eye / First
  • ****
  • Posts: 2045
  • Karma: 25
Damage Effects
« on: Feb 10, 2017; 01:19 PM »
Someone asked about what the electricity damage does, so I thought I'd also post what I can work out about it, and the other types.
I do not presume to be an expert, so I'll post it how the files phrase it, and post my ideas on what it means.
There is a damage effect (these are different to damage types) of all, but there's nothing about it, so we'll move on.

It does knockback(@context, $param2); over a duration in ticks of 20. The game uses 20 ticks per second, so the knockback effect lasts for 1 second.
What's $param2? the distance to be knockedback in centimetres. Why they didn't use metres originally, may be due to some form of precision placement, perhaps preventing particular personages from being pushed into impenetrable placeables, or nonplaceables.
What does context mean? I don't know.

Now fire doesn't use a tick duration but a codeSfxDurationInMs of 5000. In other words they've used a different method to determine the duration which is milliseconds. And the effect lasts for 5 seconds. I think it's because if a creature is affected by fire a second time, the duration is reset, but no other effects are affected.
SetStat669('hp_degen_pct_max', ($object->GetStat666('sfx_fire_damage_percent') > 0) ? $object->GetStat666('sfx_fire_damage_percent') : 5);
What the hell is all of that? Well, we know, somehow(aliens?), that when ignited a creatures health is decreased by 5%, so let's break that gibberish down.
5 is the percentage of health that is being removed, simple.
hp_degen_pct_max, is the stat that is being affected by the 5.
But hold on a second, it's not quite that simple. The rest of the gibberish needs a simpler example.
($object->GetStat666('sfx_fire_damage_percent') > 0) ? $object->GetStat666('sfx_fire_damage_percent') : 5)
The part before the ? is a condition. It's asking is this statement true or false? If it's true then use itself, otherwise use 5. So if it's fire damage percent is greater than 0, than keep using it, otherwise use 5 instead.
This one took me a few rereads to get the hang of, so I'm not going to explain electricity quite yet, I think we could all do with a break.

, we all know and love. Well, until it affects us anyway. It uses duration in ticks like physical, of which it has 80, so it lasts 4 seconds. It also, unlike physical and fire has a default strength of 50(the other are 0). As I'm writing this, I don't know what effect this has.
SetStat669('spectralweaken_outgoing_damage_percent', pin(100 - $param2, 1, 100));
SetStat669('spectralweaken_incoming_damage_percent', $param2 + 101);
I'll bet you're all saying "I thought we were having a break before electricity?!" yeah, I sort of lied, toxic is a bit easier than this, and I think this should be before it.
"spectral weaken outgoing damage percent", and "spectral weaken incoming damage percent" are fairly easy to understand; outgoing is how much damage something affected deals, and incoming is how much extra damage is inflicted to the affected.
Here's where I'm stuck. While we know that being phased causes us to deal 50% less damage, I have no idea what pin(100 - $param2, 1, 100) means, and my google-fu is lacking, so if anyone does know, by all means post your answer. $param2 + 101, obviously means that $param2 is 50(perhaps it's using the default strength I mentioned earlier), meaning that we take 151% damage, not 151% extra damage, just 151% damage.

is a weird one, in that like electrickery, we don't get any hints about what it does, unlike ignite/fire, and spectral/phase.
So it has a default duration in ticks of 20 (1 second), and also a default strength of 20.
And here's the first part of the code: SetStat683('toxic_degen', pct(-$param1, $param2));
What in the hell is toxic degen? Well if I look in the stats file it's type is regen, and it's associated with hp_cur(or current health). I'll be honest and say that I don't understand the stats file as much as I'd like, but, I think toxic degens(similar in some way to ignite) health by a percentage of some calculation between a negative value( -$param1) and a positive value( $param2). If anyone has an idea, please post it.
if ($object->GetStat666('is_player') == 0) SetStat669('velocity', -50);
Now the second part is easy. This says that if whatever has been intoxicated(huh!? huh!? toxic, intoxicated? Ah forget about it) isn't the player, then penalise it's velocity(movement speed) by 50, thus slowing it down.

The weirdest damage effect. For starters, it attaches a missile to whatever is affected, and the missile does the work, but unlike other missiles, the effects it causes are in the damage effect file, not in the missiles file. It has a default duration in ticks of 60 and default strength of 20.
Hold onto your hats.
here's the code:
SetStat669('interrupt_attack', 75);
SetStat683('base_dmg_min', $param1 * $param2 / 100);
SetStat683('base_dmg_max', $param1 * $param2 / 100);
SetStat669('shield_overload_pct', 100);
SetStat669('damage_increment', 100);
SetStat669('damage_min', 'electricity', 100);
SetStat669('damage_max', 'electricity', 100);
Well, that wasn't so bad was it? Or was it?
These are fairly easy to understand, so I'll leave them there....just kidding, I will explain them as much as I can.
Interrupt attack 75. I haven't seen anywhere that explains what precisely this does, but I think it prevents skill use. Though I don't know what the 75 means, since there's another stat named interrupt_attack_chance, which I'm assuming is a percentage change to prevent skill use.
Base dmg min/max is affecting the base damage the affected creature does.
Shield overload pct 100 we all know this as dealing an extra 100% of damage to the shields reducing them faster.
Damage increment? Yeah, not sure of this one. There are references to this in the unit_data files(those are items, monsters, missiles, players, objects, they all use the same file template, with some differences specific to the entries in them), but I don't know what relation it has to the damage dealt.
Damage min/max converts both the min and max damage to electricity damage.

Here's the problem I have with this damage effect. Who does this affect, the creature shot, in which case why, because to me this seems more like a collection of bonuses, not penalties. And why does this attach a missile, when the other damage effects don't?

This file also includes Fear, Convert, Challenge, Stop, and Flash, but they all use field missiles, and use skills of their respective names. Much simpler.

On an unrelated note regarding the GetStat, and SetStat stuff, blind deer, and unfortunately the only people I know who know that they know who knows what they are, are no longer part of the community, mayean and alex_2069.


  • Founder
  • Named
  • **
  • Posts: 393
  • Karma: 12
  • [~]player.kill[Enter]
Re: Damage Effects
« Reply #1 on: Feb 10, 2017; 07:26 PM »
super useful, thank you for sharing this!

but i'm a bit surprised. stuns from physical attacks can also knock back?! i never noticed this part of effect, but i didn't actually try to get my stun attack strength really high either :d really curious to know how far it is possible to push enemies. if this part of effect actually works, that is.
in case of panic break the glass, exit through the window.


  • Founder
  • Nameless
  • *
  • Posts: 89
  • Karma: 6
  • Rarwwww
    • TDE - The Dark Evolution - TDE
Re: Damage Effects
« Reply #2 on: Feb 10, 2017; 09:38 PM »
Thank you for the work and effort Malachor.  :D
Unfortunately i am very bad with this formular-stuff... but i am also very interested in understanding these mechanics.
I will sum up what little knowledge i have (or i think i have) about status-effects and elements.

Fire: Ignites an enemy and an ignite lasts for 5 seconds. During this 5 seconds the affected enemy will lose 5% of its health. (dont know if its current health or max healt, but my guess is current healt)
Additional ignites wont stack but the 5sec duration will be renewed.

Spectral: Phases an enemy for 4 seconds. Phased enemys will deal 50% less damage and recieve 50% more. (was 30% for both in global)

Toxic: Intoxicates ;) an enemy. Enemys will have their health-regeneration disabled(or reduced), movespeed reduced by 50% and i might have read somewhere that it applies a 1% health-degen. (i am not sure about the degen)

Electricity: This is , what i am interested in(because its fairly complex and unexplored). Electricity-damage does 100% increased damage against shields. If the enemy is affected by the shock-effect, shields wont regenerate and most skills cannot be used. Players can still use electricity based skills (e.g. tempest and arc-legion) and even some monsters will be able to use their skills. Maybe the 75 is the chance to interupt the enemys skill-use? The duration should be 3 seconds and while shocked there should be a damage-effect applied.(this damage probably negates the shield-recharge and it also can deal damage to the health of monters and players) The Evoker-Skill arc-legion mentions a "shock-attack-damage" stat in addition to the "shock-attack-strenght" so i assume that the "shock-attack-damage" stat will increase the damage-effect of shock(which is applied during the 3 seconds of shock).
But what is the base damage of this effect?
I remeber someone in the old offical hellgate-forum claimed that these effects do stack and can crit or are affected by crit(apply the effect with a crit and the effect will benefit from crit-damage-bonus).
This last part of the electricity-damage is all guesswork and i would love to get more information on it. Unfortunately i am no coder or math-guy :(
« Last Edit: Feb 10, 2017; 09:42 PM by Wolfilein »

InstantDeath - 55/50 - Crit-Markswoman