TheSuperHackers / GeneralsGamePatch

Community Patch to fix and improve original Generals Zero Hour 1.04
Other
60 stars 19 forks source link

China Outpost and GLA Battlebus passengers engage targets on close distances only #858

Open xezon opened 2 years ago

xezon commented 2 years ago

China Outpost and GLA Battlebus passengers engage targets on close distances only.

Weapon ListeningOutpostUpgradedDummyWeapon (also used by AirF_AmericaVehicleChinook)
  AttackRange = 90.0

Weapon BattleBusPassengerDummyWeapon
  AttackRange = 90.0

Weapon Infa_ChinaVehicleTroopCrawlerDummyWeapon
  AttackRange = 60.0

Weapon HumveeMissileWeaponAirDummy
  AttackRange = 150.0

Weapon ChinaInfantryTankHunterMissileLauncher
  AttackRange = 175.0

Weapon MissileDefenderMissileWeapon
  AttackRange = 175.0

Weapon TunnelDefenderRocketWeapon
  AttackRange = 175.0
commy2 commented 2 years ago

These should take into account Rebel/Ranger/Red Guard range which is 100. Dummy weapon range must be somewhat closer for it to work reliably, so 90 is fine vs ground on these units.

However, when engaging air targets, this range could be increased to ~150 or so. It would make targeting air units less wonky.

I have no idea what EALA was thinking with the Assault Troop Crawler though.

xezon commented 2 years ago

So what would be the consequence of ListeningOutpostUpgradedDummyWeapon Range 120 with Red Guards on board? It does seem to work normally on Humvees, no?

ImTimK commented 2 years ago

Definitely don't touch, balanced as is.

commy2 commented 2 years ago

So what would be the consequence of ListeningOutpostUpgradedDummyWeapon Range 120 with Red Guards on board?

Lets say you attacked a building like a War Factory. You select Outpost with Red Guards inside and click on the building. Outpost moves up to 120 feet close to target and just stands there. Then you click again, but nothing happens, because LO has reached the target and ordered the Red Guard to engage, but they can't.

commy2 commented 2 years ago

It does seem to work normally on Humvees, no?

Not really. Vee with Ranger inside would move close enough to engage with the cannon, but for the Rangers to actually be able to fire, you would have to move order the Humvee close enough first and then give another attack order.

xezon commented 2 years ago

Ok understood. But this dummy attack range does not take away from the maximum shooting range of the passenger right? It just determines how close the vehicle will approach the target. Is it desirable that Humvees and Outposts and Battlebuses and Crawlers have such vastly different attack ranges?

xezon commented 2 years ago

What we definitely should do is make an explicit dummy weapon for the Airforce Chinook. Looks lazy to see the ListeningOutpostUpgradedDummyWeapon used for this.

commy2 commented 2 years ago

But this dummy attack range does not take away from the maximum shooting range of the passenger right?

No, it only changes how far from target the transport unit will stop after an attack order. And if the target is inside range, it may prevent the unit from starting to move needlessly. It basically makes the units more responsive to player input and behave less erratically.

commy2 commented 2 years ago

Definitely don't touch, balanced as is.

You need to elaborate on how units starting to move after passenger in range attack orders has anything to do with balance.

ImTimK commented 2 years ago

Definitely don't touch, balanced as is.

You need to elaborate on how units starting to move after passenger in range attack orders has anything to do with balance.

Thought the issue was about 'slow reaction' times from Outposts & Battlebusses against incoming units, if you don't manually target to shoot from maximum range?

commy2 commented 2 years ago

Do you have any steps to reproduce that? I would like to see if a change like this makes any difference.

xezon commented 2 years ago

Looks safe to me to match Infa_ChinaVehicleTroopCrawlerDummyWeapon ground range with ListeningOutpostUpgradedDummyWeapon to 90. Makes behaviour consistent and more predictable, especially when both units are in one attack group together.

commy2 commented 1 year ago

Thought the issue was about 'slow reaction' times from Outposts & Battlebusses against incoming units

Both Outpost and Assault Troop Crawler have AutoAcquireEnemiesWhenIdle = No, so dummy weapon range does not affect idle AI at all. Passengers will engage if enemy is in range, regardless of what the transport does.