-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced Bombard trajectory #1404
Merged
CrimRecya
merged 13 commits into
Phobos-developers:develop
from
Coronia:trajectory-projectile
Feb 9, 2025
Merged
Enhanced Bombard trajectory #1404
CrimRecya
merged 13 commits into
Phobos-developers:develop
from
Coronia:trajectory-projectile
Feb 9, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ctile # Conflicts: # CREDITS.md # docs/Whats-New.md
…ctile # Conflicts: # docs/Whats-New.md # src/Ext/Bullet/Trajectories/BombardTrajectory.cpp # src/Ext/Bullet/Trajectories/BombardTrajectory.h
…ctile # Conflicts: # src/Ext/Bullet/Trajectories/BombardTrajectory.cpp # src/Ext/Bullet/Trajectories/BombardTrajectory.h
…ctile # Conflicts: # src/Ext/Bullet/Hooks.cpp # src/Ext/Bullet/Trajectories/BombardTrajectory.cpp # src/Ext/Bullet/Trajectories/BombardTrajectory.h # src/Ext/Bullet/Trajectories/PhobosTrajectory.cpp
…ctile # Conflicts: # src/Ext/Bullet/Trajectories/BombardTrajectory.cpp # src/Ext/Bullet/Trajectories/BombardTrajectory.h
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. |
8065339
to
f0bdafa
Compare
…ctile # Conflicts: # docs/Whats-New.md # src/Ext/Anim/Body.cpp
f0bdafa
to
6aee40b
Compare
# Conflicts: # CREDITS.md # YRpp # docs/Whats-New.md
…ctile # Conflicts: # CREDITS.md # docs/Whats-New.md # src/Ext/Bullet/Hooks.cpp # src/Ext/Bullet/Trajectories/PhobosTrajectory.cpp
CrimRecya
approved these changes
Feb 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a sequel of #1246, which makes use of logic and tag standard from the other trajectory pull requests (#1293, #1294, #1295 and #1374), and also utilizes the generic random anim function from (#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:
Trajectory.Bombard.Height
controls the height of the turning point.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.FallScatter.Max
as its radius. If set to 0, random scatter will be disabled.Trajectory.Bombard.FallScatter.Min
can be used to determine the minimum radius of the circle. IfTrajectory.Bombard.FallScatter.Linear
set to true, the random scatter will be limited to the line that is vertical to the original direction of the projectile.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 whenTrajectory.Bombard.FreeFallOnTarget
set to true.Trajectory.Bombard.DetonationDistance
controls the maximum distance in cells from intended target (checked at start of each game frame, before the projectile moves) at which the projectile will be forced to detonate. Set to 0 to disable forced detonation (note that this can cause the projectile to overshoot the target).Trajectory.Bombard.DetonationHeight
controls when the projectile is in a descending state and below the height of the launch position plus this value, it will detonate prematurely. Taking effect when it is set to non negative value. IfTrajectory.Bombard.EarlyDetonation
is set to true, it'll take effect during the ascending stage instead, which makes it detonate when its height is above the launch position plus this value.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.Trajectory.Bombard.TurningPointAnims
, if set, will play an anim when the projectile reaches the turning point. IfTrajectory.Bombard.FreeFallOnTarget
is set to true, it'll be spawned above the target with the projectile together. IfTrajectory.Bombard.NoLaunch
is set to true, it'll be played at where the projectile falls, no matter if it's free fall or not. If more than one animation is listed, a random one is selected.Trajectory.Bombard.LeadTimeCalculate
controls whether the projectile need to calculate the lead time of the target when firing. Note that this will not affect the facing of the turret.Trajectory.Bombard.FreeFallOnTarget
set to false.Trajectory.Bombard.OffsetCoord
controls the offsets of the target. Projectile will aim at this position to attack. It also supportsInaccurate=yes
andTrajectory.Bombard.LeadTimeCalculate=true
on this basis.Trajectory.Bombard.RotateCoord
controls whether to rotate the projectile's firing direction within the angle bisector ofTrajectory.Bombard.OffsetCoord
according to the weapon'sBurst
. Set to 0 to disable this function.Trajectory.Bombard.MirrorCoord
controls whetherTrajectory.Bombard.OffsetCoord
need to mirror the lateral value to adapt to the current burst index. At the same time, the rotation direction calculated byTrajectory.Bombard.RotateCoord
will also be reversed, and the rotation angle between each adjacent projectile on each side will not change as a result.Trajectory.Bombard.UseDisperseBurst
controls whether the calculation ofTrajectory.Bombard.RotateCoord
is based on its superior'sTrajectory.Disperse.WeaponBurst
of the dispersed trajectory, rather thanBurst
of the weapon. If this value is not appropriate, it will result in unsatisfactory visual displays.Trajectory.Bombard.AxisOfRotation
controls the rotation axis when calculatingTrajectory.Bombard.RotateCoord
. The axis will rotates with the unit orientation or the vector that from target position to the source position.Trajectory.Bombard.SubjectToGround
controls whether the projectile should explode when it hits the ground. Note that this will not make AI search for suitable attack locations.In
rulesmd.ini
: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.