I have just tested an issue with reflective armor (which came up during yesterday's pug): With the current svn versions of the vehicle_armor script (and possibly the rc2/rc3 scripts on the servers), damage taken by reflective armor will not be reduced, regardless of the angle of impact. Tested on localserver, with emp_sv_vehicle_show_damage 1 and telling by the visual loss of plates (via armor detection) and when the chassis starts taking damage, shooting ranged cannon/umls at different angles. The culprit seems to be a value of "2.0" for the "angle modifier": Changing this to "1.0" and testing again will show the expected damage reduction when hitting armor in a flat angle. I could suspect that depending on the actual calculation (abs,normalization...) the valid range would be max 1.0 ? (How's the angle modifier used ? For scaling the dotprod. of the armor/weapon vectors ?) As for testing, it would be helpful to have "emp_sv_vehicle_show_damage" show the armor values as well ...
There is a way to actually show the damage. I pushed the value to 2.0 thinking it would make it more reflective, but as you've found, it's not easy to test. So you think the 2.0 makes it less reflective? Any chance you could do some more testing with other values and stuff so I can confirm? If so, I'll drop it back to 1.0.
Ok, I've tested this again with the following "angle modifier" values (this time I have also set the reflective armor's health to 60, so one shot from ranged/uml should in theory kill one plate, for easier telling of how many shots it takes to kill 6 plates of reflective armor) : Code: ang.mod perpendicular flat angle (about 5-10deg) --------+--------------------+---------------------------------------------- 1.5 full weapon dmg full weapon damage 1.1 full weapon dmg full weapon damage 1.0 full weapon dmg about 1/2 weapon damage (2 shots per plate) 0.5 full weapon dmg about 2/3 weapon damage (3 shots per 2 plates) It seems with anything above 1.0 the angle modifier is ignored...
It looks like a modifier of 0.5 makes it take 66% damage while a modifier of 1.0 makes it take 50% damage. This makes me wonder exactly how the game calculates angular damage and where the angle modifier comes into play.
If I had to take a wild guess, it multiplies the angle between the point of impact and the perpendicular and uses that for the calculations. So 20 degrees becomes 55 degrees and 30 degrees becomes 60 degrees, for example.
lol ya it seems kind of wrong to just be typing numbers here and there not even knowing what the ranges are or how its computed.
A lot of stuff I try and get the code checked up on to be sure. This was one of the exceptions where I didn't bother. Also, ignore my previous post, I totally maths derped, it just dawned on me on the way to work this morning. So right, Ducky, I have a couple more test requests if you have the time. I really appreciate this help you're giving us. Can you try these values: 1.1 0.25 0.1 Theoretically, 1.1 should be useless. 0.25 should be pretty decent. 0.1 should be godlike. If this is how it is, then the reflective mod is totally the opposite to how I thought.
brb looking for my copy of emp git code and I'll try and fine reflective. iirc reflective code is simply WRONG mathematically.
Take a look at my previous table again : 2/3 (0.6666) is more damage than 1/2 (0.5) - this means, that with an angle modifier of 1.0 the weapon does only half damage at flat angles, and with 0.5 the weapon does more than half damage (but still not the full amount). I've already tested 1.1 (see above) and found that it does not reduce any damage (same for other values above 1.0 , like 1.5 or 2.0), so it looks like using 1.0 is the best you can get for reflective, with a max. reduction of about 50%. Values below 1.0 will result in more damage, and I could probably test 0.25 and 0.1 later today, but I'm expecting a value of 0.1 to be more like barely noticable (i.e. very little damage reduction). That would probably help alot, instead of using trial and error
Jesus fuck, every time I look at that explanation you posted, however simple it may be, I seem to read it totally differently. I have no idea why I keep doing that. If 1.0 is the biggest reduction then so be it, I'll throw it back to that for RC4 scripts. I know Dizzyone and MOOtant put hours into trying to work out reflective. I'll try and find the posts. Found some, albeit not the exact ones I was looking for: That's all the info I could find. I'll speak to Dizzy later.
if its clamped between 0.5 and 1 means any numbers outside will be either 0.5 or 1 respectively (so 0.1 is 0.5 and 2 would be 1). 1 seems to mean full damage (100%) where 0.5 means half damage (50%), so 0.6 should mean 60% damage - its maybe simply not reduction but damage dealt. angles below 45° should be 50% damage and then it linearly rises to full damage from 45° to 90° (about 1.1% dmg per degree?)* ... theoretically, if i understand it correctly :D *dizzy seems to use the normal as reference not the surface
These values are from another test with modified armor/damage values: Shots with 10 damage are fired at reflective with 100 health per plate, to make it easier to tell how many shots a plate can take. The results pretty much verify the earlier tests, except that 0.5 (angle modifier) is closer to 3/4 damage (25% reduction). Code: angle modifier tested: calculated: damage reduction % shots per plate shots per plate --------------+--------------------+-----------------------+------------------- 0.0 - 10.0 0.0% 0.25 12-13 11.428 12.5% 0.5 13-14 13.333 25.0% 0.75 15-17 16.0 37.5% 1.0 20 20.0 50.0% This is derived from the test values and used for the 'calculated loss': Code: max_damage_reduction = damage * 0.5 * angle_modifier This seems to work with the observed values, probably as close as we can get by just counting plates... I could also observe the 'sweet zone' below 45degrees (angle between plate and projectile, where reduction is always max) which dizzy mentions in the quoted comments, this makes the optimal tank angle more generous than I always thought...
Ok, so whichever way we look at it, the best way to get the most out of Reflective would be to set it back to 1.0. This has been really useful Ducky, thanks for this. I'll make sure the value is set back for RC4 and SVN as soon as I can, and if anyone has wiki-access, I'd recommend posting this information up there.
Glad I could help. I'm curious to see how this affects reflective with all the other recent changes...
Yeah, that's why I haven't bolted the change onto RC3. I felt reflective was underpowered so I started adding HP because I had no idea the reflective modifier was broke, so I think if I just fix this, reflective might be a bit strong, so I'll push the change back to RC4 and balance it out for that.