[2.25] Reflective is totaly overpowered

Discussion in 'Archive' started by -Mayama-, Apr 11, 2010.

  1. pickled_heretic

    pickled_heretic Member

    Messages:
    1,751
    Likes Received:
    0
    Trophy Points:
    0
    I would love for it to be fixed. Brutos told me a month ago that it's not going to be fixed in time for 2.25. When it is finally fixed, we can add it back in but in the mean time it should be removed.
     
  2. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    You got new scripters for the dev team, I shouldn't have to work so that someone who is less talented can butcher my work. Get DepressedShotMaster or Blizzerd or someone to do it. I can do it, but what's the point if someone else is just going to cut it up and imbalance it again. That makes me look bad needlessly.

    Also, my not removing the reflect modifier was a mistake. I put Pickled's scripts on because he had put way more time into them and researched stuff better. Mine were probably 50% as good and took me about 10 minutes to do. It's fair to say he spent a lot longer. I still think Pickled overnerfed reflective, it now being 60 hp and 0.5 reflect modifier (PICKLED IT'S AS BAD AS FUCKING PAPER) but that's far better than having a 1.0 reflect modifier. I can agree with pickled that it needs removing, it simply does not work, something I was unsure of at the time of my scripts.

    If you desperately need the scripts doing, I can do them, but you want to release this weekend and I simply don't have time until next Monday, and then they'd need balancing, which (if done to a standard I'm happy with) requires at least another week after that. Get someone who is moderately intelligent with scripts (i.e. Pickled or Mashav) to review SIP's proposals if you still want to release this weekend.
     
    Last edited: Apr 12, 2010
  3. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0

    Problem here is, either the devs who looked into this have really no idea what they're doing, or it's not as simple as you make it sound.

    Your explanation doesn't add up for a few reasons:
    1. the 50% came straight from Krenzo and has been confirmed to work like that by atleast one other person a year or 2 ago.
    2. If angle equals percentage of reflection, and a dev confirmed this, then why the hell aren't they doing anything about it? This isn't a counter arguement, if it's true I'm asking sincerely.
    3. If the angle equals percentage is really whats going on, then theres another conondrum, spawwn specifically mentioned he managed to hit a tank at every angle, which basically translates to that either the physics model or armor vectors are not to blame at all and there might be oddities in what angle you hit, but the test results would never show the OP you've depicted here.
    4. The model and vectors have always been the blame for every oddity in projectiles hitting tanks, especially including reflect mod. This makes the bug a lot more complex than just simple angles and would suggest that the code that calculates the damage works perfectly fine (confirmed by spawwn), but is a complete different problem that can't be solves without physically altering something about how tank models behave.

    Add to that, whether or not the 50% doesn't work ingame, it isn't necessarily a lie, thats how its intended to work by design. So lets get that wrong out of the world right here. 50% max is how it should be working. If it isn't, than that should've been a priority for 2.25 to get that fixed once and for all.


    So all we can do right now is wait for some coders to respond.
     
  4. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    QAngle vecAngles = pInflictor->GetAbsAngles();

    Vector vecForward, vecDmg;
    AngleVectors( vecAngles, &vecForward );


    // get the angle from projectile?


    VectorNormalize(vecDmg);
    trace_t tr;
    Vector vecSrc = pInflictor->GetAbsOrigin();
    vecDmg = vecSrc + vecForward * 50;
    UTIL_TraceLine( vecSrc, vecDmg, MASK_SOLID|CONTENTS_DEBRIS|CONTENTS_HITBOX, pInflictor, COLLISION_GROUP_EMP_BUILDABLE_BSP, &tr );

    // do a trace from startpoint vecSrc which is absorigin, to the angle it hit the hitbox?


    if (tr.m_pEnt && ( tr.m_pEnt == this || tr.m_pEnt->GetParent() == this ) )

    // if that returns err this? Not sure here


    {
    Vector hitSurface = tr.plane.normal;
    vecForward *= -1;

    Vector surfDiff = hitSurface - vecForward;

    // surfDiff is the normal it hit minus the angle? I really lost it at this point.


    float finalDiff = fabs(surfDiff.x) + fabs(surfDiff.y) + fabs(surfDiff.z)/2;

    // looks like its just calculating at what position with what angle it was hit, I dno lol

    finalDiff /= 2;
    if (m_pVehicleArmor->directAngleModifier <= 1)
    {
    float dmgAng = m_pVehicleArmor->directAngleModifier * finalDiff * damage;


    //I DNO LEAVE ME THE FUCK ALONE

    damage -= static_cast<int>( dmgAng );
    }

    }



    :D fixed, its perfectly fine.
     
  5. DrummerX

    DrummerX Empires Tyrant

    Messages:
    1,193
    Likes Received:
    0
    Trophy Points:
    0
    Aight for those of us that dont' know shit about coding, explain please!
     
  6. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    I dno I was confident of trying to solve that riddle, but the calculation is really confusing.

    I believe it does a trace whether it actually hits, once it hits it start calculating the angle from where it shot to where it hit, somewhere along the line multiplies it by * 50 (probly the 50% percentage) and gets the exact position on the normal it hit, calculates that position magically and then does reflectmod * angle it hit as negative * damage. Some other magical steps inbetween, something about the distance or whatever, and done you have reflect mod!

    I'm going to guess its messed up but works as intended.

    This was my retarded deed for today, I'll be leaving now.
     
  7. Brutos

    Brutos Administrator Staff Member Moderator

    Messages:
    3,385
    Likes Received:
    0
    Trophy Points:
    0
    The weird part is that:
    Is only 50 units distance, basically nothing, so the trace doesn't really ever hit.
    I don't really know what was intended with that code.

    We should rewrite that whole part.
     
  8. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    edit: meh
     
  9. Brutos

    Brutos Administrator Staff Member Moderator

    Messages:
    3,385
    Likes Received:
    0
    Trophy Points:
    0
    there is a different way to get the angle, look at how Tank::GetSide gets its angle, we might apply that to this case. The angles seem to be right (I did some debugging and the angles defined in the scripts make sense)
     
  10. pickled_heretic

    pickled_heretic Member

    Messages:
    1,751
    Likes Received:
    0
    Trophy Points:
    0
    I just want to add that the only observation required is a direct shot on a tank doing less than 50% of its normal damage on reflective for the commonly held conception of reflective's functionality to be proven false (even if it doesn't prove my account of things to be true).

    This has been observed multiple times from multiple different sources. Demented has an excellent post that I took the liberty to link to here.
     
  11. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    I added a cvar: emp_sv_vehicle_debug_reflective. If you enable it, it will draw 2 lines. Red line: surface normal and green line: hit direction. Lines are made longer to make it easier to notice the angle between them. It writes the angle between them in console + damage reduction done assuming damageReduction in scripts = 1.0. (finalDiff in the code)

    Physics mesh is used for missile collision so use vcollide_wireframe 1 if you aren't sure what is happening.

    Testing results on BE heavy with RPG are:
    tank turret gets big reduction all the time, main part of the chassis behaves normally, if you hit base of BE heavy from side it'll get 50-80% damage reduction. Most of shots from the side get reduction 0-40%. All in all I think that feature works well enough.

    All these percents are mulitplied by value in scripts.
     
    Last edited: Apr 12, 2010
  12. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    So apparantly its not just the physics model that is the problem, but the calculation does allow reductions above 50%. While these did happen a few times in moo's test, it didn't happen in the majority of the shots. credit has to be given to the testers that reported this, specifically pickled for being so articulate about it.

    Here are some screenshots (taken over skype) from the test, I drew the lines so you can see it better:

    Red line is the normal's perpendicular angle, as in the angle the difference is calculated from (the green line is from which angle the rpg hit, but this is a bit hard to see in 2d)

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]




    All the shots matched the physbox's plain normals:

    (BE Heavy tank)
    [​IMG]
    Note that most of the tris normals aren't parallel with their respective sides, which is causing the horrible unpredictable results that have haunted empires for almost half a decade ( :D )

    While the 80% mark wasn't reached nearly as often as you said it was, its still safe to believe that it happens a lot of times in a regular match.

    Apologies if it looked like I was flaming you, just needed to know what was going on and this thread, with everyones contributions solved it pretty well, awesome :)
     
  13. pickled_heretic

    pickled_heretic Member

    Messages:
    1,751
    Likes Received:
    0
    Trophy Points:
    0
    The homing missile tracks toward some abstract point located somewhere in the center of the model. I did a lot of the testing with homing missiles. I suspect that in the course of regular combat, homing missiles tend to track toward points on the tank that have very high damage reduction values for reflective armor, because that was where I noticed the largest damage reduction amounts.
     
  14. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    Can't you just have it so it never does more than a 0.5 reduction or whatever we define in the scripts (new value we require etc). Doesn't technically fix the problem but it's a workaround that will work until the model system is fixed.
     
  15. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    why not just let the missiles hit a friggin box? it would also balance out the various models and makes it more predictable for how much dmg you hit a tank ...
    this is only meant for damage reduction purposes, not for the actual collision ...

    i dont think that you really need it that precise.
     
  16. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    BTW I made a typo in the 3rd pic, the reduction was 0.075, so near 0.1.
    It hit on the very thin side of the tread arch (the thin part above the treads) which face a 90 degrees angle, the heavy doesnt have a lot of these though.
     
  17. Emp_Recruit

    Emp_Recruit Member

    Messages:
    4,244
    Likes Received:
    0
    Trophy Points:
    0
    Isn't reduction capped at 50% already? IIRC it was linear decrease to about 45 then from 45-0 it was 50
     
  18. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    moo's test prints the finaldiff at the end of the calculation after finaldiff /= 2, this removes the possibility that the cap is in this calculation. It might be somewhere else, but it's probably been removed in one of the last versions.

    Most shots are still below or around 50% though, would need a lot more testing with that convar to really know how bad it is. For now the best option is to lower reflective's HP.

    Also, the physics model might not be the best way to base the reflection on, as most tanks do have faces that are angled, effectively giving a reflection advantage, but it's also true that the physics model is a lot more primitive then the view model and does have a lot of sides that correctly correspond with how reflective is perceived to work. In the case of the BE heavy tank, if you're attacking him from the side, the best place to shoot is right through the treads, where theres a big surface that has a 90 degrees angle.
     
  19. pickled_heretic

    pickled_heretic Member

    Messages:
    1,751
    Likes Received:
    0
    Trophy Points:
    0
    As I've repeated a thousand and fucking one times, the maximum possible mitigation is very clearly well above 50%.
     
  20. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    the test which is on the svn shows that the part that calculates reflective does not always go above 0.5 reduction, if it happens, its not in the reflection code. As I don't know the code by heart I couldn't tell you if theres somewhere else where it somehow magically manages to decide that all shots are around 80%, which would also never give the results that you have claimed so far.

    I haven't seen any proof for your claims; Demented's test, for instance, does not take the normals into account and it doesn't make any conclusion whatsoever. I don't even know if you're doing damage calculations in the correct order for your tests to prove the reduction is always above 50%. You could be doing anything wrong, this is the most accurate test so far and I'd be surprised if theres a line of code that would cause your results, it couldn't be a simple multiplication (like dmgAngle multiplied by 2) because then most shots would be over 100% reduction, and infact could reach up to ~200% (one of the shots in moo's test reached 0.85, however was shot from an almost never occuring angle, with noclip)

    Anyhow, I made a shot of all the tanks (excluding artys) with their normals, that way you know where to hit a tank to receive the lowest reduction on your shots:
    [​IMG]

    As you can see the worst to hit are the BE HEAVY and the LT.
    Hit the BE heavy through its treads when facing him from the side.
    Best place to hit a light tank is it's rear.
    The other tanks should be hit on their sides.
     

Share This Page