Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TNTStickyBomb is placed too far away from buildings and applies secondary damage most of the time #2373

Open
xezon opened this issue Sep 30, 2023 · 17 comments · May be fixed by #2375
Open

TNTStickyBomb is placed too far away from buildings and applies secondary damage most of the time #2373

xezon opened this issue Sep 30, 2023 · 17 comments · May be fixed by #2375
Assignees
Labels
Bug Something is not working right China Affects China faction Major Severity: Minor < Major < Critical < Blocker

Comments

@xezon
Copy link
Collaborator

xezon commented Sep 30, 2023

TNTStickyBomb applies different amount of damages depending on count and timing.

https://www.youtube.com/watch?v=hmqaU-HF9uU

Object TNTStickyBomb
  ;This determines how long the bomb lives before it explodes (via SlowDeathBehavior)
  Behavior = LifetimeUpdate ModuleTag_02
    MinLifetime = 10000   ; min lifetime in msec
    MaxLifetime = 10000   ; max lifetime in msec
  End

  Behavior = SlowDeathBehavior ModuleTag_04
    DestructionDelay    = 1
    FX                  = INITIAL WeaponFX_TNTStickyBombDetonation
    Weapon              = FINAL   TNTDetonationWeapon
  End

  Body = HighlanderBody ModuleTag_NewBody
    MaxHealth = 1.0
    InitialHealth = 1.0
  End

  ...
End
Weapon TNTDetonationWeapon ;Created by tankhunters
  PrimaryDamage = 500.0
  PrimaryDamageRadius = 10.0
  SecondaryDamage = 150.0
  SecondaryDamageRadius = 50.0
  AttackRange = 5.0
  DamageType = EXPLOSION
  DeathType = EXPLODED
  WeaponSpeed = 99999.0
  ProjectileObject = NONE
  RadiusDamageAffects = SELF ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 0                   ; time between shots, msec
  ClipSize = 1                        ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0               ; how long to reload a Clip, msec
  AutoReloadsClip = No
  FireSound = BombTruckDefaultBombDetonation
End
@xezon xezon added Bug Something is not working right Major Severity: Minor < Major < Critical < Blocker China Affects China faction labels Sep 30, 2023
@xezon
Copy link
Collaborator Author

xezon commented Sep 30, 2023

After some testing it appears to require at least 3 2 sticky bombs, 2 of which need to explode in same frame.

Adding NOT_SIMILAR flag to weapon RadiusDamageAffects does not fix it.

@xezon
Copy link
Collaborator Author

xezon commented Sep 30, 2023

Setting

  Body = HighlanderBody ModuleTag_NewBody
    MaxHealth = 100000.0
    InitialHealth = 100000.0
  End

Does not fix it.

@xezon
Copy link
Collaborator Author

xezon commented Sep 30, 2023

  Body = ActiveBody ModuleTag_NewBody
    MaxHealth = 100000.0
    InitialHealth = 100000.0
  End

Does not fix it.

@xezon
Copy link
Collaborator Author

xezon commented Sep 30, 2023

Removing SELF from RadiusDamageAffects of TNTDetonationWeapon will make it apply no damage at all.

@xezon
Copy link
Collaborator Author

xezon commented Sep 30, 2023

I have no more ideas. Needs debugging in Thyme I think.

@commy2
Copy link
Collaborator

commy2 commented Sep 30, 2023

FireWeaponWhenDeadBehavior instead of SlowDeathBehavior:Weapon?

@xezon
Copy link
Collaborator Author

xezon commented Sep 30, 2023

  Behavior = SlowDeathBehavior ModuleTag_04
    DestructionDelay    = 0
    FX                  = INITIAL WeaponFX_TNTStickyBombDetonation
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_05
    DeathWeapon = TNTDetonationWeapon
    StartsActive  = Yes
  End

  Body = HighlanderBody ModuleTag_NewBody
    MaxHealth = 1.0
    InitialHealth = 1.0
  End

Does not fix it.

@xezon
Copy link
Collaborator Author

xezon commented Oct 6, 2023

GoldFish:

If the main damage area of the tnt is on the hitbox of the building it will lost max damage. if it is a bit to far away it will only do the area of effect damage. Best way to pull it off is to learn the hitboxes of some of the buildings like the airfield barracks and warfactory since these have extra big hitboxes at the side you get your units from.

@xezon
Copy link
Collaborator Author

xezon commented Oct 8, 2023

What appears to help here is reducing the StartAbilityRange. I see consistent damages on Oil Derricks now.

  Behavior = SpecialAbilityUpdate ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityTankHunterTNTAttack
    StartAbilityRange = 0 ;5.0
    PreparationTime = 0
    SpecialObject = TNTStickyBomb
    MaxSpecialObjects = 8
    SpecialObjectsPersistWhenOwnerDies = Yes
    SpecialObjectsPersistent = Yes
    UniqueSpecialObjectTargets = Yes
    FleeRangeAfterCompletion = 100.0
  End
generals.2023-10-08.10-45-06-10.mp4

@xezon
Copy link
Collaborator Author

xezon commented Oct 8, 2023

I suspect a StartAbilityRange is necessary to have a safe range towards a vehicle so that the TNT bomb can be placed before the instigator is crushed by the vehicle.

Decreasing StartAbilityRange to 2.5 does not fix it.

Decreasing AttackRange to 0 in TNTDetonationWeapon changes nothing.

StartAbilityRange = 0 needs testing against vehicles.

@xezon xezon changed the title TNTStickyBomb applies different amount of damages depending on count and timing TNTStickyBomb is placed too far away from buildings and applies secondary damage most of the time Oct 8, 2023
@xezon
Copy link
Collaborator Author

xezon commented Oct 8, 2023

StartAbilityRange = 1.0 still does not make it work reliably on the white bunker, testing on Tournament Desert (2). It really needs to be 0 for the best effect.

I tested StartAbilityRange = 1.0 against vehicle crush from AI, and it still worked.

generals.2023-10-08.11-45-04-88.mp4

@xezon
Copy link
Collaborator Author

xezon commented Oct 8, 2023

I suspect that there already is a hardcoded min range of 10 for Start Ability Range, and value of StartAbilityRange setting is added on top. This would explain why 10+5 and 10+1 is not enough to reliably apply primary damage with radius of 10 to buildings.

Perhaps primary damage radius needs raising to above 10 to make it really reliably, since floating math is a bitch.

@xezon
Copy link
Collaborator Author

xezon commented Oct 8, 2023

I found a place where StartAbilityRange = 0 is not enough, but PrimaryDamageRadius = 11 will fix it. SO looks like we need to raise PrimaryDamageRadius a bit as well to make it work reliably.

@MTKing4
Copy link
Collaborator

MTKing4 commented Oct 11, 2023

StartAbilityRange = 1.0 still does not make it work reliably on the white bunker, testing on Tournament Desert (2). It really needs to be 0 for the best effect.

I tested StartAbilityRange = 1.0 against vehicle crush from AI, and it still worked.

generals.2023-10-08.11-45-04-88.mp4

You should keep in mind that the AI uses a Crush attack of sort, instead of clicking behind the unit (a feature that i kept yelling to add it for players) which i believe causes the vehicle to slow down before Crushing the unit and stops, which would theoretically give your unit more time to successfully place the bomb before dying, one should test vs a regularly moving unit

@xezon
Copy link
Collaborator Author

xezon commented Oct 11, 2023

I suspect it stops moving because the enemy was crushed. Test can be repeated by having more than one guy near enemy AI, then it likely continues driving.

@MTKing4
Copy link
Collaborator

MTKing4 commented Oct 11, 2023

I found a place where StartAbilityRange = 0 is not enough, but PrimaryDamageRadius = 11 will fix it. SO looks like we need to raise PrimaryDamageRadius a bit as well to make it work reliably.

That sounds like a decent solution, but i fear that reducing the ability range will cause tank hunters to miss placing TNTs vs passing by units due to needing to be closer, where they would have successfully placed it in 1.04 due to the bigger range (and killed that unit)

In essence you would be nerfing TNTs vs Units and buffing them vs buildings, which is a bad trade, TNTing Units is far more valuable as 1 TNT can kill most units.

@MTKing4
Copy link
Collaborator

MTKing4 commented Oct 11, 2023

I suspect it stops moving because the enemy was crushed. Test can be repeated by having more than one guy near enemy AI, then it likely continues driving.

Or just give the enemy unit a waypoint path and see if you can place the bomb, i can do that IF i get freetime anytime soon.

@MTKing4 MTKing4 self-assigned this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working right China Affects China faction Major Severity: Minor < Major < Critical < Blocker
Projects
None yet
3 participants