Skip to content

Tank projectiles cause mismatch #43

Open
@xezon

Description

@xezon

Tank projectiles cause mismatch. Please investigate how to fix this.

Activity

added
BugSomething is not working right
on Sep 5, 2021
ZekeDlyoung

ZekeDlyoung commented on Sep 5, 2021

@ZekeDlyoung

Specifically, units the use projectiles with dumb projectile behavior need a minimum range, otherwise, they will cause a mismatch of they fire at something that's too close

xezon

xezon commented on Sep 5, 2021

@xezon
Author

Jundiyy:

It would make some changes to gameplay but I don't think as much, it would mean close contact could be 'abused' with micro.
So a Quad could come really close to a Crusader and not be shot at any more.

xezon

xezon commented on Sep 5, 2021

@xezon
Author

PredatoR:

I dont think this is a big problem, if any, in ZH, because tanks have a very low weapon speed: 300/400. We (Contra Mod) have at least 600 weapon speed on weapons, which makes matters worse

You can make a test map containing all DumbProjectile units and test them out individually. Steps to reproduce are:

  1. Select a tank
  2. Force fire as close as possible to the firing point/bone
  3. Look for projectile detonation FX (graphics + audio) at the bottom left corner of the map. If they appear in that spot (and thus disappear from the force-fired position), that means the game would mismatch in MP

Steep terrain contributes too, because it tilts the tank and you can, so units must be tested on tilted terrain too.

hillshoot

In this setup, projectile doesn't spawn at all, even though a small MinRange value may solve the issue on flat terrain. So MinRange must be even higher than the one tested on flat terrain. If any such problematic unit is found, reducing the WeaponSpeed will probably be the best solution. E.g. 400 to 300. I believe MinRange increase would have a higher gameplay impact

added
CriticalSeverity: Minor < Major < Critical < Blocker
on Sep 17, 2021
xezon

xezon commented on Sep 18, 2022

@xezon
Author

PredatoR

First you need to test if any weapons in ZH have this problem. It's a general engine limitation, but it's not confirmed if any projectiles have this issue in vanilla ZH yet. Changing minimum attack range works of course, but it is bad for gameplay. Units cannot attack enemies standing close, so they'd drive back and then shoot.

xezon

xezon commented on Sep 18, 2022

@xezon
Author

DumbProjectileBehavior:

Object USSBenderGunShell
Object GLAAngryMobMolotovCocktailProjectileObject
Object GLAAngryMobRockProjectileObject
Object InfernoTankShellUpgraded
Object InfernoTankShell
Object NeutronCannonShell
Object NukeCannonShell
Object OverlordTankShell
Object BattleMasterTankShell
Object GenericTankShell
Object MarauderTankShell
Object ScorpionTankShell
Object RangerFlashBangGrenade
Object SpectreHowitzerShell
Object Nuke_OverlordTankShell
Object Nuke_BattleMasterTankShell

Dumb Projectile Weapon MinimumAttackRange WeaponSpeed
BattleshipUSSBenderGun 0 400
GLAAngryMobMolotovCocktailProjectileWeapon 12 60
GLAAngryMobRockProjectileWeapon 0 130
InfernoCannonGunUpgraded 50 250
InfernoCannonGun 50 250
NukeCannonGun 150 200
OverlordTankGun 0 300
Tank_OverlordTankGun 0 300
Nuke_OverlordTankGun 0 300
BattleMasterTankGun 0 400
Tank_BattleMasterTankGun 0 400
Nuke_BattleMasterTankGun 0 400
CrusaderTankGun 0 400
PaladinTankGun 0 300
TechnicalCannonWeapon 0 300
BattleshipDemoGun 0 500
MilitiaTankGun 0 400
BattleShipGunReal 50 500
FireBaseHowitzerGun 50 300
MarauderTankGun 0 300
MarauderTankGunUpgradeOne 0 400
MarauderTankGunUpgradeTwo 0 500
REDMarauderTankGun 0 300
REDMarauderTankGunUpgradeOne 0 400
REDMarauderTankGunUpgradeTwo 0 500
ScorpionTankGun 0 400
ScorpionTankGunPlusOne 0 400
Chem_ScorpionTankGunPlusOne 0 400
RangerFlashBangGrenadeWeapon 20 120
SpectreHowitzerGun 0 999
Nuke_OverlordTankGun 0 300
Nuke_BattleMasterTankGun 0 400
xezon

xezon commented on Sep 19, 2022

@xezon
Author

I tested bug with Nuke Battlemaster + modified WeaponSpeed and was able to reproduce the issue. With WeaponSpeed smaller than 633 it was not possible to reproduce. It was also not possible to reproduce it with SpectreGunShip and its SpectreHowitzerGun (999). All other WeaponSpeed values are 500 or lower, so we hopefully need to not be concerned about this issue.

Ideally it will be fixed in Thyme however, so that there is no possibility of it being a problem ever again.

xezon

xezon commented on Dec 29, 2022

@xezon
Author

Issue potentially manifests in function WeaponTemplate::Fire_Weapon_Template at the very bottom.

Watch out for other calls to function Get_Weapon_Speed too.

added
MajorSeverity: Minor < Major < Critical < Blocker
and removed
CriticalSeverity: Minor < Major < Critical < Blocker
on Feb 24, 2023
kajxqeirscl

kajxqeirscl commented on Aug 5, 2023

@kajxqeirscl

Contra devs have found a solution for this recently. I don't know the details but it was in the Contra X Beta changelog.

commy2

commy2 commented on Aug 5, 2023

@commy2

There are obvious work-arounds, but all with major undesirable side effects. I would wait for Thyme on this one.

kajxqeirscl

kajxqeirscl commented on Aug 5, 2023

@kajxqeirscl

Before Contra X units had a minimum shooting range to fix this. They removed the minimum shooting range while still keeping the projectile velocities and avoiding mismatches. I think this needs to be discussed more. Thyme is not going to be finished anytime soon.

xezon

xezon commented on Aug 5, 2023

@xezon
Author

If you can find out what they did, then please post here. It can help other mod developers who run into this issue.

kajxqeirscl

kajxqeirscl commented on Aug 5, 2023

@kajxqeirscl

Apparently it was fixed in Contra X by simply using MissileAI instead of DumbProjectileBehavior. This does affect the gameplay however but it's barely noticeable. So I guess there still is no ideal solution.

xezon

xezon commented on Aug 5, 2023

@xezon
Author

That makes sense. I do suspect that the Missile behavior is more expensive than the Dumb Projectile. This means there is a chance that there can be a little performance degradation when using this. Just to keep in mind.

added theissue type on Mar 4, 2025
removed theissue type on Mar 4, 2025
added theissue type on Mar 4, 2025
added this to the Stability fixes milestone on Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working rightExecutableIs game code relatedMajorSeverity: Minor < Major < Critical < BlockerNetworkAnything related to network, servers

    Type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xezon@commy2@kajxqeirscl@ZekeDlyoung@DevGeniusCode

        Issue actions

          Tank projectiles cause mismatch · Issue #43 · TheSuperHackers/GeneralsGameCode