Skip to content

Commit 323c77a

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into random-anims
# Conflicts: # docs/New-or-Enhanced-Logics.md # docs/Whats-New.md # docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po
2 parents 693cd4d + 872a1c5 commit 323c77a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5346
-3183
lines changed

CREDITS.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ This page lists all the individual contributions to the project by their author.
4949
- Voxel light source position customization
5050
- `UseFixedVoxelLighting`
5151
- Warhead activation target health thresholds
52+
- MP saves support for quicksave command and savegame trigger action
53+
- Ported XNA CnCNet Client MP save handling
5254
- **Uranusian (Thrifinesma)**:
5355
- Mind Control enhancement
5456
- Custom warhead splash list
@@ -274,6 +276,7 @@ This page lists all the individual contributions to the project by their author.
274276
- Airstrike flare visual customizations & fixes
275277
- Restored parabombs
276278
- Delayed fire weapons
279+
- Changes / fixes to `Vertical` projectile logic and customizing projectile initial facing behavior
277280
- **Morton (MortonPL)**:
278281
- `XDrawOffset` for animations
279282
- Shield passthrough & absorption
@@ -383,6 +386,10 @@ This page lists all the individual contributions to the project by their author.
383386
- If `BombDisarm=yes` is not present for all weapon warheads, then the engineer will no longer use the appropriate mouse action
384387
- Fix an unusual use of DeployFireWeapon for InfantryType
385388
- Fix the fact that when the selected unit is in a rearmed state, it can unconditionally use attack mouse on the target
389+
- Units can customize the attack voice that plays when using more weapons
390+
- When `Speed=0` or the TechnoTypes cell cannot move due to `MovementRestrictedTo`, vehicles cannot attack targets beyond the weapon's range. `Area Guard` and `Hunt` missions will also become ineffective
391+
- When the vehicle loses its target, you can customize whether to align the turret direction with the vehicle body
392+
- Health bar permanently displayed
386393
- **NetsuNegi**:
387394
- Forbidding parallel AI queues by type
388395
- Jumpjet crash speed fix when crashing onto building
@@ -435,6 +442,7 @@ This page lists all the individual contributions to the project by their author.
435442
- Fix the bug that `IsLocomotor=yes` warhead rendering hover units unselectable and undamageable on elevated bridge
436443
- Fix the bug that Locomotor warhead won't stop working when firer (except for vehicle) stop firing
437444
- Fix the bug that hover vehicle will sink if destroyed on bridge
445+
- Customize squid grapple animation
438446
- **Apollo** - Translucent SHP drawing patches
439447
- **ststl**:
440448
- Customizable `ShowTimer` priority of superweapons
@@ -526,6 +534,13 @@ This page lists all the individual contributions to the project by their author.
526534
- Burst without delay
527535
- Fix an issue that if the garrison unload occupants when there is no open space around it would result in the disappearance of the occupants
528536
- Fix an issue where Ares' `Convert.Deploy` triggers repeatedly when the unit is turning or moving
537+
- Reverse engineer warhead
538+
- AI base construction modification
539+
- Restore turret recoil effect
540+
- Fix an issue that `FireAngle` was not taken into account when drawing barrel in `TurretShadow`
541+
- Fix an issue that barrel anim data will be incorrectly overwritten by turret anim data if the techno's section exists in the map file
542+
- Jumpjet Climbing Logic Enhancement
543+
- Fix for pathfinding crashes on big maps due to too small pathfinding node buffer
529544
- **Ollerus**:
530545
- Build limit group enhancement
531546
- Customizable rocker amplitude
@@ -587,6 +602,7 @@ This page lists all the individual contributions to the project by their author.
587602
- Skip target scanning function calling for unarmed technos (code)
588603
- Force techno targeting in distributed frames to improve performance
589604
- Use `SkipCrushSlowdown=true` to avoid the bug related to `Accelerates=true` and `MovementZone=CrushAll`
605+
- Auto deploy for GI-like infantry
590606
- **solar-III (凤九歌)**
591607
- Target scanning delay customization (documentation)
592608
- Skip target scanning function calling for unarmed technos (documentation)
@@ -603,7 +619,7 @@ This page lists all the individual contributions to the project by their author.
603619
- Superweapon launch site & availability code
604620
- AI vehicle production update code
605621
- parts of TechnoType conversion placeholder code
606-
- **ststl, FlyStar, NaotoYuuki, Saigyouji, JunJacobYoung** - Digital Display
622+
- **ststl, FlyStar, NaotoYuuki, Saigyouji, JunJacobYoung, CrimRecya** - Digital Display
607623
- **SukaHati (Erzoid)** - Minimum interceptor guard range
608624
- **E1 Elite** - TileSet 255 and above bridge repair fix
609625
- **AutoGavy** - interceptor logic, Warhead critical hit logic

Phobos.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
<ClCompile Include="src\Utilities\Debug.cpp" />
181181
<ClCompile Include="src\Ext\BuildingType\Body.cpp" />
182182
<ClCompile Include="src\Ext\BuildingType\Hooks.cpp" />
183+
<ClCompile Include="src\Ext\BuildingType\Hooks.Placing.cpp" />
183184
<ClCompile Include="src\Ext\WarheadType\Body.cpp" />
184185
<ClCompile Include="src\Ext\WarheadType\Hooks.cpp" />
185186
<ClCompile Include="src\Misc\FlyingStrings.cpp" />
@@ -197,8 +198,10 @@
197198
<ClCompile Include="src\Phobos.CRT.cpp" />
198199
<ClCompile Include="src\Phobos.Ext.cpp" />
199200
<ClCompile Include="src\Phobos.INI.cpp" />
201+
<ClCompile Include="src\Phobos.Save.cpp" />
200202
<ClCompile Include="src\Phobos.cpp" />
201203
<ClCompile Include="src\Utilities\ShapeTextPrinter.cpp" />
204+
<ClCompile Include="src\Utilities\SpawnerHelper.cpp" />
202205
<ClCompile Include="src\Utilities\Stream.cpp" />
203206
<ClCompile Include="src\Utilities\Constructs.cpp" />
204207
<ClCompile Include="src\Utilities\EnumFunctions.cpp" />
@@ -292,6 +295,7 @@
292295
<ClInclude Include="src\Utilities\Savegame.h" />
293296
<ClInclude Include="src\Utilities\SavegameDef.h" />
294297
<ClInclude Include="src\Utilities\ShapeTextPrinter.h" />
298+
<ClInclude Include="src\Utilities\SpawnerHelper.h" />
295299
<ClInclude Include="src\Utilities\Stream.h" />
296300
<ClInclude Include="src\Utilities\Swizzle.h" />
297301
<ClInclude Include="src\Phobos.COM.h" />

docs/AI-Scripting-and-Mapping.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RepairBaseNodes= ; List of 3 booleans indicating whether AI re
4949

5050
### Default loading screen and briefing offsets
5151

52-
- It is now possible to set defaults for singleplayer map loading screen briefing pixel offsets and the loading screen images and palette that are used if there are no values defined for the map itself.
52+
- It is now possible to set defaults for singleplayer map loading screen briefing pixel offsets and the loading screen images and palette that are used if there are no values defined for the map itself or in case of loading screens and palette, if the files are missing.
5353

5454
In `missionmd.ini`:
5555
```ini
@@ -498,7 +498,12 @@ This category is empty for now.
498498

499499
### `500` Save Game
500500

501-
- Save the current game immediately (singleplayer game only).
501+
- Save the current game immediately.
502+
503+
```{note}
504+
For this action to work in multiplayer - you need to use a version of [YRpp spawner](https://github.com/CnCNet/yrpp-spawner) with multiplayer saves support.
505+
```
506+
502507
- These vanilla CSF entries will be used: `TXT_SAVING_GAME`, `TXT_GAME_WAS_SAVED` and `TXT_ERROR_SAVING_GAME`.
503508
- The save's description will look like `MapDescName - CSFText`.
504509
- For example: `Allied Mission 25: Esther's Money - Money Stolen`.

docs/Fixed-or-Improved-Logics.md

Lines changed: 120 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
253253
- Fixed the bug that Locomotor warhead won't stop working when firer (except for vehicle) stop firing.
254254
- Fixed the bug that hover vehicle will sink if destroyed on bridge.
255255
- Fixed the fact that when the selected unit is in a rearmed state, it can unconditionally use attack mouse on the target.
256+
- When `Speed=0` or the TechnoTypes cell cannot move due to `MovementRestrictedTo`, vehicles cannot attack targets beyond the weapon's range. `Area Guard` and `Hunt` missions will also become ineffective.
257+
- Fixed an issue that barrel anim data will be incorrectly overwritten by turret anim data if the techno's section exists in the map file.
258+
- Fixed pathfinding crashes (EIP 0x42A525, 0x42C507, 0x42C554) that happened on bigger maps due to too small pathfinding node buffer.
256259

257260
## Fixes / interactions with other extensions
258261

@@ -274,6 +277,19 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
274277
- Fixed an issue where some units crashed after the deployment transformation.
275278
- Fixed the bug that AlphaImage remained after unit entered tunnel.
276279
- Fixed an issue where Ares' `Convert.Deploy` triggers repeatedly when the unit is turning or moving.
280+
- The game now automatically changes save file name from `SAVEGAME.NET` to `SVGM_XXX.NET` (where `XXX` is a number) when saving to prevent occasional overwriting of the save file when using Phobos with XNA CnCNet Client and saving too frequently.
281+
- 1000 save files are supported, from `SVGM_000.NET` to `SVGM_999.NET`. When the limit is reached, the game will overwrite the latest save file.
282+
- The previous `SVGM_XXX.NET` files are cleaned up before first copy if it's a new game, otherwise the highest numbered `SVGM_XXX.NET` file is found and the index is incremented, if possible.
283+
- The game also automatically copies `spawn.ini` to the save folder as `spawnSG.ini` when saving a game.
284+
285+
286+
```{note}
287+
The described behavior is a replica of and is compliant with XNA CnCNet Client's multiplayer save game support.
288+
```
289+
290+
```{note}
291+
At the moment this is only useful if you use a version of [YRpp Spawner](https://github.com/CnCNet/yrpp-spawner) with multiplayer saves support (along with [XNA CnCNet Client](https://github.com/CnCNet/xna-cncnet-client)).
292+
```
277293

278294
## Aircraft
279295

@@ -473,6 +489,27 @@ HideIfNoOre.Threshold=0 ; integer, minimal ore growth stage
473489

474490
## Buildings
475491

492+
### AI base construction modification
493+
494+
- AI can now have some new behaviors.
495+
- `AIAutoDeployMCV` controls whether AI will still automatically deploy the mcv after owning a construction yard.
496+
- `AISetBaseCenter` controls whether AI will still set the newly deployed construction yard as the base center after owning a construction yard.
497+
- `AIBiasSpawnCell` controls whether AI will preferentially select the construction yard close to the birth point as the base center (useless in campaign).
498+
- `AIForbidConYard` controls whether AI cannot place buildings with `ConstructionYard=true`. AI will try to build one after a construction yard is destroyed but will not put it down. After that, it will continue to build other buildings. Building a construction yard will still take some time. You can try to reduce the build time of it.
499+
- `AINodeWallsOnly` controls whether AI can only automatically connect adjacent walls when there are wall base nodes around.
500+
- `AICleanWallNode` controls whether AI cannot place walls when there are no `ProtectWithWall` buildings around. If it cannot be placed, this base node will also be removed.
501+
502+
In `rulesmd.ini`:
503+
```ini
504+
[AI]
505+
AIAutoDeployMCV=true ; boolean
506+
AISetBaseCenter=true ; boolean
507+
AIBiasSpawnCell=false ; boolean
508+
AIForbidConYard=false ; boolean
509+
AINodeWallsOnly=false ; boolean
510+
AICleanWallNode=false ; boolean
511+
```
512+
476513
### Aircraft docking direction
477514

478515
- It is now possible to customize the landing direction for docking aircraft via `AircraftDockingDir(N)` (`N` optionally replaced by 0-based index for each `DockingOffset` separately, `AircraftDockingDir` and `AircraftDockingDir0` are synonymous and will be used if direction is not set for a specific offset) on the dock building. This overrides the aircraft's own [landing direction](#landing-direction) setting and defaults to `[AudioVisual] -> PoseDir`.
@@ -691,6 +728,19 @@ BuildingWaypoints=false ; boolean
691728

692729
## Infantry
693730

731+
### Auto deploy for GI-like infantry
732+
733+
- In RA2, the GI-like infantry controlled by the AI will automatically deploy to use their more powerful secondary weapons when engaging the enemy. This feature was broken in Yuri’s Revenge. Now you can use the following flags to re-enable this feature.
734+
735+
In `rulesmd.ini`:
736+
```ini
737+
[General]
738+
InfantryAutoDeploy=false ; boolean
739+
740+
[SOMEINFANTRY] ; InfantryType
741+
InfantryAutoDeploy= ; boolean, default to [General] -> InfantryAutoDeploy
742+
```
743+
694744
### Prone speed customization
695745

696746
- In vanilla, infantry has hardcoded prone speed. Now you can customize it.
@@ -799,6 +849,16 @@ In `rulesmd.ini`:
799849
Gravity=6.0 ; floating point value
800850
```
801851

852+
### Customizing initial facing behavior
853+
854+
- Previously projectiles that had `Voxel=true` images were hardcoded to have downwards initial trajectory. This behavior can now be toggled on for other types of projectiles or disabled for voxel projectiles. In addition to defaulting to `true` for `Voxel=true` projectiles, it also now defaults to true for any `Vertical=true` projectile.
855+
856+
In `rulesmd.ini`:
857+
```ini
858+
[SOMEPROJECTILE] ; Projectile
859+
VerticalInitialFacing= ; boolean
860+
```
861+
802862
### FlakScatter distance customization
803863

804864
- By default `FlakScatter=true` makes `Inviso=true` projectiles scatter within a distance range calculated as `[Minimum * 2, Maximum * 2]` in cells, where the Minimum is 0 and Maximum is `[CombatDamage] -> BallisticScatter`, resulting in a range of `0` to `2 * BallisticScatter` cells. This behavior can now be customized using `BallisticScatter.Min` to set the Minimum value and `BallisticScatter.Max` to set the Maximum value. If not set, the default values are used. When estimating the actual scatter range, remember that the original `*2` multiplier mechanism still applies.
@@ -1239,6 +1299,19 @@ IronCurtain.ExtraTintIntensity=0.0 ; floating point value
12391299
ForceShield.ExtraTintIntensity=0.0 ; floating point value
12401300
```
12411301

1302+
### Jumpjet climbing logic enhancement
1303+
1304+
- You can now let the jumpjets increase their height earlier by set `JumpjetClimbPredictHeight` to true. The jumpjet will raise its height 5 cells in advance, instead of only raising its height when encountering cliffs or buildings in front of it.
1305+
- You can also let them simply skip the stop check by set `JumpjetClimbWithoutCutOut` to true. The jumpjet will not stop moving horizontally when encountering cliffs or buildings in front of it, but will continue to move forward while raising its altitude.
1306+
- When `JumpjetClimbPredictHeight` is enabled, if the height raised five grids in advance is still not enough to cross cliffs or buildings, it will stop and move horizontally as before, unless `JumpjetClimbWithoutCutOut` is also enabled.
1307+
1308+
In `rulesmd.ini`:
1309+
```ini
1310+
[General]
1311+
JumpjetClimbPredictHeight=false ; boolean
1312+
JumpjetClimbWithoutCutOut=false ; boolean
1313+
```
1314+
12421315
### Jumpjet rotating on crashing toggle
12431316

12441317
- Jumpjet that is going to crash starts to change its facing uncontrollably, this can now be turned off.
@@ -1609,6 +1682,20 @@ BunkerableAnyway=false ; boolean
16091682
Skipping checks with this feature doesn't mean that vehicles and tank bunkers will interact correctly. Following the simple checks performed by the provider of this feature, bunkerability is mainly determined by Locomotor. The details about locomotors' bunkerability can be found on [ModEnc](https://modenc.renegadeprojects.com/Bunkerable).
16101683
```
16111684

1685+
### Customize harvester dump amount
1686+
1687+
- Now you can limit how much ore the harvester can dump out per time, like it in Tiberium Sun.
1688+
- Less than or equal to 0 means no limit, it will always dump out all at one time.
1689+
1690+
In `rulesmd.ini`:
1691+
```ini
1692+
[General]
1693+
HarvesterDumpAmount=0.0 ; float point value
1694+
1695+
[SOMEVEHICLE] ; VehicleType
1696+
HarvesterDumpAmount= ; float point value
1697+
```
1698+
16121699
### Customizing crushing tilt and slowdown
16131700

16141701
- Vehicles with `Crusher=true` and `OmniCrusher=true` / `MovementZone=CrusherAll` were hardcoded to tilt when crushing vehicles / walls respectively. This now obeys `TiltsWhenCrushes` but can be customized individually for these two scenarios using `TiltsWhenCrusher.Vehicles` and `TiltsWhenCrusher.Overlays`, which both default to `TiltsWhenCrushes`.
@@ -1758,6 +1845,33 @@ Sinkable.SquidGrab=true ; boolean
17581845

17591846
- Setting VehicleType `Speed` to 0 now makes game treat them as stationary, behaving in very similar manner to deployed vehicles with `IsSimpleDeployer` set to true. Should not be used on buildable vehicles, as they won't be able to exit factories.
17601847

1848+
### Turret recoil
1849+
1850+
- Now you can use `TurretRecoil` to control units’ turret/barrel recoil effect when firing.
1851+
- `TurretTravel` and `BarrelTravel` control the maximum recoil distance.
1852+
- `TurretRecoil.Suppress` can prevent the weapon from producing this effect when firing.
1853+
1854+
In `rulesmd.ini`:
1855+
```ini
1856+
[SOMEVEHICLE] ; VehicleType
1857+
TurretRecoil=no ; boolean
1858+
TurretTravel=2 ; integer, pixels
1859+
TurretCompressFrames=1 ; integer, game frames
1860+
TurretHoldFrames=1 ; integer, game frames
1861+
TurretRecoverFrames=1 ; integer, game frames
1862+
BarrelTravel=2 ; integer, pixels
1863+
BarrelCompressFrames=1 ; integer, game frames
1864+
BarrelHoldFrames=1 ; integer, game frames
1865+
BarrelRecoverFrames=1 ; integer, game frames
1866+
1867+
[SOMEWEAPON] ; WeaponType
1868+
TurretRecoil.Suppress=no ; boolean
1869+
```
1870+
1871+
```{note}
1872+
The logic above was not reverse-engineered but reimplemented to achieve the same effect, hence there might be some differences in behavior compared to Tiberian Sun version.
1873+
```
1874+
17611875
### Unit Without Turret Always Turn To Target
17621876

17631877
- Now vehicles without turret will attempt to turn to the target while the weapon is cooling down, rather than after the weapon has cooled down, by setting `NoTurret.TrackTarget` to true.
@@ -1791,20 +1905,6 @@ In `artmd.ini`:
17911905
TurretShadow= ; boolean
17921906
```
17931907

1794-
### Customize harvester dump amount
1795-
1796-
- Now you can limit how much ore the harvester can dump out per time, like it in Tiberium Sun.
1797-
- Less than or equal to 0 means no limit, it will always dump out all at one time.
1798-
1799-
In `rulesmd.ini`:
1800-
```ini
1801-
[General]
1802-
HarvesterDumpAmount=0.0 ; float point value
1803-
1804-
[SOMEVEHICLE] ; VehicleType
1805-
HarvesterDumpAmount= ; float point value
1806-
```
1807-
18081908
## Veinholes & Weeds
18091909

18101910
### Veinholes
@@ -2025,14 +2125,19 @@ In `rulesmd.ini`:
20252125
DecloakDamagedTargets=true ; boolean
20262126
```
20272127

2028-
### Customizing parasite culling targets
2128+
### Customizing parasite
20292129

20302130
- Now you can specify which targets the parasite will culling them.
2131+
- Squid grapple anim is hardcoded to use `SQDG` in vanilla, Now you can choose it.
20312132

20322133
In `rulesmd.ini`:
20332134
```ini
2135+
[AudioVisual]
2136+
Parasite.GrappleAnim= ; animation
2137+
20342138
[SOMEWARHEAD] ; WarheadType
20352139
Parasite.CullingTarget=infantry ; List of Affected Target Enumeration (none|aircraft|infantry|units|all)
2140+
Parasite.GrappleAnim= ; animation
20362141
```
20372142

20382143
### Delay automatic attack on the controlled unit

0 commit comments

Comments
 (0)