Skip to content

Commit e74378a

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into origin/ae-attach-discard-by-health-3
# Conflicts: # docs/New-or-Enhanced-Logics.md # docs/Whats-New.md # src/New/Entity/AttachEffectClass.cpp # src/New/Entity/ShieldClass.cpp # src/New/Type/AttachEffectTypeClass.cpp # src/New/Type/AttachEffectTypeClass.h
2 parents a7db33e + 75b447a commit e74378a

File tree

102 files changed

+5363
-4196
lines changed

Some content is hidden

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

102 files changed

+5363
-4196
lines changed

CREDITS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ This page lists all the individual contributions to the project by their author.
416416
- Customize limit when engineer repair a building
417417
- Fix the bug that damaged particle dont disappear after building has repaired by engineer
418418
- Display banner improvement
419+
- Electric/RadBeam trail for laser tails
419420
- **Apollo** - Translucent SHP drawing patches
420421
- **ststl**:
421422
- Customizable `ShowTimer` priority of superweapons
@@ -496,6 +497,7 @@ This page lists all the individual contributions to the project by their author.
496497
- Fix an issue that the widespread damage caused by detonation on the bridge/ground cannot affect objects on the ground/bridge who are in the opposite case
497498
- Several new Infotypes, no display in specific status and a new single frame display method
498499
- Customizable spawn delay of `VoxelAnim`'s `TrailerAnim` and fix its incorrect position
500+
- Add `DebrisMinimums` to keep the count of debris within a certain range
499501
- **Ollerus**:
500502
- Build limit group enhancement
501503
- Customizable rocker amplitude
@@ -549,6 +551,8 @@ This page lists all the individual contributions to the project by their author.
549551
- Customize the scatter caused by aircraft attack mission
550552
- Customize whether `Crater=yes` animation would destroy tiberium
551553
- Targeting limitation for berzerk technos
554+
- Allows refineries to use multiple ActiveAnim simultaneously
555+
- Several attackmove related enhancement
552556
- **tyuah8**:
553557
- Drive/Jumpjet/Ship/Teleport locomotor did not power on when it is un-piggybacked bugfix
554558
- Destroyed unit leaves sensors bugfix

Phobos.vcxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<ItemGroup>
2121
<ClCompile Include="src\Ext\Infantry\Hooks.Firing.cpp" />
2222
<ClCompile Include="src\Ext\Unit\Hooks.Firing.cpp" />
23+
<ClCompile Include="src\Ext\EBolt\Body.cpp" />
24+
<ClCompile Include="src\Ext\EBolt\Hooks.cpp" />
2325
<ClCompile Include="src\New\Type\Affiliated\CreateUnitTypeClass.cpp" />
2426
<ClCompile Include="src\Blowfish\blowfish.cpp" />
2527
<ClCompile Include="src\Blowfish\Hooks.Blowfish.cpp" />
@@ -167,7 +169,6 @@
167169
<ClCompile Include="src\Ext\VoxelAnim\Body.cpp" />
168170
<ClCompile Include="src\Ext\VoxelAnim\Hooks.cpp" />
169171
<ClCompile Include="src\Ext\WeaponType\Body.cpp" />
170-
<ClCompile Include="src\Ext\WeaponType\Hook.EBolt.cpp" />
171172
<ClCompile Include="src\Ext\WeaponType\Hooks.cpp" />
172173
<ClCompile Include="src\Ext\WeaponType\Hooks.DiskLaserRadius.cpp" />
173174
<ClCompile Include="src\Misc\BlittersFix.cpp" />
@@ -206,6 +207,7 @@
206207
<ClCompile Include="YRpp\StaticInits.cpp" />
207208
</ItemGroup>
208209
<ItemGroup>
210+
<ClInclude Include="src\Ext\EBolt\Body.h" />
209211
<ClInclude Include="src\New\Type\Affiliated\CreateUnitTypeClass.h" />
210212
<ClInclude Include="src\Blowfish\blowfish.h" />
211213
<ClInclude Include="src\Ext\Cell\Body.h" />

docs/AI-Scripting-and-Mapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ ID=ActionCount,[Action1],608,0,0,[HouseIndex],0,0,0,A,[ActionX]
666666
...
667667
```
668668

669-
###`800-802` Display Banner
669+
### `800-802` Display Banner
670670

671671
- Display a 'banner' at a fixed location that is relative to the screen.
672672
- Action `800` will create a new banner or replace the banner with the same Banner ID if it exists. Using a local variable's value when displaying a text banner.

docs/Fixed-or-Improved-Logics.md

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
1414
- Fixed the bug when units are already dead but still in map (for sinking, crashing, dying animation, etc.), they could die again.
1515
- Fixed the bug when cloaked Desolator was unable to fire his deploy weapon.
1616
- Fixed the bug that temporaryed unit cannot be erased correctly and no longer raise an error.
17-
- Fixed `DebrisMaximums` (spawned debris type amounts cannot go beyond specified maximums anymore). Only applied when `DebrisMaximums` values amount is more than 1 for compatibility reasons.
1817
- Fixed building and defense tab hotkeys not enabling the placement mode after *Cannot build here.* triggered and the placement mode cancelled.
1918
- Fixed buildings with `UndeployInto` playing `EVA_NewRallypointEstablished` on undeploying.
2019
- Fixed buildings with `Naval=yes` ignoring `WaterBound=no` to be forced to place onto water.
@@ -330,15 +329,17 @@ LandingDir= ; Direction type (integers from 0-255). Accepts negative values
330329
- `Weapon` can be set to a WeaponType, to create a projectile and immediately detonate it instead of simply dealing `Damage` by `Warhead`. This allows weapon effects to be applied.
331330
- `Damage.Delay` determines delay between two applications of `Damage`. Requires `Damage` to be set to 1.0 or above. Value of 0 disables the delay. Keep in mind that this is measured in animation frames, not game frames. Depending on `Rate`, animation may or may not advance animation frames on every game frame.
332331
- `Damage.DealtByInvoker`, if set to true, makes any `Damage` dealt to be considered as coming from the animation's invoker (f.ex, firer of the weapon if it is Warhead `AnimList/SplashList` animation, the destroyed vehicle if it is `DestroyAnim` animation or the object the animation is attached to). If invoker has died or does not exist, the house the invoker belonged to is still used to deal damage and apply Phobos-introduced Warhead effects. Does not affect which house the `Damage` dealt by `Warhead` is dealt by.
332+
- `Damage.ApplyFirepowerMult` determines whether or not firepower modifiers from the animation's invoker are applied on the damage dealt from this animation, if exists.
333333
- `Damage.ApplyOncePerLoop`, if set to true, makes `Damage` be dealt only once per animation loop (on single loop animations, only once, period) instead of on every frame or intervals defined by `Damage.Delay`. The frame on which it is dealt is determined by `Damage.Delay`, defaulting to after the first animation frame.
334334

335335
In `artmd.ini`:
336336
```ini
337-
[SOMEANIM] ; AnimationType
338-
Weapon= ; WeaponType
339-
Damage.Delay=0 ; integer, animation frames
340-
Damage.DealtByInvoker=false ; boolean
341-
Damage.ApplyOncePerLoop=false ; boolean
337+
[SOMEANIM] ; AnimationType
338+
Weapon= ; WeaponType
339+
Damage.Delay=0 ; integer, animation frames
340+
Damage.DealtByInvoker=false ; boolean
341+
Damage.ApplyOncePerLoop=false ; boolean
342+
Damage.ApplyFirepowerMult=false ; boolean
342343
```
343344

344345
```{note}
@@ -458,6 +459,16 @@ In `rulesmd.ini`:
458459
AircraftDockingDir(N)= ; Direction type (integers from 0-255)
459460
```
460461

462+
### Allows refineries to use multiple ActiveAnim simultaneously
463+
464+
- In vanilla, the refinery uses different ActiveAnims depending on the storage. You can now make it use multiple ActiveAnims simultaneously like any other building.
465+
466+
In `artmd.ini`:
467+
```ini
468+
[SOMEBUILDING] ; BuildingType
469+
Refinery.UseNormalActiveAnim=false ; boolean
470+
```
471+
461472
### Allowed / disallowed types for FactoryPlant
462473

463474
- It is now possible to customize which TechnoTypes benefit from bonuses of a `FactoryPlant=true` building by listing them on `FactoryPlant.AllowTypes` and/or `FactoryPlant.DisallowTypes`.
@@ -568,10 +579,10 @@ Grinding.Weapon.RequiredCredits=0 ; integer
568579

569580
In `rulesmd.ini`:
570581
```ini
571-
[SOMEWARHEAD]
582+
[SOMEWARHEAD] ; WarheadType
572583
ElectricAssaultLevel=1 ; integer
573584

574-
[SOMEBUILDING]
585+
[SOMEBUILDING] ; BuildingType
575586
Overpower.KeepOnline=2 ; integer, negative values mean that cannot keep online
576587
Overpower.ChargeWeapon=1 ; integer, negative values mean that weapons can never be switched
577588
```
@@ -1106,6 +1117,27 @@ DamagedSpeed=0.75 ; floating point value, multiplier
11061117
DamagedSpeed= ; floating point value, multiplier
11071118
```
11081119

1120+
### Debris voxel animations limitation
1121+
1122+
- Now, the original `DebrisMaximums` can be used in conjunction with new `DebrisMinimums` to limit the quantity of `DebrisTypes` when `DebrisTypes.Limit` is enabled.
1123+
- The default value of `DebrisTypes.Limit` is whether the number of `DebrisMaximums` is greater than (not equal to) 1 (for compatibility reasons).
1124+
1125+
In `rulesmd.ini`:
1126+
```ini
1127+
[SOMETECHNO] ; TechnoType
1128+
DebrisTypes.Limit= ; boolean
1129+
DebrisMaximums= ; List of integers
1130+
DebrisMinimums= ; List of integers
1131+
```
1132+
1133+
```{hint}
1134+
How to generate `DebrisTypes` in the game:
1135+
1. Generate the total number of debris through `MaxDebris` and `MinDebris` first.
1136+
2. Traverse `DebrisTypes` and limit the quantity range through `DebrisMaximums` and `DebrisMinimums`.
1137+
3. When the number of generated debris will exceeds the total number, limit the quantity and end the traversal.
1138+
4. When the number of debris generated after a single traversal is not enough to exceed the total number, it will end if `DebrisTypes.Limit` is enabled, otherwise the traversal will restart like vanilla game do.
1139+
```
1140+
11091141
### Exploding object customizations
11101142

11111143
- By default `Explodes=true` TechnoTypes have all of their passengers killed when they are destroyed. This behaviour can now be disabled by setting `Explodes.KillPassengers=false`.
@@ -1600,7 +1632,7 @@ In `rulesmd.ini`:
16001632
[General]
16011633
HarvesterScanAfterUnload=false ; boolean
16021634

1603-
[SOMEVEHICLE]
1635+
[SOMEVEHICLE] ; VehicleType
16041636
HarvesterScanAfterUnload= ; boolean, default to [General] -> HarvesterScanAfterUnload
16051637
```
16061638

@@ -1701,7 +1733,7 @@ In `rulesmd.ini`:
17011733
[General]
17021734
HarvesterDumpAmount=0.0 ; float point value
17031735

1704-
[SOMEVEHICLE]
1736+
[SOMEVEHICLE] ; VehicleType
17051737
HarvesterDumpAmount= ; float point value
17061738
```
17071739

@@ -1846,6 +1878,19 @@ DebrisAnims= ; List of AnimationTypes
18461878
Debris.Conventional=false ; boolean
18471879
```
18481880

1881+
### Custom debris voxel animations limitation
1882+
1883+
- Now, the original `DebrisMaximums` can be used in conjunction with new `DebrisMinimums` to limit the quantity of `DebrisTypes` when `DebrisTypes.Limit` is enabled.
1884+
- The default value of `DebrisTypes.Limit` is whether the number of `DebrisMaximums` is greater than (not equal to) 1 (for compatibility reasons).
1885+
1886+
In `rulesmd.ini`:
1887+
```ini
1888+
[SOMEWARHEAD] ; WarheadType
1889+
DebrisTypes.Limit= ; boolean
1890+
DebrisMaximums= ; List of integers
1891+
DebrisMinimums= ; List of integers
1892+
```
1893+
18491894
### Customizable rocker amplitude
18501895

18511896
- The rocker amplitude of warheads with `Rocker=yes` used to be determined by `Damage` value of the weapon. You can now override it with fixed value and add a multiplier to it.

docs/New-or-Enhanced-Logics.md

Lines changed: 70 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ ReflectDamage.UseInvokerAsOwner=false ; boolean
190190
DisableWeapons=false ; boolean
191191
Unkillable=false ; boolean
192192
PreventNegativeDamage=false ; boolean
193+
LaserTrail.Type= ; lasertrail type
193194
Groups= ; comma-separated list of strings (group IDs)
194195

195196
[SOMETECHNO] ; TechnoType
@@ -282,22 +283,36 @@ Due to performance concerns, unless any radiation type has `RadApplicationDelay.
282283

283284
- Technos, Projectiles, and VoxelAnims can now have colorful trails of different transparency, thickness and color, which are drawn via laser drawing code.
284285
- Technos, Projectiles, and VoxelAnims can have multiple laser trails. For technos each trail can have custom laser trail type and FLH offset relative to turret and body.
286+
- LaserTrail can also be drawn as EBolt or RadBeam.
285287

286288
In `artmd.ini`:
287289
```ini
288290
[LaserTrailTypes]
289291
0=SOMETRAIL
290292

291293
[SOMETRAIL] ; LaserTrailType name
292-
IsHouseColor=false ; boolean
293-
Color=255,0,0 ; integer - R,G,B
294-
FadeDuration=64 ; integer
295-
Thickness=4 ; integer
294+
DrawType=laser ; laser trail type (laser | ebolt | radbeam)
295+
FadeDuration= ; integer, default to 64 for laser, 17 for ebolt, 15 for radbeam
296296
SegmentLength=128 ; integer, minimal length of each trail segment
297297
IgnoreVertical=false ; boolean, whether the trail won't be drawn on vertical movement
298-
IsIntense=false ; boolean, whether the laser is "supported" (AKA prism forwarding)
299298
CloakVisible=false ; boolean, whether the laser is visible when the attached unit is cloaked
300299
CloakVisible.DetectedOnly=false ; boolean, whether CloakVisible=true laser is visible only to those who can detect the attached unit
300+
; laser
301+
Color=255,0,0 ; integer - R,G,B
302+
IsHouseColor=false ; boolean
303+
Thickness=4 ; integer
304+
IsIntense=false ; boolean, whether the laser is "supported" (AKA prism forwarding)
305+
; ebolt
306+
IsAlternateColor=false ; boolean
307+
Bolt.Color1= ; integer - R,G,B
308+
Bolt.Disable1=false ; boolean
309+
Bolt.Color2= ; integer - R,G,B
310+
Bolt.Disable2=false ; boolean
311+
Bolt.Color3= ; integer - R,G,B
312+
Bolt.Disable3=false ; boolean
313+
; radbeam
314+
Beam.Color= ; integer - R,G,B
315+
Beam.Amplitude=40.0 ; floating point value
301316

302317
[SOMEPROJECTILE] ; Projectile Image
303318
LaserTrail.Types=SOMETRAIL ; List of LaserTrailTypes
@@ -311,8 +326,8 @@ LaserTrailN.IsOnTurret=false ; boolean, whether the trail origin is turret
311326

312327
In `rulesmd.ini`:
313328
```ini
314-
[SOMEVOXELANIM] ; VoxelAnim
315-
LaserTrail.Types=SOMETRAIL ; List of LaserTrailTypes
329+
[SOMEVOXELANIM] ; VoxelAnim
330+
LaserTrail.Types=SOMETRAIL ; List of LaserTrailTypes
316331
```
317332

318333
```{warning}
@@ -1204,6 +1219,54 @@ AttackMove.Aggressive= ; boolean, default to [General] -> AttackMove.Agg
12041219
AttackMove.UpdateTarget= ; boolean, default to [General] -> AttackMove.UpdateTarget
12051220
```
12061221

1222+
### Attack move - behavior when target acquired
1223+
1224+
- Now you can make attack-moving units stop moving when they spot an enemy using `AttackMove.StopWhenTargetAcquired`. This is more like the attack move behavior in Starcraft and Warcraft.
1225+
- This feature is used to prevent units from charging forward and taking more damage during an attack move command.
1226+
- You can also make them keep chasing on the spotted target using `AttackMove.PursuitTarget`.
1227+
- This feature should be useful for close range units like ZEP.
1228+
1229+
1230+
In `rulesmd.ini`:
1231+
```ini
1232+
[General]
1233+
AttackMove.StopWhenTargetAcquired= ; boolean
1234+
1235+
[SOMETECHNO] ; TechnoType
1236+
AttackMove.StopWhenTargetAcquired= ; boolean, default to [General] -> AttackMove.StopWhenTargetAcquired if set, inverse of OpportunityFire otherwise.
1237+
AttackMove.PursuitTarget= ; boolean
1238+
```
1239+
1240+
```{note}
1241+
1. Many units would have stopped when they found an enemy during an attack move command already. This behavior is independent from `AttackMove.StopWhenTargetAcquired`.
1242+
2. Some units (f.ex. jumpjets) will not fire correctly under the vanilla attack move command. The exact reason is not clear, but this feature can fix this problem.
1243+
3. Jumpjets with `AttackMove.StopWhenTargetAcquired=true` will stop immediatly and not scatter to a cell. This is designed for practical reason.
1244+
```
1245+
1246+
### Attack move - follow
1247+
1248+
- Now you can have some units following surrounding units when executing an attack move command. The follow behavior is equivalent to the behavior of follow command (`ctrl + alt`).
1249+
- Use `AttackMove.Follow.IncludeAir` to determine whether the follower will follow an air unit.
1250+
- This feature should be useful for supportive units such as medics and repairers.
1251+
1252+
In `rulesmd.ini`:
1253+
```ini
1254+
[SOMETECHNO] ; TechnoType
1255+
AttackMove.Follow=false ; boolean
1256+
AttackMove.Follow.IncludeAir=false ; boolean
1257+
```
1258+
1259+
### Attack move - without weapon
1260+
1261+
- In vanilla, attack move command is not allowed to be given to units without weapons. Now you can disable this hardcoded behavior using `AttackMove.IgnoreWeaponCheck=true`.
1262+
- Unarmed units cannot actually execute attack move commands. This feature is to prevent the attack move pointer from being disabled when you select unarmed units and other units at the same time.
1263+
1264+
In `rulesmd.ini`:
1265+
```ini
1266+
[General]
1267+
AttackMove.IgnoreWeaponCheck=false ; boolean
1268+
```
1269+
12071270
### Aircraft spawner customizations
12081271

12091272
![image](_static/images/spawnrange-01.gif)

docs/User-Interface.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -699,35 +699,35 @@ Positional superweapon hotkeys are an experimental feature and currently the use
699699
In `uimd.ini`:
700700
```ini
701701
[Sidebar]
702-
SuperWeaponSidebar=false ; boolean
703-
SuperWeaponSidebar.Pyramid=true ; boolean
704-
SuperWeaponSidebar.Interval=0 ; integer, pixels
705-
SuperWeaponSidebar.LeftOffset=0 ; integer, pixels
706-
SuperWeaponSidebar.CameoHeight=48 ; integer, pixels
707-
SuperWeaponSidebar.Max=0 ; integer
708-
SuperWeaponSidebar.MaxColumns= ; integer
702+
SuperWeaponSidebar=false ; boolean
703+
SuperWeaponSidebar.Pyramid=true ; boolean
704+
SuperWeaponSidebar.Interval=0 ; integer, pixels
705+
SuperWeaponSidebar.LeftOffset=0 ; integer, pixels
706+
SuperWeaponSidebar.CameoHeight=48 ; integer, pixels
707+
SuperWeaponSidebar.Max=0 ; integer
708+
SuperWeaponSidebar.MaxColumns= ; integer
709709
```
710710

711711
In `rulesmd.ini`:
712712
```ini
713713
[GlobalControls]
714-
SuperWeaponSidebarKeysEnabled=false ; boolean
714+
SuperWeaponSidebarKeysEnabled=false ; boolean
715715

716716
[AudioVisual]
717-
SuperWeaponSidebar.AllowByDefault=false ; boolean
718-
719-
[SOMESIDE]
720-
SuperWeaponSidebar.OnPCX= ; filename - including the .pcx extension
721-
SuperWeaponSidebar.OffPCX= ; filename - including the .pcx extension
722-
SuperWeaponSidebar.TopPCX= ; filename - including the .pcx extension
723-
SuperWeaponSidebar.CenterPCX= ; filename - including the .pcx extension
724-
SuperWeaponSidebar.BottomPCX= ; filename - including the .pcx extension
725-
726-
[SOMESW]
727-
SuperWeaponSidebar.Allow= ; boolean
728-
SuperWeaponSidebar.PriorityHouses= ; List of house types
729-
SuperWeaponSidebar.RequiredHouses= ; List of house types
730-
SuperWeaponSidebar.Significance=0 ; integer
717+
SuperWeaponSidebar.AllowByDefault=false ; boolean
718+
719+
[SOMESIDE] ; Side
720+
SuperWeaponSidebar.OnPCX= ; filename - including the .pcx extension
721+
SuperWeaponSidebar.OffPCX= ; filename - including the .pcx extension
722+
SuperWeaponSidebar.TopPCX= ; filename - including the .pcx extension
723+
SuperWeaponSidebar.CenterPCX= ; filename - including the .pcx extension
724+
SuperWeaponSidebar.BottomPCX= ; filename - including the .pcx extension
725+
726+
[SOMESW] ; SuperWeaponType
727+
SuperWeaponSidebar.Allow= ; boolean
728+
SuperWeaponSidebar.PriorityHouses= ; List of house types
729+
SuperWeaponSidebar.RequiredHouses= ; List of house types
730+
SuperWeaponSidebar.Significance=0 ; integer
731731
```
732732

733733
In `RA2MD.INI`:

docs/Whats-New.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ New:
404404
- [Customize limit and sound when engineer repair a building](New-or-Enhanced-Logics.md#engineer-repair-customization) (by NetsuNegi)
405405
- [Customizable debris trailer anim spawn delay](Fixed-or-Improved-Logics.md#customizable-debris-trailer-anim-spawn-delay) (by CrimRecya)
406406
- [Display banner](AI-Scripting-and-Mapping.md#display-banner) (by Morton & ststl)
407+
- [Allows refineries to use multiple ActiveAnim simultaneously](Fixed-or-Improved-Logics.md#allows-refineries-to-use-multiple-activeanim-simultaneously) (by TaranDahl)
408+
- Electric/RadBeam trail for laser tails (by NetsuNegi)
409+
- Add `DebrisMinimums` to keep the count of debris within a certain range (by CrimRecya)
410+
- Several attackmove related enhancement (by TaranDahl)
407411
- Attached effect attach/discard by health (by Ollerus)
408412
- Attached effect with `ExtraWarheads` and `FeedbackWeapon` (by Ollerus)
409413
- [AuxWeapon](New-or-Enhanced-Logics.md#auxiliary-weapon) (by Ollerus)

0 commit comments

Comments
 (0)