Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

[Customize] Weapon range finding in cylinder

Open TaranDahl opened this issue 1 year ago • 7 comments

Range finding in cylinder

  • In vanilla, technos in air will ignore the distance in Z axis when checking if the target is in range. Now you can use the following flags to make technos always range finding like that.
  • [General]->AlwaysCylinderRangefinding controls this globally, and can be customized per weapon type.
  • Mind that set the flags to false meaning "use default" rather than "disable". Technos in air will always range finding in cylinder like vanilla, despite what you set.

In rulesmd.ini:

[General]                         ; WeaponType
AlwaysCylinderRangefinding=false  ; boolean

[SOMEWEAPON]                      ; WeaponType
AlwaysCylinderRangefinding=       ; boolean

TaranDahl avatar Aug 09 '24 04:08 TaranDahl

Todo:

  1. check if there is any Phobos function that has its own range-finding impl.
  2. check if GuardRange is checked in spherical.
  3. check if MouseOverCell and MouseOverObject is checked in spherical. I was working on the DamageArea-related works last day and found that Phobos has its own cellspread function for some effects. Need to check if this is happening on weapon range finding.

TaranDahl avatar Aug 15 '24 17:08 TaranDahl

Perhaps we don't need to add an Always to the tag name. CylinderRangefinding would be clear enough I think

Changed.

TaranDahl avatar Aug 16 '24 06:08 TaranDahl

Looks fine logically. Also, can be named UseCylinderRangefinding for weapontypes

Renamed to CylinderRangefinding

TaranDahl avatar Aug 16 '24 06:08 TaranDahl

Only handles the vanilla weapon rangefinding, at least for now. Other rangefinding operations should be considered later, if necessary.

TaranDahl avatar Aug 29 '24 08:08 TaranDahl

There is currently a bug suspected to be caused by this feature, which can cause misbehavior in judging the distance when the firing unit is located on the bridge.

TaranDahl avatar Feb 09 '25 14:02 TaranDahl

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Mar 28 '25 11:03 github-actions[bot]

There is currently a bug suspected to be caused by this feature, which can cause misbehavior in judging the distance when the firing unit is located on the bridge.-----------谷歌翻译-----------当前有一个错误怀疑是由此功能引起的,这可能会导致行为不当,以判断射击单元位于桥上时的距离。

The bug mentioned here should have been resolved. Now this pr is ready for review.

TaranDahl avatar Mar 31 '25 15:03 TaranDahl