larsiusprime wrote:To aid in debugging stuff like this in the future, in the next few patches I will try to eventually create a "battle log" that you can have the game write out to, so we can examine it to make sure nothing bad is happening. If anyone has any suggestions for how to format that or what data it should capture, I'm all ears.
Hmm, it's probably gonna end up chewing tons of disk space
. But the full debug battle log should capture:
1) enemy spawns (start points AND spawns-on-death)
2) player actions (place defender, boost defender, cast spell, optionally also disable/enable skill although that's not likely to be needed)
3) all attack actions, ideally with targetting logic included, minimally intended target for projectile attacks (as there might be a big delay in the log between activation and hit, and this would be super useful for issues like attacks at something that gets killed in the meantime)
4) processing of all attacks in both directions (defender to creep and vice versa)
I imagine that all defenders would be labelled (keyboard invocation code and current boost level would be good and short), all creeps would be labelled by wave/type/instance. Every attack should list:
- always target starting HP
- always attack flavor
- always base skill damage
- if present, multiplier from defender (zeal),
- if present, multiplier from equipment (unique item bonus)
- if triggered, multiplier from critical/rage
- if armor is present, armor pierce effect
- if armor is still present, armor reduction of damage (is this the right place to take armor into account?)
- if present, multiplier from debuff (bleed)
- if present, multiplier from dmg resist
- actual damage applied, remaning health of the enemy
- any hitback action, depending on how it's processed. Is it just another attack that gets "queued"? Or is it processed immediately?
- for every applicable trait, calculated chance to activate (just to verify that the number is correct and the trait was processed)
- for every trait that passed the roll, effect application (is immunity to a particular effect calculated before this step or the previous one? Immunity getting applied should definitely get logged)
- for attacks by creeps/bosses, save action from uniques if applicable
Rinse and repeat for all targets hit by the attack/splash.
I can imagine that this would generate really huge amounts of data, even if the logging would be as condensed as possible (basically for every item, you'd need at least separator, short code (1-2 chars) and value. If you could stick the attack to 80 chars or something, readable one line, it'd be nice.
QA_1_Rev03/15_HPS1000_D60_HPF940 (Slak, attack 1 on revenant wave 3 number 15, starting hp 1000, base damage 60, final HP 940 - no traits or resistances or whatever)
TA_2_Kni04/01_HPS2000_D200_ - and here begins the fun, because the knight needs to calculate armor pierce, damage to substract, armor break to apply, check for knockback vs immunity.... and that's excluding buffs and debuffs...
But I can imagine this getting quite complicated i.e. with lasting area attacks and creeps walking into them.
So, this sounds very much like a project for a long winter night or three and I don't think you'll want to go there unless utterly bored OR totally fooled by some nasty bug in damage handling...