PDA

View Full Version : North vs South / Possession Damage Modifiers



Metal Gear Rex
June 16th, 2014, 23:22
So a lot of people probably already know that Creatures who are from the south have some kind of advantage when attacking a Creature from the north of them. What may not be known is the exact advantage that is in play here. While performing some testing, I was able to confirm this.

Creatures, when targeting a Creature to the north of them, gain a damage bonus of +50%.

I'm aware that this is a large percentage to increase a value by, which might be quite different from what people may remember. However, I am, at least to my knowledge, the first to discover the Workshop Glitch (http://keeperklan.com/threads/2871-Workshop-Glitch) (and the explanation) for a reason. The reason why I'm finding this out is the same reason why I found the Workshop glitch, my patch uses a wider range of values so the differences are more apparent. Vanilla DKII uses very similar damage values across all units, the only exceptions being higher damage values within more uncommon units (Dark Angels, Vampires, and King Reginald). So it only makes sense that such a large damage bonus went unnoticed.

As for Possession, I didn't check differences in damage dealt to opponents, but I did check the differences in damage dealt to possessed Creatures.

Creatures in Possession seem to take only half damage as opposed to those who aren't possessed. North vs South bonuses also apply to Possession.

In short, I just reconfirmed that DKII is impossible to balance and Possession is broken.

I'm thinking about whether or not there should be a thread devoted to random, if useful, tidbits of information about DKII like this information. It could be a thing.

Hapuga
June 16th, 2014, 23:30
Is it possible to at least minimize the north/south problem by arranging the maps in such a manner so that the players would face each other from east/west, or diagonally?

Metal Gear Rex
June 16th, 2014, 23:45
Is it possible to at least minimize the north/south problem by arranging the maps in such a manner so that the players would face each other from east/west, or diagonally?

I was thinking about that as well. In theory, yes. As it so turns out, damage values are unmodified if both units are on equal Y coordinates of each other. But, that is assuming that Creatures on each side can remain on exact equal coordinates. Due to Creature collisions, when Creatures clash, they'll likely slide around a bit, ruining this balance. So I don't think it can be avoided or reduced, but it can at least be artificially altered so that it acts as some kind of RNG variance, rather than a definite bonus to whoever is Blue or something.

It is better than nothing, I think. But, that still only works for two and maybe certain three Player maps. I can't think of a four player layout that could 'solve' the problem in the same sense as its usually four corners, unless its something very specific.

Edit:
Also, I wonder if slapping Creatures around to reposition them is actually a valid strategy to take advantage of this strange bug / design choice.

Hapuga
June 17th, 2014, 00:56
Sounds like this is a feature hardcoded somewhere deep in the gameplay. Shit, the more I think about stupid crap like this, the more I want to rewrite the game one day.

Mothrayas
June 17th, 2014, 16:59
Sounds like this is a feature hardcoded somewhere deep in the gameplay.

My theory is that the developers wanted to implement a sort of "backstab" feature in the game - possibly something to be used by thieves or rogues or by possession. I think they screwed up the code for "am I targeting a character from behind?", where instead of using the target's direction vector it ends up using a northward vector, so it would always trigger the backstabbing damage boost if the target is to the attacker's north.

It's just a theory, but I think it would make sense with what we know about the effects.

Metal Gear Rex
June 17th, 2014, 17:17
My theory is that the developers wanted to implement a sort of "backstab" feature in the game - possibly something to be used by thieves or rogues or by possession. I think they screwed up the code for "am I targeting a character from behind?", where instead of using the target's direction vector it ends up using a northward vector, so it would always trigger the backstabbing damage boost if the target is to the attacker's north.

It's just a theory, but I think it would make sense with what we know about the effects.

Skarok mentioned the theory that it could be to prevent units from taking each other out simultaneously. DK1 had dexterity to prevent that and act as random variance, but with DK2, things tend to act much more consistently. There's no missing, so two Goblins could easily take each other out at the same time. So perhaps North vs South isn't a bug but a legitimately implemented mechanic that was designed to allow one side to win rather than it being a draw. This might come out more in the Combat Pit than in normal combat as the Combat Pit is likely to have units of the same species fighting, but maybe it came up enough in normal combat for it to matter.

With collisions as I mentioned before, it's unlikely that units will be on equal Y coordinates to each other. The only reason as to why I was able to test equal coordinates as negating this 'mechanic' was through setting up the camera at a perfect angle via going to the full map and clicking somewhere, then dropping a Creature and a Toolbox Hero without allowing the mouse to move.

The theory sounds silly and ridiculous, and yet it kind of makes sense to me. It's the worst balancing decision I've ever heard of, I think, but vanilla DK2 has never shown much respect for balance to begin with. From my understanding of things, a lot of DK2 was designed to make it look good and sell well. It would look rather weird if you saw units taking each other out simultaneously, so this could have been some kind of quick fix for that problem. I doubt the devs really cared that much of how broken it could make the game turn out. Not much love went into the game, based on what I've seen from the game as a whole.

That's why I think it's a valid theory, but a broken backstab mechanic is also a pretty valid theory as well.

Hapuga
June 18th, 2014, 05:41
My theory is that the developers wanted to implement a sort of "backstab" feature in the game - possibly something to be used by thieves or rogues or by possession. I think they screwed up the code for "am I targeting a character from behind?", where instead of using the target's direction vector it ends up using a northward vector, so it would always trigger the backstabbing damage boost if the target is to the attacker's north.

It's just a theory, but I think it would make sense with what we know about the effects.

This would work from any direction, woudn't it? I mean, all you need is your object's direction vector and the targets direction vector, and the distance between targets. This is trivial code. If you always use north vector, then this problem would not exist, as EVERY enemy creature would be considered facing north, and all damage would have 50% boost. I think its just what Rex mentioned - some very weird logic to "balance" the game.

Hapuga
June 18th, 2014, 05:45
Skarok mentioned the theory that it could be to prevent units from taking each other out simultaneously. DK1 had dexterity to prevent that and act as random variance, but with DK2, things tend to act much more consistently. There's no missing, so two Goblins could easily take each other out at the same time. So perhaps North vs South isn't a bug but a legitimately implemented mechanic that was designed to allow one side to win rather than it being a draw. This might come out more in the Combat Pit than in normal combat as the Combat Pit is likely to have units of the same species fighting, but maybe it came up enough in normal combat for it to matter.


This is a legit theory, although it is a very simple AI problem, due to lack of time or whatever the developers could implement such a cheap trick.

Mothrayas
June 18th, 2014, 08:21
This would work from any direction, woudn't it? I mean, all you need is your object's direction vector and the targets direction vector, and the distance between targets. This is trivial code. If you always use north vector, then this problem would not exist, as EVERY enemy creature would be considered facing north, and all damage would have 50% boost. I think its just what Rex mentioned - some very weird logic to "balance" the game.

No, I meant if the calculation uses the creature's direction (correctly) and uses the north vector for the target's direction, this would happen. And yes, it's trivial, but DK2's codebase seems to botch all kinds of silly things, so this might as well be a result of that.

Of course, nobody here can tell for sure why this happens unless we somehow manage to get our hands on DK2's source code.

Woudo
June 18th, 2014, 13:07
Doesn't DK2 have a flanking mechanic? Is it related to this or does flanking actually work correctly?

Metal Gear Rex
June 29th, 2014, 07:24
There's something else I thought I'd mention that might be relevant to the discussion. I just remembered it now and retested it to confirm it.

You can modify the XYZ coordinates of specific spells for specific Creatures. Changing the X / Y coordinates does cause the spell to properly fire off from coordinates relative to the direction that the Creature is facing.

However, there is something else. You can also add Lights to Creatures. The Firefly has an orange glow and the Lord (oddly not the King if I recall) has a white light, and Imps have a player coded glow. Most of this is unnoticed because vanilla DK2 is so incredibly bright, but anyways... You can also change the XYZ coordinates for the lights, however, unlike spell offsets, it is not relative to the Creature's direction. It is absolute, as if the Creature is facing north.

The light over King Reginald is the Hand-of-Evil, as I wanted to show his direction in the dark water. The upper light is the one that King Reginald is emitting. I set the X coordinate to be 2.5 tiles away from him.

1451

1452

This, I think, would support the backstab mechanic theory and that DKII is incompetent enough to screw even the light coordinates up. I don't know why the light coordinates would be set to absolute instead of relative to Creature direction as that just seems weird.

Metal Gear Rex
December 27th, 2021, 06:40
I have some new information about the North / South bug.

First and foremost, only Melee damage matters. Projectile damage is not effected. So I suppose in theory the entire bug could be negated by making all damage sources be from spells in the name of balance.

Secondly, lights. In addition to what I said in my previous post here in regards Lights on Creatures, and how a light seems to have the same offset position regardless of creature direction (as if always facing north), I found that the same is true for objects. Was tinkering around with lights for room objects, and found it to be particularly tricky to get the right settings because I quickly realized that, if I tried to offset the X / Y position of the light, it would be the same offset regardless of whether it was attached to a north, south, etc wall, as if the object was always facing north. Like it would be 0.25 tiles northwest of the object always for example, regardless of the object's apparent direction based on the model / wall it's attached to. It's the same as the creatures and, probably is a core problem with the game's handling of entities.

I am thoroughly convinced that the backstab theory is correct, just probably not the why. Objects and general entities are stuck facing north, it just doesn't look that way because it's probably data separate from the model's direction or whatever other data the game uses to get creatures moving around. So it probably went completely unnoticed as it all looks fine, like everything's rotating and all that. But this 50% damage increase only affecting melee damage makes a lot of sense with Rogues / Thieves being able to backstab. It not affecting projectiles means it probably wasn't meant to be used as a way to diversify outcome of combat.
It's also possible that this worked properly once upon a time, but something broke it later down the line and it was never noticed.