Trajectory projectiles enhancement #1246
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.