Skip to content
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

[General Purpose] New Engrave trajectory #1293

Open
wants to merge 85 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fe6d738
Allow strafing weapons to fired at air targets if otherwise not restr…
Starkku Jun 25, 2024
8030947
New Engrave trajectory
CrimRecya Jun 25, 2024
73eccea
Add missing split items
CrimRecya Jun 25, 2024
980d026
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Jun 25, 2024
59f9852
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Jun 25, 2024
4f60a5c
Get accurate building FLH
CrimRecya Jun 30, 2024
b925f90
Fix known issue
CrimRecya Jun 30, 2024
08c1edd
Change hook
CrimRecya Jul 4, 2024
a569568
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Jul 6, 2024
ca2e740
Merge
CrimRecya Jul 6, 2024
080e1bb
Fix nullptr
CrimRecya Jul 6, 2024
f5a5d70
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Jul 14, 2024
37f7144
Fix firepower duplicated calculate
CrimRecya Jul 14, 2024
6242590
Case
CrimRecya Jul 16, 2024
3bede54
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Jul 19, 2024
8190e90
Fix a conflict with Kratos.dll and SIWinterIsComing.dll because they …
CrimRecya Jul 19, 2024
591dda0
Docs
CrimRecya Aug 9, 2024
cdaf91b
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Aug 9, 2024
65c39c3
ApplyRangeModifiers
CrimRecya Aug 9, 2024
9fc42cd
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Sep 4, 2024
dc79795
Fix a doc mistake
CrimRecya Sep 4, 2024
753e930
Sync with straight
CrimRecya Sep 4, 2024
3ab000c
Fix `double` and revert `trajectory.speed`
CrimRecya Sep 5, 2024
2eb915a
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Sep 15, 2024
eade7fa
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Sep 18, 2024
10c56b6
Delete unnecessary content from the entity
CrimRecya Sep 23, 2024
74c5af9
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Sep 23, 2024
f9b7902
Update with new template
CrimRecya Sep 23, 2024
076c6a2
Alignment
CrimRecya Sep 23, 2024
211a089
Security
CrimRecya Sep 24, 2024
e10a5b7
Fix initial
CrimRecya Sep 24, 2024
9b14e7f
Optimize
CrimRecya Sep 28, 2024
627a6ad
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Sep 28, 2024
0edd46b
Synchronize with other trajectory
CrimRecya Sep 28, 2024
1ca5624
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Oct 4, 2024
8550331
Fix merge
CrimRecya Oct 4, 2024
e0a6062
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Oct 4, 2024
17bf0fa
Fix merge
CrimRecya Oct 4, 2024
83a6d38
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Oct 6, 2024
d3b3fd5
Fix merge
CrimRecya Oct 6, 2024
72aec09
Const auto
CrimRecya Nov 7, 2024
a6d01f6
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Nov 7, 2024
3d33d48
Clear up and fix a mistake when fired by a 'dead' techno
CrimRecya Nov 27, 2024
3655138
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Nov 27, 2024
70dd0f2
Small fix
CrimRecya Nov 27, 2024
d414c6d
Check fire condition
CrimRecya Nov 27, 2024
ef51b0c
Fix in transport
CrimRecya Nov 27, 2024
e77bf3f
Fix a mistake
CrimRecya Nov 28, 2024
efe0d6f
Remove useless codes
CrimRecya Dec 26, 2024
0986976
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Dec 26, 2024
a9f4595
Fix doc
CrimRecya Dec 26, 2024
2e141ce
Remove useless sanity check
CrimRecya Dec 27, 2024
d066904
Synchronize
CrimRecya Dec 27, 2024
5bf8528
Synchronize
CrimRecya Dec 29, 2024
3127713
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Dec 29, 2024
8c21537
Inline some short functions
CrimRecya Dec 30, 2024
56facc7
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Jan 15, 2025
32c90bd
")"
DeathFishAtEase Feb 2, 2025
00845a0
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Feb 3, 2025
a50f79c
New `Trajectory.Engrave.UseDisperseCoord`
CrimRecya Feb 3, 2025
4287849
Optimize
CrimRecya Feb 7, 2025
f937b8d
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Feb 7, 2025
33fde35
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Feb 8, 2025
3bf04c2
Review and add some comment
CrimRecya Feb 8, 2025
247da90
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Feb 8, 2025
28c5ab4
New functions similar to Straight
CrimRecya Feb 8, 2025
5c598be
Doc
CrimRecya Feb 8, 2025
90fb61f
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Feb 10, 2025
1ca3c0d
Rename key
CrimRecya Feb 11, 2025
e48d5cc
Optimize and fix
CrimRecya Feb 11, 2025
f5e56d6
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Feb 11, 2025
ae71e8f
New `Trajectory.Engrave.AllowFirerTurning`
CrimRecya Feb 13, 2025
9a3c894
Merge branch 'develop' into develop-trajectory-engrave
CrimRecya Feb 13, 2025
ee5639b
Fix a typo
CrimRecya Feb 13, 2025
3285b76
Core
CrimRecya Feb 13, 2025
93b5f06
Check InLimbo
CrimRecya Feb 14, 2025
f3dc2a0
Sync
CrimRecya Feb 17, 2025
da7269b
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Feb 17, 2025
0f30085
Fix fire in transporter
CrimRecya Feb 18, 2025
bf5967a
Fix typo
CrimRecya Feb 18, 2025
a0ad20d
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Feb 18, 2025
3b8e0e3
[Vanilla Fix] Fix impassable invisible barrier created by chronospher…
Coronia Feb 19, 2025
50d348f
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Feb 19, 2025
653c3e7
Merge remote-tracking branch 'upstream/develop' into develop-trajecto…
CrimRecya Feb 28, 2025
a11414a
New `Trajectory.Engrave.ProximityFlight` and `Trajectory.Engrave.Conf…
CrimRecya Feb 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ This page lists all the individual contributions to the project by their author.
- No turret unit turn to the target
- Damage multiplier for different houses
- Extended gattling rate down logic
- New Engrave trajectory
- **Ollerus**
- Build limit group enhancement
- Customizable rocker amplitude
Expand Down
2 changes: 2 additions & 0 deletions Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<ClCompile Include="src\Ext\Bullet\Trajectories\BombardTrajectory.cpp" />
<ClCompile Include="src\Ext\Bullet\Trajectories\PhobosTrajectory.cpp" />
<ClCompile Include="src\Ext\Bullet\Trajectories\StraightTrajectory.cpp" />
<ClCompile Include="src\Ext\Bullet\Trajectories\EngraveTrajectory.cpp" />
<ClCompile Include="src\Ext\Bullet\Trajectories\ParabolaTrajectory.cpp" />
<ClCompile Include="src\Ext\CaptureManager\Hooks.cpp" />
<ClCompile Include="src\Ext\CaptureManager\Body.cpp" />
Expand Down Expand Up @@ -200,6 +201,7 @@
<ClInclude Include="src\Ext\Bullet\Trajectories\BombardTrajectory.h" />
<ClInclude Include="src\Ext\Bullet\Trajectories\PhobosTrajectory.h" />
<ClInclude Include="src\Ext\Bullet\Trajectories\StraightTrajectory.h" />
<ClInclude Include="src\Ext\Bullet\Trajectories\EngraveTrajectory.h" />
<ClInclude Include="src\Ext\Bullet\Trajectories\ParabolaTrajectory.h" />
<ClInclude Include="src\Ext\OverlayType\Body.h" />
<ClInclude Include="src\Ext\ParticleType\Body.h" />
Expand Down
72 changes: 72 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ Currently interceptor weapons with projectiles that do not have `Inviso=true` wi
- The speed of the projectile is defined by `Trajectory.Speed`, which unlike `Speed` used by `ROT` > 0 projectiles is defined on projectile not weapon.
- In `Trajectory=Straight`, it refers to the whole distance speed of the projectile and it has no restrictions.
- In `Trajectory=Bombard`, it refers to the initial speed of the projectile and it has no restrictions.
- In `Trajectory=Engrave`, it refers to the horizontal engrave speed of the projectile and it cannot exceed 128. Recommend set as about 40.
- In `Trajectory=Parabola`, it refers to the horizontal velocity of the projectile and is only used for modes 0, 3, or 5 and it has no restrictions.

In `rulesmd.ini`:
Expand Down Expand Up @@ -917,6 +918,77 @@ Trajectory.Parabola.AxisOfRotation=0,0,1 ; integer - Forward,Lateral,Heig
- Certainly, `Gravity` can also affect the trajectory.
```

#### Engrave trajectory

- Visually, like the thermal lance. Calling it 'trajectory' may not be appropriate. It does not read the settings on the weapon.
- `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, unless `Trajectory.Engrave.ConfineOnGround` is set to false.
- `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, unless `Trajectory.Engrave.ConfineOnGround` is set to false.
- `Trajectory.Engrave.MirrorCoord` controls whether `Trajectory.Engrave.SourceCoord` and `Trajectory.Engrave.TargetCoord` need to mirror the lateral value to adapt to the current FLH.
- `Trajectory.Engrave.UseDisperseCoord` controls whether the emission position of the engrave laser need to replaced with the FLH of its superior's dispersed trajectory, which set `Trajectory.Disperse.RecordSourceCoord` to true.
- `Trajectory.Engrave.ApplyRangeModifiers` controls whether any applicable weapon range modifiers from the firer are applied to the engrave process.
- `Trajectory.Engrave.AllowFirerTurning` controls whether the projectile allow for significant changes in the orientation of the firer, otherwise it will disappear.
- `Trajectory.Engrave.Duration` controls the duration of the entire engrave process. Set to 0 will automatically use `Trajectory.Engrave.SourceCoord` and `Trajectory.Engrave.TargetCoord` to calculate the process duration.
- `Trajectory.Engrave.IsLaser` controls whether laser drawing is required.
- `Trajectory.Engrave.IsIntense` controls whether the engrave laser will be brighter and thicker. Need to set `Trajectory.Engrave.IsHouseColor` or `Trajectory.Engrave.IsSingleColor` to true.
- `Trajectory.Engrave.IsHouseColor` controls whether set the engrave laser to draw using player's team color. These lasers respect `Trajectory.Engrave.LaserThickness` and `Trajectory.Engrave.IsIntense`.
- `Trajectory.Engrave.IsSingleColor` controls whether set the engrave laser to draw using only `Trajectory.Engrave.LaserInnerColor`. These lasers respect `Trajectory.Engrave.LaserThickness` and `Trajectory.Engrave.IsIntense`.
- `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 set `Trajectory.Engrave.IsHouseColor` or `Trajectory.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.
- `Trajectory.Engrave.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 by `Trajectory.Engrave.ProximityWarhead` on it. If the number of times is exhausted, the engraving process can still continue, but it will not detonate additional warhead as a result. This function can be cancelled by setting to 0. A negative integer means unlimited times. (You can use this to cause non repeated damage to all units encountered during the flight of the projectile.)
- `Trajectory.Engrave.ProximityWarhead` defines the warhead detonated by `Trajectory.Engrave.ProximityImpact`, and `Trajectory.Engrave.ProximityDamage` defines the damage caused by `Trajectory.Engrave.ProximityWarhead`.
- `Trajectory.Engrave.ProximityRadius` controls the range of proximity fuse. It can NOT be set as a negative integer.
- `Trajectory.Engrave.ProximityDirect` controls whether let the target receive damage instead of detonating the warhead.
- `Trajectory.Engrave.ProximityMedial` controls whether to detonate `Trajectory.Engrave.ProximityWarhead` at the bullet's location rather than the proximity target's location.
- `Trajectory.Engrave.ProximityAllies` controls whether allies will also trigger the proximity fuse.
- `Trajectory.Engrave.ProximityFlight` controls whether to count units in the air.
- `Trajectory.Engrave.ProximitySuicide` controls whether the projectile will self destruct after the number of proximity fuse times has been exhausted. If `Trajectory.Engrave.ProximityImpact` set to 0, this will not be enabled.
- `Trajectory.Engrave.ConfineOnGround` controls whether the height of the projectile will always at ground level.


In `rulesmd.ini`:
```ini
[SOMEPROJECTILE] ; Projectile
Trajectory=Engrave ; Trajectory type
Trajectory.Engrave.SourceCoord=0,0 ; integer - Forward,Lateral
Trajectory.Engrave.TargetCoord=0,0 ; integer - Forward,Lateral
Trajectory.Engrave.MirrorCoord=true ; boolean
Trajectory.Engrave.UseDisperseCoord=false ; boolean
Trajectory.Engrave.ApplyRangeModifiers=false ; boolean
Trajectory.Engrave.AllowFirerTurning=true ; boolean
Trajectory.Engrave.Duration=0 ; integer
Trajectory.Engrave.IsLaser=true ; boolean
Trajectory.Engrave.IsIntense=false ; boolean
Trajectory.Engrave.IsHouseColor=false ; boolean
Trajectory.Engrave.IsSingleColor=false ; boolean
Trajectory.Engrave.LaserInnerColor=0,0,0 ; integer - Red,Green,Blue
Trajectory.Engrave.LaserOuterColor=0,0,0 ; integer - Red,Green,Blue
Trajectory.Engrave.LaserOuterSpread=0,0,0 ; integer - Red,Green,Blue
Trajectory.Engrave.LaserThickness=3 ; integer
Trajectory.Engrave.LaserDuration=1 ; integer
Trajectory.Engrave.LaserDelay=1 ; integer
Trajectory.Engrave.DamageDelay=2 ; integer
Trajectory.Engrave.ProximityImpact=0 ; integer
Trajectory.Engrave.ProximityWarhead= ; WarheadType
Trajectory.Engrave.ProximityDamage=0 ; integer
Trajectory.Engrave.ProximityRadius=0.7 ; floating point value
Trajectory.Engrave.ProximityDirect=false ; boolean
Trajectory.Engrave.ProximityMedial=false ; boolean
Trajectory.Engrave.ProximityAllies=false ; boolean
Trajectory.Engrave.ProximityFlight=false ; boolean
Trajectory.Engrave.ProximitySuicide=false ; boolean
Trajectory.Engrave.ConfineOnGround=true ; boolean
```

```{note}
- It's best not to let it be intercepted.
- Make sure you set a low `Trajectory.Engrave.ProximityRadius` value unless necessary.
```

### Shrapnel enhancements

![image](_static/images/shrapnel.gif)
Expand Down
2 changes: 2 additions & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,11 @@ New:
- Damage multiplier for different houses (by CrimRecya)
- Customizable duration for electric bolts (by Starkku)
- Extended gattling rate down logic (by CrimRecya)
- New Engrave trajectory (by CrimRecya)

Vanilla fixes:
- Prevent the units with locomotors that cause problems from entering the tank bunker (by TaranDahl)
- Fix an issue where a unit will leave an impassable invisible barrier in its original position when it is teleported by ChronoSphere onto an uncrushable unit and self destruct (by NetsuNegi)

Fixes / interactions with other extensions:
- Allowed `AuxBuilding` and Ares' `SW.Aux/NegBuildings` to count building upgrades (by Ollerus)
Expand Down
1 change: 1 addition & 0 deletions src/Ext/Bullet/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ constexpr bool CheckTrajectoryCanNotAlwaysSnap(const TrajectoryFlag flag)
return flag != TrajectoryFlag::Invalid;
/* return flag == TrajectoryFlag::Straight
|| flag == TrajectoryFlag::Bombard
|| flag == TrajectoryFlag::Engrave;
|| flag == TrajectoryFlag::Parabola;*/
}

Expand Down
Loading