Skip to content

Commit 0da2d1a

Browse files
AffectTargetsAffectsTarget
1 parent 620b82b commit 0da2d1a

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

docs/New-or-Enhanced-Logics.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This page describes all the engine features that are either new and introduced b
2424
- `PenetratesForceShield` can be used to set this separately for Force Shielded objects, defaults to value of `PenetratesIronCurtain`.
2525
- `AffectTypes`, if set to a non-empty list, restricts the effect to only be applicable on the specific unit types listed. If this is not set or empty, no whitelist filtering occurs. This check has the highest priority.
2626
- `IgnoreTypes`, if set to a non-empty list, prevents the effect from being applied to any of the specific unit types listed. If this is not set or empty, no blacklist filtering occurs. This check is performed after `AffectTypes`.
27-
- `AffectTargets`, if set to a non-empty list, restricts the effect to only be applicable on units belonging to the specified target categories (e.g., infantry, units, aircraft, buildings). This check is performed after both type-based filters.
27+
- `AffectsTarget`, if set to a non-empty list, restricts the effect to only be applicable on units belonging to the specified target categories (e.g., infantry, units, aircraft, buildings). This check is performed after both type-based filters.
2828
- `Animation` defines animation to play in an indefinite loop for as long as the effect is active on the object it is attached to.
2929
- If `Animation.ResetOnReapply` is set to true, the animation playback is reset every time the effect is applied if `Cumulative=false`.
3030
- `Animation.OfflineAction` determines what happens to the animation when the attached object is deactivated or not powered. Only applies if `Powered=true`.
@@ -102,7 +102,7 @@ PenetratesIronCurtain=false ; boolean
102102
PenetratesForceShield= ; boolean
103103
AffectTypes= ; List of TechnoTypes
104104
IgnoreTypes= ; List of TechnoTypes
105-
AffectTargets=all ; List of TechnoType Enumeration (none|infantry|units|aircraft|buildings|all)
105+
AffectsTarget=all ; List of TechnoType Enumeration (none|infantry|units|aircraft|buildings|all)
106106
Animation= ; AnimationType
107107
Animation.ResetOnReapply=false ; boolean
108108
Animation.OfflineAction=Hides ; AttachedAnimFlag (None, Hides, Temporal, Paused or PausedTemporal)
@@ -2414,9 +2414,9 @@ PlayAnimAboveSurface=false ; boolean
24142414

24152415
- Setting `DetonateOnAllMapObjects` to true allows a Warhead that is detonated by a projectile (for an example, this excludes things like animation `Warhead` and Ares' GenericWarhead superweapon but includes `Crit.Warhead` and animation `Weapon`) and consequently any `AirburstWeapon/ShrapnelWeapon` that may follow to detonate on each object currently alive and existing on the map regardless of its actual target, with optional filters. Note that this is done immediately prior Warhead detonation so after `PreImpactAnim` *(Ares feature)* has been displayed.
24162416
- `DetonateOnAllMapObjects.Full` customizes whether or not the Warhead is detonated fully on the targets (as part of a dummy weapon) or simply deals area damage and applies Phobos' Warhead effects.
2417-
- `DetonateOnAllMapObjects.AffectTargets` is used to filter which types of targets (TechnoTypes) are considered valid and must be set to a valid value other than `none` for this feature to work. Only `none`, `all`, `aircraft`, `buildings`, `infantry` and `units` are valid values. This is set to `none` by default as inclusion of all object types can be performance-heavy.
2417+
- `DetonateOnAllMapObjects.AffectsTarget` is used to filter which types of targets (TechnoTypes) are considered valid and must be set to a valid value other than `none` for this feature to work. Only `none`, `all`, `aircraft`, `buildings`, `infantry` and `units` are valid values. This is set to `none` by default as inclusion of all object types can be performance-heavy.
24182418
- `DetonateOnAllMapObjects.AffectsHouse` is used to filter which houses targets can belong to be considered valid and must be set to a valid value other than `none` for this feature to work. Only applicable if the house that fired the projectile is known. This is set to `none` by default as inclusion of all houses can be performance-heavy.
2419-
- `DetonateOnAllMapObjects.AffectTypes` can be used to list specific TechnoTypes to be considered as valid targets. If any valid TechnoTypes are listed, then only matching objects will be targeted. Note that `DetonateOnAllMapObjects.AffectTargets` and `DetonateOnAllMapObjects.AffectsHouse` take priority over this setting.
2419+
- `DetonateOnAllMapObjects.AffectTypes` can be used to list specific TechnoTypes to be considered as valid targets. If any valid TechnoTypes are listed, then only matching objects will be targeted. Note that `DetonateOnAllMapObjects.AffectsTarget` and `DetonateOnAllMapObjects.AffectsHouse` take priority over this setting.
24202420
- `DetonateOnAllMapObjects.IgnoreTypes` can be used to list specific TechnoTypes to be never considered as valid targets.
24212421
- `DetonateOnAllMapObjects.RequireVerses`, if set to true, only considers targets whose armor type the warhead has non-zero `Verses` value against as valid. On targets with active shields, shield's armor type is used unless the Warhead has `Shield.Penetrate=true`. This is checked after all other filters listed above.
24222422

@@ -2425,15 +2425,15 @@ PlayAnimAboveSurface=false ; boolean
24252425
[SOMEWARHEAD] ; WarheadType
24262426
DetonateOnAllMapObjects=false ; boolean
24272427
DetonateOnAllMapObjects.Full=true ; boolean
2428-
DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all)
2428+
DetonateOnAllMapObjects.AffectsTarget=none ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all)
24292429
DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
24302430
DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes
24312431
DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes
24322432
DetonateOnAllMapObjects.RequireVerses=false ; boolean
24332433
```
24342434

24352435
```{warning}
2436-
While this feature can provide better performance than a large `CellSpread` value, it still has potential to slow down the game, especially if used in conjunction with things like animations, alpha lights etc. Modder discretion and use of the filter keys (`AffectTargets/House/Types` etc.) is advised.
2436+
While this feature can provide better performance than a large `CellSpread` value, it still has potential to slow down the game, especially if used in conjunction with things like animations, alpha lights etc. Modder discretion and use of the filter keys (`AffectsTarget/House/Types` etc.) is advised.
24372437
```
24382438

24392439
### Fire weapon when Warhead kills something

docs/Whats-New.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ You can use the migration utility (can be found on [Phobos supplementaries repo]
105105
- `[WarheadType] -> Crit.AffectsHouses` -> `[WarheadType] -> Crit.AffectsHouse`
106106
- `[WarheadType] -> KillWeapon.AffectsHouses` -> `[WarheadType] -> KillWeapon.AffectsHouse`
107107
- `[WarheadType] -> KillWeapon.OnFirer.AffectsHouses` -> `[WarheadType] -> KillWeapon.OnFirer.AffectsHouse`
108+
- `[AttachEffectType] -> AffectTargets` -> `[AttachEffectType] -> AffectsTarget`
109+
- `[WarheadType] -> DetonateOnAllMapObjects.AffectTargets` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsTarget`
108110

109111
#### From ???
110112

docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,12 @@ msgstr ""
182182

183183
#: ../../New-or-Enhanced-Logics.md:27
184184
msgid ""
185-
"`AffectTargets`, if set to a non-empty list, restricts the effect to only"
185+
"`AffectsTarget`, if set to a non-empty list, restricts the effect to only"
186186
" be applicable on units belonging to the specified target categories "
187187
"(e.g., infantry, units, aircraft, buildings). This check is performed "
188188
"after both type-based filters."
189189
msgstr ""
190-
"如果 `AffectTargets` 设为非空列表,则 AE "
191-
"仅可对特定大类目标生效(例如步兵、载具、战机、建筑)。此项检查在两个类型名单过滤之后执行。"
190+
"如果 `AffectsTarget` 设为非空列表,则 AE 仅可对特定大类目标生效(例如步兵、载具、战机、建筑)。此项检查在两个类型名单过滤之后执行。"
192191

193192
#: ../../New-or-Enhanced-Logics.md:28
194193
msgid ""
@@ -750,7 +749,7 @@ msgid ""
750749
"PenetratesForceShield= ; boolean\n"
751750
"AffectTypes= ; List of TechnoTypes\n"
752751
"IgnoreTypes= ; List of TechnoTypes\n"
753-
"AffectTargets=all ; List of TechnoType "
752+
"AffectsTarget=all ; List of TechnoType "
754753
"Enumeration (none|infantry|units|aircraft|buildings|all)\n"
755754
"Animation= ; AnimationType\n"
756755
"Animation.ResetOnReapply=false ; boolean\n"
@@ -909,7 +908,7 @@ msgstr ""
909908
"PenetratesForceShield= ; boolean\n"
910909
"AffectTypes= ; List of TechnoTypes\n"
911910
"IgnoreTypes= ; List of TechnoTypes\n"
912-
"AffectTargets=all ; List of TechnoType "
911+
"AffectsTarget=all ; List of TechnoType "
913912
"Enumeration (none|infantry|units|aircraft|buildings|all)\n"
914913
"Animation= ; AnimationType\n"
915914
"Animation.ResetOnReapply=false ; boolean\n"
@@ -8546,14 +8545,14 @@ msgstr ""
85468545

85478546
#: ../../New-or-Enhanced-Logics.md:2408
85488547
msgid ""
8549-
"`DetonateOnAllMapObjects.AffectTargets` is used to filter which types of "
8548+
"`DetonateOnAllMapObjects.AffectsTarget` is used to filter which types of "
85508549
"targets (TechnoTypes) are considered valid and must be set to a valid "
85518550
"value other than `none` for this feature to work. Only `none`, `all`, "
85528551
"`aircraft`, `buildings`, `infantry` and `units` are valid values. This is"
85538552
" set to `none` by default as inclusion of all object types can be "
85548553
"performance-heavy."
85558554
msgstr ""
8556-
"`DetonateOnAllMapObjects.AffectTargets` 用于在非 `none` "
8555+
"`DetonateOnAllMapObjects.AffectsTarget` 用于在非 `none` "
85578556
"时筛选哪些类型的目标(科技类型)可被视为有效。仅 `none`、`all`、`aircraft`、`buildings`、`infantry` 和"
85588557
" `units` 是有效值。默认为 `none`,因为包含所有对象类型可能会影响性能。"
85598558

@@ -8573,12 +8572,12 @@ msgid ""
85738572
"`DetonateOnAllMapObjects.AffectTypes` can be used to list specific "
85748573
"TechnoTypes to be considered as valid targets. If any valid TechnoTypes "
85758574
"are listed, then only matching objects will be targeted. Note that "
8576-
"`DetonateOnAllMapObjects.AffectTargets` and "
8575+
"`DetonateOnAllMapObjects.AffectsTarget` and "
85778576
"`DetonateOnAllMapObjects.AffectsHouse` take priority over this setting."
85788577
msgstr ""
85798578
"`DetonateOnAllMapObjects.AffectTypes` "
85808579
"可用于列出特定的科技类型作为有效目标。如果列出了任何有效科技类型,则只有匹配的对象才会被作为目标。注意 "
8581-
"`DetonateOnAllMapObjects.AffectTargets` 和 "
8580+
"`DetonateOnAllMapObjects.AffectsTarget` 和 "
85828581
"`DetonateOnAllMapObjects.AffectsHouse` 的优先级高于此设置。"
85838582

85848583
#: ../../New-or-Enhanced-Logics.md:2411
@@ -8604,7 +8603,7 @@ msgid ""
86048603
"[SOMEWARHEAD] ; WarheadType\n"
86058604
"DetonateOnAllMapObjects=false ; boolean\n"
86068605
"DetonateOnAllMapObjects.Full=true ; boolean\n"
8607-
"DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target "
8606+
"DetonateOnAllMapObjects.AffectsTarget=none ; List of Affected Target "
86088607
"Enumeration (none|aircraft|buildings|infantry|units|all)\n"
86098608
"DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House "
86108609
"Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n"
@@ -8615,7 +8614,7 @@ msgstr ""
86158614
"[SOMEWARHEAD] ; WarheadType\n"
86168615
"DetonateOnAllMapObjects=false ; boolean\n"
86178616
"DetonateOnAllMapObjects.Full=true ; boolean\n"
8618-
"DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target "
8617+
"DetonateOnAllMapObjects.AffectsTarget=none ; List of Affected Target "
86198618
"Enumeration (none|aircraft|buildings|infantry|units|all)\n"
86208619
"DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House "
86218620
"Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n"
@@ -8629,7 +8628,7 @@ msgid ""
86298628
"`CellSpread` value, it still has potential to slow down the game, "
86308629
"especially if used in conjunction with things like animations, alpha "
86318630
"lights etc. Modder discretion and use of the filter keys "
8632-
"(`AffectTargets/House/Types` etc.) is advised."
8631+
"(`AffectsTarget/House/Types` etc.) is advised."
86338632
msgstr ""
86348633
"虽然此功能比巨大的 `CellSpread` 值性能上好得多但它仍然可能减慢游戏速度。特别是与动画、AlphaImage 等共同使用时。建议 "
86358634
"modder 谨慎使用并通过筛选语句进行限制。"

src/Ext/WarheadType/Body.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
234234
this->DetonateOnAllMapObjects.Read(exINI, pSection, "DetonateOnAllMapObjects");
235235
this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full");
236236
this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses");
237-
this->DetonateOnAllMapObjects_AffectTargets.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets");
237+
this->DetonateOnAllMapObjects_AffectTargets.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsTarget");
238238
this->DetonateOnAllMapObjects_AffectHouses.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouse");
239239
this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes");
240240
this->DetonateOnAllMapObjects_IgnoreTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.IgnoreTypes");

src/New/Type/AttachEffectTypeClass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI)
103103
this->PenetratesForceShield.Read(exINI, pSection, "PenetratesForceShield");
104104
this->AffectTypes.Read(exINI, pSection, "AffectTypes");
105105
this->IgnoreTypes.Read(exINI, pSection, "IgnoreTypes");
106-
this->AffectTargets.Read(exINI, pSection, "AffectTargets");
106+
this->AffectTargets.Read(exINI, pSection, "AffectsTarget");
107107

108108
this->Animation.Read(exINI, pSection, "Animation");
109109
this->CumulativeAnimations.Read(exINI, pSection, "CumulativeAnimations");

0 commit comments

Comments
 (0)