Closed Coronia closed 3 weeks 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.
added a tag to display anim when the projectile is 'turning'
Trajectory.Bombard.TurningPointAnim
, if set, will play an anim when the projectile reaches the turning point. If Trajectory.Bombard.FreeFallOnTarget
is set to true, it'll be spawned above the target with the projectile together. If Trajectory.Bombard.NoLaunch
is set to true, it'll be played at where the projectile falls, no matter if it's free fall or not.In rulesmd.ini
:
[SOMEPROJECTILE] ; Projectile
Trajectory.Bombard.TurningPointAnim= ; Animation
also, both https://github.com/Phobos-developers/Phobos/pull/1261 and this PR has implemented Inaccurace for trajectory, with different approach however. The other method considered about distance between the target and the firer, which seems to be how it's worked in vanilla. Please check these 2 implementations to see which is better and should be kept.
Close it for now since some logic is conflicted with the one made by CrimRecya, and the pattern of tags need to be uniformed. Will reopen or start a new pull request after some other trajectory pull requests are merged
Some enhancement for trajectory projectiles, especially for Bombard Trajectory. Many thanks to NaotoYuuki who provided trajectory scatter logic and the prototypes of vertical and meteor projectiles, which are used as the base of these additions.
1 - Both Straight Trajectory and Bombard Trajectory now support
Inaccurate=true
,BallisticScatter.Max
andBallisticScatter.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:
Trajectory.Bombard.FallPercent
controls the distance of the turning point by its percentage of the total distance between attacker and intended target. If set to 0%, then it'll fly up vertically. If set to 100%, then it'll travel to the top of the intended target.Trajectory.Bombard.FallPercentShift
. If set to 0%, random shift will be disabled.Trajectory.Bombard.FallScatterRange
as its radius. If set to 0, random scatter will be disabled.Trajectory.Bombard.FreeFallOnTarget
controls how it'll hit the intended target. If set to true, the projectile will be respawned above the intended target and free fall. If set to false, the projectile will travel to the intended target from the turning point.Trajectory.Bombard.NoLaunch
controls whether the attacker will fire the projectile by itself. If set to true, projectile will directly fall from the turning point.Trajectory.Bombard.FallSpeed
controls the initial speed of the projectile after it turns. If set to 0.0, then it'll useTrajectory.Speed
. Can't work together withTrajectory.Bombard.FreeFallOnTarget=true
.Trajectory.Bombard.TargetSnapDistance
controls the maximum distance in cells from intended target the projectile can be at moment of detonation to make the projectile 'snap' on the intended target. Set to 0 to disable snapping.In
rulesmd.ini
:If all values are set to default, it'll perform as the old Bombard Trajectory, so those who have made use of it don't need to modify their ini if they want it to behave the same.
NOTE: Both the old and new Bombard Trajectory will crash when firing a
Voxel=true
projectile, which is unresolved yet. Avoid using it for now, and if someone could make it work I'll be really grateful.