Skip to content

Commit a8850ea

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into small-fix-3
# Conflicts: # src/Ext/Building/Hooks.Grinding.cpp # src/Ext/Script/Body.cpp # src/Ext/Techno/Hooks.ReceiveDamage.cpp # src/Misc/Hooks.BugFixes.cpp # src/New/Entity/AttachEffectClass.cpp
2 parents 2cd192f + 2434693 commit a8850ea

Some content is hidden

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

45 files changed

+2599
-1786
lines changed

CREDITS.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ This page lists all the individual contributions to the project by their author.
147147
- Warhead that can not kill
148148
- `Pips.HideIfNoStrength` and `SelfHealing.EnabledBy` additions for shields
149149
- Warhead activation target health thresholds enhancements
150+
- Event 606: AttachEffect is attaching to a Techno
150151
- **Starkku**:
151152
- Misc. minor bugfixes & improvements
152153
- AI script actions:
@@ -325,7 +326,7 @@ This page lists all the individual contributions to the project by their author.
325326
- Income money string indication upon ore dump
326327
- Warhead superweapon launch logic
327328
- TechnoType conversion placeholder
328-
- `606 The shield of the attached object is broken` trigger event
329+
- `600 The shield of the attached object is broken` trigger event
329330
- `RadialIndicator` observer visibility
330331
- Cloaked objects from allies displaying to player in singleplayer campaigns
331332
- Skip `NaturalParticleSystem` displaying from in-map pre-placed structures
@@ -397,7 +398,6 @@ This page lists all the individual contributions to the project by their author.
397398
- Enhanced reveal & gap warhead
398399
- Fix an issue that teleport units board transport vehicles on the bridge will create an impassable invisible barrier, which may cause the game to freeze or even crash
399400
- Fix wrong shadow when a vehicle has hover locomotor and is being lifted by `IsLocomotor=yes` warhead
400-
- Fix the bug that a unit can overlap with `Teleport` units after it's been damaged by a fallen unit lifted by `IsLocomotor=yes` warheads
401401
- Customize parasite culling targets
402402
- Customize harvester dump amount
403403
- Select box logic
@@ -500,6 +500,10 @@ This page lists all the individual contributions to the project by their author.
500500
- Several new Infotypes, no display in specific status and a new single frame display method
501501
- Customizable spawn delay of `VoxelAnim`'s `TrailerAnim` and fix its incorrect position
502502
- Add `DebrisMinimums` to keep the count of debris within a certain range
503+
- Task subtitles display in the middle of the screen
504+
- Fix an issue that `MovementZone=Fly` harvesters can not be able to enter refinery buildings manually
505+
- Fix an issue that jumpjet harvester cannot automatically go mining when leaving the weapons factory
506+
- Fix an issue that jumpjet harvester will overlap when manually entering refinery buildings and cause game crashes
503507
- **Ollerus**:
504508
- Build limit group enhancement
505509
- Customizable rocker amplitude
@@ -517,6 +521,7 @@ This page lists all the individual contributions to the project by their author.
517521
- Power plant damage factor
518522
- Allow faking digital display for `InfoType=Health` at disguise
519523
- Display banner improvement and doc
524+
- Damage multiplier for health percentage
520525
- **NaotoYuuki** - Vertical & meteor trajectory projectile prototypes
521526
- **handama** - AI script action to `16005 Jump Back To Previous Script`
522527
- **TaranDahl (航味麻酱)**:
@@ -552,6 +557,7 @@ This page lists all the individual contributions to the project by their author.
552557
- Targeting limitation for berzerk technos
553558
- Allows refineries to use multiple ActiveAnim simultaneously
554559
- Several attackmove related enhancement
560+
- Fix the bug that `OpenToppedWarpDistance` is calculated incorrectly for building target
555561
- **tyuah8**:
556562
- Drive/Jumpjet/Ship/Teleport locomotor did not power on when it is un-piggybacked bugfix
557563
- Destroyed unit leaves sensors bugfix

Phobos.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
<ClCompile Include="src\Misc\Hooks.INIInheritance.cpp" />
190190
<ClCompile Include="src\Misc\Hooks.SkirmishColors.cpp" />
191191
<ClCompile Include="src\Misc\Hooks.Overlay.cpp" />
192+
<ClCompile Include="src\Misc\Hooks.Message.cpp" />
192193
<ClCompile Include="src\New\Type\Affiliated\TypeConvertGroup.cpp" />
193194
<ClCompile Include="src\Ext\BuildingType\Hooks.Upgrade.cpp" />
194195
<ClCompile Include="src\Phobos.COM.cpp" />

docs/AI-Scripting-and-Mapping.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,3 +838,18 @@ In `mycampaign.map`:
838838
| >= 0 | The index of the current House in the map |
839839
| -1 | This value is ignored (any house is valid) |
840840
| -2 | Pick the owner of the map trigger |
841+
842+
### `606` AttachEffect is attaching to a Techno
843+
844+
- Checks if an `AttachEffectType` is attaching to a techno. Doesn't work for [attached effects](New-or-Enhanced-Logics.md#attached-effects) that were attached prior to the trigger's enabling.
845+
- To be elaborate, the event will be triggered during these occasions:
846+
- Self-owned effects: initial granted (triggered after `AttachEffect.InitialDelays` amount of frames), recreation (triggered after `AttachEffect.Delays` or `AttachEffect.RecreationDelays` amount of frames).
847+
- Effects from other sources: granted, refreshing when trying to apply the same type of attached effect to the techno.
848+
849+
In `mycampaign.map`:
850+
```ini
851+
[Events]
852+
...
853+
ID=EventCount,...,606,2,0,[AttachEffectType],...
854+
...
855+
```

docs/Fixed-or-Improved-Logics.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
214214
- Fixed an issue that teleport units board transport vehicles on the bridge will create an impassable invisible barrier, which may cause the game to freeze or even crash.
215215
- Fixed an issue that moving MCV with Teleport locomotion will cause reconnection error.
216216
- Fixed wrong shadow when a vehicle has hover locomotor and is being lifted by `IsLocomotor=yes` warhead.
217-
- Fixed the bug that a unit can overlap with `Teleport` units after it's been damaged by a fallen unit lifted by `IsLocomotor=yes` warheads.
218217
- Fixed an issue that game crashes (EIP:7FB178) when infantry are about to enter an occupiable building that has been removed and is not real dead.
219218
- Fixed an issue that game crashes when spawnee has been removed and is not real dead.
220219
- Separated the AirstrikeClass pointer between the attacker/aircraft and the target to avoid erroneous overwriting issues.
@@ -233,6 +232,10 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
233232
- Fixed the bug that `DamageSelf` and `AllowDamageOnSelf` are ineffective on airforce.
234233
- Fixed the bug that damaged particle dont disappear after building has repaired by engineer.
235234
- Fixed the issue of incorrect position of `TrailerAnim` in `VoxelAnim`.
235+
- Fixed the bug that `OpenToppedWarpDistance` is calculated incorrectly for building target.
236+
- Fixed an issue that `MovementZone=Fly` harvesters can not be able to enter refinery buildings manually.
237+
- Fixed an issue that jumpjet harvester cannot automatically go mining when leaving the weapons factory.
238+
- Fixed an issue that jumpjet harvester will overlap when manually entering refinery buildings and cause game crashes.
236239

237240
## Fixes / interactions with other extensions
238241

@@ -328,7 +331,7 @@ LandingDir= ; Direction type (integers from 0-255). Accepts negative values
328331

329332
- `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.
330333
- `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.
331-
- `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.
334+
- `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 etc. If not set, the animation's owner house, or failing that, owning house of object it is attached to or the building it belongs to is used to deal the damage.
332335
- `Damage.ApplyFirepowerMult` determines whether or not firepower modifiers from the animation's invoker are applied on the damage dealt from this animation, if exists.
333336
- `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.
334337

@@ -1189,7 +1192,7 @@ IronCurtain.KillOrganicsWarhead= ; WarheadType
11891192
ForceShield.EffectOnOrganics=kill ; Iron Curtain effect Enumeration (kill | invulnerable | ignore)
11901193
ForceShield.KillOrganicsWarhead= ; WarheadType
11911194

1192-
[SOMETECHNO] ; InfantryType or Organic=true TechnoType
1195+
[SOMETECHNO] ; TechnoType with Organic=true
11931196
IronCurtain.Effect= ; IronCurtain effect Enumeration (kill | invulnerable | ignore)
11941197
IronCurtain.KillWarhead= ; WarheadType
11951198
ForceShield.Effect= ; IronCurtain effect Enumeration (kill | invulnerable | ignore)

docs/New-or-Enhanced-Logics.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,7 @@ DeployedSecondaryFireFLH= ; integer - Forward,Lateral,Height
665665
In `rulesmd.ini`:
666666

667667
```ini
668-
[SOMEINFANTRY] ; InfantryType
669-
Slaved=yes
668+
[SOMEINFANTRY] ; InfantryType, with Slaved=yes
670669
SlavesFreeSound= ; Sound entry, default to [AudioVisual] -> SlavesFreeSound
671670
```
672671

@@ -702,8 +701,7 @@ NotHuman.RandomDeathSequence=yes ; boolean
702701

703702
In `rulesmd.ini`:
704703
```ini
705-
[SOMEINFANTRY] ; InfantryType
706-
Slaved=yes
704+
[SOMEINFANTRY] ; InfantryType, with Slaved=yes
707705
Slaved.OwnerWhenMasterKilled=killer ; enumeration (suicide | master | killer | neutral)
708706
```
709707

@@ -1197,7 +1195,7 @@ AttackMove.PursuitTarget= ; boolean
11971195

11981196
### Attack move - follow
11991197

1200-
- 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`).
1198+
- 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]`).
12011199
- Use `AttackMove.Follow.IncludeAir` to determine whether the follower will follow an air unit.
12021200
- Mind control units with `AttackMove.Follow.IfMindControlIsFull=true` set will follow if they reach the capacity.
12031201
- This feature should be useful for supportive units such as medics and repairers.
@@ -1207,7 +1205,7 @@ In `rulesmd.ini`:
12071205
[SOMETECHNO] ; TechnoType
12081206
AttackMove.Follow=false ; boolean
12091207
AttackMove.Follow.IncludeAir=false ; boolean
1210-
AttackMove.Follow.IfMindControlIsFull=false ;boolean
1208+
AttackMove.Follow.IfMindControlIsFull=false ; boolean
12111209
```
12121210

12131211
### Attack move - without weapon
@@ -1626,11 +1624,11 @@ MultiMindControl.ReleaseVictim=false ; boolean
16261624
*Multi Weapon used to release different weapons against different targets in **Zero Boundary** by @[Stormsulfur](https://space.bilibili.com/11638715/lists/5358986)*
16271625

16281626
- You can now use `WeaponX` to enable more than 2 weapons for a TechnoType without hardcoded `Gunner=yes`, `IsGattling=yes` or `IsChargeTurret=yes` restriction.
1629-
- Set `MultiWeapon=yes` to enable this feature, be careful not to forget `WeaponCount`.
1630-
- `MultiWeapon.IsSecondary` specifies which weapons will be considered as `Secondary` when selecting weapons or triggering infantry's `SecondaryFire` settings. If not set, `Weapon1` will be considered as `Secondary`.
1631-
- `MultiWeapon.SelectCount` determines the number of weapons that can be selected by default weapon selection logic. Notice that higher number is bad for performance.
1632-
- If the number is smaller than the total amount of weapons, the ones with smaller indices will be picked.
1633-
- Other weapons can still be used for logic that specify a weapon index, such as [ForceWeapon](#forcing-specific-weapon-against-certain-targets).
1627+
- Set `MultiWeapon=yes` to enable this feature, be careful not to forget `WeaponCount`.
1628+
- `MultiWeapon.IsSecondary` specifies which weapons will be considered as `Secondary` when selecting weapons or triggering infantry's `SecondaryFire` settings. If not set, `Weapon1` will be considered as `Secondary`.
1629+
- `MultiWeapon.SelectCount` determines the number of weapons that can be selected by default weapon selection logic. Notice that higher number is bad for performance.
1630+
- If the number is smaller than the total amount of weapons, the ones with smaller indices will be picked.
1631+
- Other weapons can still be used for logic that specify a weapon index, such as [ForceWeapon](#forcing-specific-weapon-against-certain-targets).
16341632

16351633
In `rulesmd.ini`:
16361634
```ini
@@ -2124,25 +2122,29 @@ MindControl.Anim= ; Animation, defaults to [CombatDamage] ->
21242122
In `rulesmd.ini`:
21252123
```ini
21262124
[SOMEWARHEAD] ; WarheadType
2127-
SplashList=<none> ; List of AnimationTypes
2125+
SplashList= ; List of AnimationTypes
21282126
SplashList.PickRandom=false ; boolean
21292127
```
21302128

2131-
### Damage multiplier for different houses
2129+
### Damage multipliers
21322130

2133-
- Warheads are now able to define the extra damage multiplier for owner house, ally houses and enemy houses. If the warhead's own `Damage(Owner|Allies|Enemies)Multiplier` are not set, these will default to respective `[CombatDamage] -> Damage(Owner|Allies|Enemies)Multiplier` which all default to 1.0 .Note that `DamageAlliesMultiplier` won't affect your own units like `AffectsAllies` did, and this function will not affect damage with ignore defenses like `Suicide`.etc .
2131+
- Warheads are now able to define the extra damage multiplier for owner house, ally houses and enemy houses. If the warhead's own `Damage(Owner|Allies|Enemies)Multiplier` are not set, these will default to respective `[CombatDamage] -> Damage(Owner|Allies|Enemies)Multiplier` which all default to 1.0 .Note that `DamageAlliesMultiplier` won't affect your own units like `AffectsAllies` did.
2132+
- An extra damage multiplier based on the firer or target's health percentage will be added to the total multiplier. To be elaborate: the damage multiplier will firstly increased by the firer's health percentage multiplies `DamageSourceHealthMultiplier`, then increased by the target's health percentage multiplies `DamageTargetHealthMultiplier`.
2133+
- These multipliers will not affect damage with ignore defenses like `Suicide`.etc .
21342134

21352135
In `rulesmd.ini`:
21362136
```ini
21372137
[CombatDamage]
2138-
DamageOwnerMultiplier=1.0 ; floating point value
2139-
DamageAlliesMultiplier=1.0 ; floating point value
2140-
DamageEnemiesMultiplier=1.0 ; floating point value
2138+
DamageOwnerMultiplier=1.0 ; floating point value
2139+
DamageAlliesMultiplier=1.0 ; floating point value
2140+
DamageEnemiesMultiplier=1.0 ; floating point value
21412141

2142-
[SOMEWARHEAD] ; WarheadType
2143-
DamageOwnerMultiplier= ; floating point value
2144-
DamageAlliesMultiplier= ; floating point value
2145-
DamageEnemiesMultiplier= ; floating point value
2142+
[SOMEWARHEAD] ; WarheadType
2143+
DamageOwnerMultiplier= ; floating point value
2144+
DamageAlliesMultiplier= ; floating point value
2145+
DamageEnemiesMultiplier= ; floating point value
2146+
DamageSourceHealthMultiplier=0.0 ; floating point value
2147+
DamageTargetHealthMultiplier=0.0 ; floating point value
21462148
```
21472149

21482150
### Detonate Warhead on all objects on map
@@ -2424,8 +2426,7 @@ KeepRange.AllowPlayer=false ; boolean
24242426

24252427
In `rulesmd.ini`:
24262428
```ini
2427-
[SOMEWEAPON] ; WeaponType
2428-
OmniFire=yes
2429+
[SOMEWEAPON] ; WeaponType, with OmniFire=yes
24292430
OmniFire.TurnToTarget=no ; boolean
24302431
```
24312432

0 commit comments

Comments
 (0)