Closed CrimRecya closed 1 week 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.
By the way, what is exactly a "engrave" trajectory? because I don't get the concept in the documentation. Maybe if I was an English native I could understand.
If possible I would put the right gif you created in the right place documentation for easy understanding :-/ I only recognice the disperse trajectory in the gifs because it works like a shotgun.
For example what trajectory was used in the last gif that remembers me the Protoss Colossus dual weapon
By the way, what is exactly a "engrave" trajectory? because I don't get the concept in the documentation. Maybe if I was an English native I could understand.
If possible I would put the right gif you created in the right place documentation for easy understanding :-/ I only recognice the disperse trajectory in the gifs because it works like a shotgun.
For example what trajectory was used in the last gif that remembers me the Protoss Colossus dual weapon
Apologize for my poor English. The Last gif is the "engrave" trajectory. And thank you for your suggestion. I will create a few more GIF images these days and place them appropriately.
Updated introduction. The resources from mod MO3 are for display purposes only.
Impressive work. The quantity is so huge that I'm afraid it's almost impossible to review and merge all of these on 1 single PR. imo I suggest detach these into several commits:
- The "engrave" one
- The "disperse" one
- As for the straight trajectory one, see if it's possible to incorporate the "inaccurate" part of Trajectory projectiles enhancement #1246. The biggest concern I noticed is that vector of "Causality" thing you made: Are you sure the technos always live longer than your bullet? If not then pointer invalidation will be quite a big trouble for perf. Try to see if there's a simpler way
Okay. But I have a question about splitting here that whether [the state of mutual reference between my Trajectories, such as Disperse using Straight's ‘UseDisperseBurst’ tag, or Disperse, Straight, and Engrave using CheckSubjectToGround() in Hooks.Obstacles’s at the same time] may cause splitting problems. And for the ‘Inaccurate’ part of Straight, I already have the corresponding part here, and the issue of null pointers in the Casualty part is actually no longer returning Vector during Merge step, which has passed hundreds of tests in game and no need to worry about this anymore :).
Okay. But I have a question about splitting here that whether [the state of mutual reference between my Trajectories, such as Disperse using Straight's ‘UseDisperseBurst’ tag, or Disperse, Straight, and Engrave using CheckSubjectToGround() in Hooks.Obstacles’s at the same time] may cause splitting problems. And for the ‘Inaccurate’ part of Straight, I already have the corresponding part here, and the issue of null pointers in the Casualty part is actually no longer returning Vector during Merge step, which has passed hundreds of tests in game and no need to worry about this anymore :).
Got a point. Excuse me for the oversight, I'll have a look later on this one.
New Disperse trajectory and Engrave trajectory with enhanced Straight trajectory.
First, the enhanced Straight trajectory.
Trajectory.Straight.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). By settingTrajectory.Straight.PassThrough=true
, it refers to the distance that projectile should travel from itself when it above 0, and the distance that projectile should move behind the target when it below 0 (use the absolute value).Trajectory.Straight.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.Straight.PassThrough
enables special case logic where the projectile does not detonate in contact with the target but instead travels up to a distance defined byTrajectory.Straight.DetonationDistance
. Note that the firing angle of the projectile is adjusted with this in mind, making it fire straight ahead if the target is on same elevation.Trajectory.Straight.PassDetonate
enables extra detonations when the projectile is traveling.Trajectory.Straight.PassDetonateWarhead
defined the warhead detonated byTrajectory.Straight.PassDetonate
, andTrajectory.Straight.PassDetonateDamage
defined the damage caused byTrajectory.Straight.PassDetonateWarhead
.Trajectory.Straight.PassDetonateDelay
controls the delay for detonating the warhead defined byTrajectory.Straight.Warhead
.Trajectory.Straight.PassDetonateTimer
controls the initial delay for detonating the warhead defined byTrajectory.Straight.Warhead
.Trajectory.Straight.PassDetonateLocal
controls whetherTrajectory.Straight.PassDetonateWarhead
and weapon'sWarhead
are always detonate at ground level. It will also no longer restrict vertical velocity of the projectile when usingTrajectory.Straight.ConfineAtHeight
.Trajectory.Straight.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.Straight.OffsetCoord
controls the offsets of the target. Projectile will aim at this position to attack. It also supportsInaccurate=yes
andTrajectory.Straight.LeadTimeCalculate=true
on this basis.Trajectory.Straight.RotateCoord
controls whether to rotate the projectile's firing direction within the angle bisector ofTrajectory.Straight.OffsetCoord
according to the weapon'sBurst
. Set to 0 to disable this function.Trajectory.Straight.MirrorCoord
controls whetherTrajectory.Straight.OffsetCoord
need to mirror the lateral value to adapt to the current burst index. At the same time, the rotation direction calculated byTrajectory.Straight.RotateCoord
will also be reversed, and the rotation angle between each adjacent projectile on each side will not change as a result.Trajectory.Straight.UseDisperseBurst
controls whether the calculation ofTrajectory.Straight.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.Straight.AxisOfRotation
controls the rotation axis when calculatingTrajectory.Straight.RotateCoord
. The axis will rotates with the unit orientation or the vector that from target position to the source position.Trajectory.Straight.ProximityImpact
controls the initial proximity fuse times. When there are enough remaining times and the projectile approaches another valid target, it will detonate a warhead defined byTrajectory.Straight.Warhead
on it. If the times is about to run out, it will also detonate itself at its location. This function can be cancelled by setting to 0. A negative integer means unlimited times. By the way, you can use the weapon'sWarhead
with low versus only to aim at the target, and use theTrajectory.Straight.ProximityWarhead
to causing actual harm.Trajectory.Straight.ProximityWarhead
defined the warhead detonated byTrajectory.Straight.ProximityImpact
, andTrajectory.Straight.ProximityDamage
defined the damage caused byTrajectory.Straight.ProximityWarhead
.Trajectory.Straight.ProximityRadius
controls the range of proximity fuse. It can NOT be set as a negative integer.Trajectory.Straight.ProximityAllies
controls the damage ratio if the target of proximity fuse is ally. It will not detonate at allies by setting as 0. Note that this is not related to whether the warhead itself affect allies.Trajectory.Straight.ProximityFlight
controls whether to count units in the air.Trajectory.Straight.ThroughVehicles
controls whether the projectile will not be obstructed by vehicles or aircrafts on the ground. When it is obstructed, it will be directly detonated at its location. If it still haveTrajectory.Straight.ProximityImpact
times, it will also detonate aTrajectory.Straight.ProximityImpact
at the location of the obstacle.Trajectory.Straight.ThroughBuilding
controls whether the projectile will not be obstructed by buildings. When it is obstructed, it will be directly detonated at its location. If it still haveTrajectory.Straight.ProximityImpact
times, it will also detonate aTrajectory.Straight.ProximityImpact
at the location of the obstacle.Trajectory.Straight.EdgeAttenuation
controls the edge attenuation ratio of projectile damage, includesTrajectory.Straight.Damage
. Can NOT be set to a negative integer.Trajectory.Straight.SubjectToGround
controls whether the projectile should explode when it hits the ground. Note that this will make AI search for suitable attack locations.Trajectory.Straight.ConfineAtHeight
controls the height above ground that projectile will try to travel as it can. It can not move down from the cliff by settingSubjectToCliffs=yes
. It can be cancelled by setting as a non positive integer. It will be forcibly cancelled by settingTrajectory.Speed
above 256.In
rulesmd.ini
:Trajectory.Straight.ConfineAtHeight
Trajectory.Straight.OffsetCoord
Trajectory.Straight.PassDetonate
Trajectory.Straight.ProximityImpact
Trajectory.Straight.LeadTimeCalculate
Then, the new Disperse trajectory.
ROT
, but its settings are more flexible. It also has a unique trajectory. And as its name suggests, it can even spread out more weapons.Trajectory.Disperse.UniqueCurve
controls whether to enable simulated Qian Xuesen trajectory. After enabling this, it will NOT respect the following 19 items andTrajectory.Speed
.Trajectory.Disperse.PreAimCoord
controls the initial flight direction of the projectile, and after reaching this coordinate, it will begin to turn towards the target direction. When it is set to 0,0,0 , it will directly face the target.Trajectory.Disperse.RotateCoord
controls whether to rotate the projectile's firing direction within the angle bisector ofTrajectory.Disperse.PreAimCoord
according to the weapon'sBurst
. Set to 0 to disable this function.Trajectory.Disperse.MirrorCoord
controls whetherTrajectory.Disperse.PreAimCoord
need to mirror the lateral value to adapt to the current burst index. At the same time, the rotation direction calculated byTrajectory.Disperse.RotateCoord
will also be reversed, and the rotation angle between each adjacent projectile on each side will not change as a result.Trajectory.Disperse.FacingCoord
controls whether the forward direction inTrajectory.Disperse.PreAimCoord
is depending on the orientation of the firer. By default, it will depend on the vector between the firer and the target.Trajectory.Disperse.ReduceCoord
controls whetherTrajectory.Disperse.PreAimCoord
defines the initial movement coordinates when the attack distance is 10 cells, and the actual initial movement coordinates will change with the length of the attack distance. It can be simply understood as an optimization term aimed at ensuring hits at close range.Trajectory.Disperse.UseDisperseBurst
controls whether the calculation ofTrajectory.Disperse.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.Disperse.AxisOfRotation
controls the rotation axis when calculatingTrajectory.Disperse.RotateCoord
. The axis will rotates with the unit orientation or the vector that from target position to the source position.Trajectory.Disperse.LaunchSpeed
controls the initial flight speed of the projectile, it will be directly reduced to this value if it exceedsTrajectory.Speed
.Trajectory.Disperse.Acceleration
controls the acceleration of the projectile's flight speed, increasing the speed per frame according to this value, the final speed will not exceedTrajectory.Speed
.Trajectory.Disperse.ROT
controls the turning speed of the projectile and can determine the turning radius of the projectile. The turning speed will increase with the increase of speed.Trajectory.Disperse.LockDirection
controls whether after reachingTrajectory.Disperse.PreAimCoord
and completing the first turn, the projectile will lock the direction of motion without further adjustment.Trajectory.Disperse.CruiseEnable
controls whether after reachingTrajectory.Disperse.PreAimCoord
and completing the first turn, the projectile will maintain altitude while moving towards the target.Trajectory.Disperse.CruiseUnableRange
controls how far away it is from the target to end the cruise phase, no longer maintaining the cruise altitude, and begins to move directly towards the target. If the distance is already below this value by the timeTrajectory.Disperse.PreAimCoord
is reached, the cruise phase will be skipped.Trajectory.Disperse.LeadTimeCalculate
controls whether the projectile need to calculate the lead time of the target during motion.Trajectory.Disperse.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.Disperse.RetargetRadius
controls the radius of the projectile to search for a new target after losing its original target. If it hasn't arrivedTrajectory.Disperse.PreAimCoord
yet, the last coordinate of the original target is taken as the center of the searching circle. Otherwise, the coordinate of the distance in front of the projectile is taken as the center of the circle. Set to 0 indicates that this function is not enabled, and it will still attempt to attack the original target's location. If it is set to a negative value, it will directly self explode in place.Trajectory.Disperse.RetargetAllies
controls whether the projectile chooses allies as its target when searching for new targets after losing its original target.Trajectory.Disperse.SuicideShortOfROT
controls whether the projectile will explode when it detected its insufficient turning ability.Trajectory.Disperse.SuicideAboveRange
controls the projectile to self destruct directly after reaching the flight distance. Set to 0 to disable suicide.Trajectory.Disperse.SuicideIfNoWeapon
controls whether the projectile will self destruct after the number of times it spreads the weapon has been exhausted. IfTrajectory.Disperse.WeaponCount
set to 0, this will not be enabled.Trajectory.Disperse.Weapons
defined the dispersal weapons of the projectile.Trajectory.Disperse.WeaponBurst
defined how many corresponding weapons each time the projectile will fire. When the quantity is lower thanTrajectory.Disperse.Weapons
, it will use the last value.Trajectory.Disperse.WeaponCount
controls how many times the projectile can spread the weapon. Set to a negative value means unlimited times.Trajectory.Disperse.WeaponDelay
controls the delay for dispersing the weapons defined byTrajectory.Disperse.Weapons
.Trajectory.Disperse.WeaponTimer
controls the initial delay for dispersing the weapons defined byTrajectory.Disperse.Weapons
.Trajectory.Disperse.WeaponScope
controls the weapon dispersing timer to start counting only within this distance of reaching the target. Set to 0 to disable this function. Set to a negative value means it will only disperse the weapon at most once before detonation.Trajectory.Disperse.WeaponSeparate
controls whether the projectile no longer fire all the weapons inTrajectory.Disperse.Weapons
at once and instead fire a group of weapons in the list order, followingTrajectory.Disperse.WeaponBurst
.Trajectory.Disperse.WeaponRetarget
controls whether the dispersed weapons will find new targets on their own. Using the range of weapons to search new targets.Trajectory.Disperse.WeaponLocation
controls whether the dispersed weapons will search for new targets at the center of the spreading position, otherwise they will focus on the original target. If a suitable target cannot be found, it will randomly attack the ground.Trajectory.Disperse.WeaponTendency
controls whether the dispersed weapons will choose the original target as the first new target in each group of weapons.Trajectory.Disperse.WeaponToAllies
controls whether the dispersed weapons will choose allies as targets when searching for new targets.Trajectory.Disperse.WeaponToGround
controls whether the dispersed weapons will only choose the ground as their targets.In
rulesmd.ini
:Trajectory=Disperse
Trajectory.Disperse.UniqueCurve
Trajectory.Disperse.FacingCoord
Trajectory.Disperse.LeadTimeCalculate
Trajectory.Disperse.RotateCoord
Trajectory.Disperse.Weapons
> Straight :Inaccurate
Last, the new Engrave trajectory.
Trajectory.Engrave.SourceCoord
controls the starting point of engraving line segment. Taking the target as the coordinate center. Specifically, it will start from the firing position when set to 0,0 . The height of the point will always at ground level.Trajectory.Engrave.TargetCoord
controls the end point of engraving line segment. Taking the target as the coordinate center. The height of the point will always at ground level.Trajectory.Engrave.MirrorCoord
controls whetherTrajectory.Engrave.SourceCoord
andTrajectory.Engrave.TargetCoord
need to mirror the lateral value to adapt to the current FLH.Trajectory.Engrave.TheDuration
controls the duration of the entire engrave process. Set to 0 will automatically useTrajectory.Engrave.SourceCoord
andTrajectory.Engrave.TargetCoord
to calculate the process duration.Trajectory.Engrave.IsLaser
controls whether laser drawing is required.Trajectory.Engrave.IsSupported
controls whether the engrave laser will be brighter and thicker. Need to setTrajectory.Engrave.IsHouseColor
orTrajectory.Engrave.IsSingleColor
to true.Trajectory.Engrave.IsHouseColor
controls whether set the engrave laser to draw using player's team color. These lasers respectTrajectory.Engrave.LaserThickness
andTrajectory.Engrave.IsSupported
.Trajectory.Engrave.IsSingleColor
controls whether set the engrave laser to draw using onlyTrajectory.Engrave.LaserInnerColor
. These lasers respectTrajectory.Engrave.LaserThickness
andTrajectory.Engrave.IsSupported
.Trajectory.Engrave.LaserInnerColor
controls the inner color of the engrave laser.Trajectory.Engrave.LaserOuterColor
controls the outer color of the engrave laser.Trajectory.Engrave.LaserOuterSpread
controls the spread color of the engrave laser.Trajectory.Engrave.LaserThickness
controls the thickness of the engrave laser. Need to setTrajectory.Engrave.IsHouseColor
orTrajectory.Engrave.IsSingleColor
to true.Trajectory.Engrave.LaserDuration
controls the duration of the engrave laser.Trajectory.Engrave.LaserDelay
controls how often to draw the engrave laser.Trajectory.Engrave.DamageDelay
controls how often to detonate warheads.In
rulesmd.ini
:Trajectory=Engrave
The comprehensive display.
Trajectory.Disperse.Weapons
> Straight :Trajectory.Straight.UseDisperseBurst
Trajectory.Engrave.IsSingleColor
Trajectory.Disperse.Weapons
> Straight :Inaccurate
Trajectory.Engrave.TheDuration
Trajectory.Disperse.Weapons
> Straight :Inaccurate
Trajectory.Engrave.IsSupported
Trajectory.Disperse.CruiseEnable
Trajectory.Disperse.Weapons
> Disperse :Trajectory.Disperse.PreAimCoord
Trajectory.Straight.ProximityImpact