Phobos-developers / Phobos

Ares-compatible C&C Red Alert 2: Yuri's Revenge engine extension
GNU Lesser General Public License v3.0
302 stars 97 forks source link

Enhanced Bombard trajectory #1404

Open Coronia opened 1 month ago

Coronia commented 1 month ago

This is a sequel of https://github.com/Phobos-developers/Phobos/pull/1246, which makes use of logic and tag standard from the other trajectory pull requests (https://github.com/Phobos-developers/Phobos/pull/1293, https://github.com/Phobos-developers/Phobos/pull/1294, https://github.com/Phobos-developers/Phobos/pull/1295 and https://github.com/Phobos-developers/Phobos/pull/1374), and also utilizes the generic random anim function from (https://github.com/Phobos-developers/Phobos/pull/1380). Many thanks to @CrimRecya for making these projectiles as well as helping with improvement of enhanced Bombard trajectory. Also thanks NaotoYuuki for providing the prototypes of vertical and meteor projectiles, which are used as the base of these additions.

1 - Bombard Trajectory now support Inaccurate=true, BallisticScatter.Max and BallisticScatter.Min keys, which allows them to scatter when picking targets.

2 - Bombard Trajectory, instead of simply flying to the top of the target and free fall, is now extended into a series of trajectories which flying to a 'turning point' first, and then turning to the targets or respawning on their top. The behaviors of the projectile and the position of the turning point could be customized by the following tags:

In rulesmd.ini:

[SOMEPROJECTILE]                              ; Projectile
Trajectory=Bombard                            ; Trajectory type
Trajectory.Bombard.Height=0.0                 ; double
Trajectory.Bombard.FallPercent=1.0            ; double
Trajectory.Bombard.FallPercentShift=0.0       ; double
Trajectory.Bombard.FallScatter.Max=0.0        ; floating point value
Trajectory.Bombard.FallScatter.Min=0.0        ; floating point value
Trajectory.Bombard.FallScatter.Linear=false   ; boolean
Trajectory.Bombard.FreeFallOnTarget=true      ; boolean
Trajectory.Bombard.NoLaunch=false             ; boolean
Trajectory.Bombard.FallSpeed=0.0              ; double
Trajectory.Bombard.DetonationDistance=0.4     ; floating point value
Trajectory.Bombard.DetonationHeight=-1        ; integer
Trajectory.Bombard.EarlyDetonation=false      ; boolean
Trajectory.Bombard.TargetSnapDistance=0.5     ; floating point value
Trajectory.Bombard.TurningPointAnims=         ; list of Animation
Trajectory.Bombard.LeadTimeCalculate=false    ; boolean
Trajectory.Bombard.OffsetCoord=0,0,0          ; integer - Forward,Lateral,Height
Trajectory.Bombard.RotateCoord=0              ; floating point value
Trajectory.Bombard.MirrorCoord=true           ; boolean
Trajectory.Bombard.UseDisperseBurst=false     ; boolean
Trajectory.Bombard.AxisOfRotation=0,0,1       ; integer - Forward,Lateral,Height
Trajectory.Bombard.SubjectToGround=false      ; boolean

If all values are set to default, it'll perform as the old Bombard Trajectory.

NOTE: Both the old and new Bombard trajectories might trigger a fatal error when firing a Voxel=true projectile (EIP: 007564B4), which is unresolved yet. Avoid using it for now, and if someone could make it work I'll be really grateful.

github-actions[bot] commented 1 month ago

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.