From fa6bcd333a1e052b740b56f3722ba17a30507dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Wed, 3 Dec 2025 17:48:31 +0800 Subject: [PATCH 1/8] =?UTF-8?q?Crit:=20`Affect`Percent=E2=86=92`Affects`Pe?= =?UTF-8?q?rcent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 6 +++--- docs/Whats-New.md | 12 ++++++++++++ .../zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po | 12 ++++++------ src/Ext/WarheadType/Body.cpp | 6 +++--- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index c1547abe9c..a8fbc1d034 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -2263,7 +2263,7 @@ AffectsGround=true ; boolean - `Crit.Warhead.FullDetonation` controls 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. - `Crit.Affects` can be used to customize types of targets that this Warhead can deal critical hits against. Critical hits cannot affect empty cells or cells containing only TerrainTypes, overlays etc. - `Crit.AffectsHouses` can be used to customize houses that this Warhead can deal critical hits against. - - `Crit.AffectBelowPercent` and `Crit.AffectAbovePercent` can be used to set the health percentage that targets must be above and/or below/equal to respectively to be affected by critical hits. If target has zero health left this check is bypassed. + - `Crit.AffectsBelowPercent` and `Crit.AffectsAbovePercent` can be used to set the health percentage that targets must be above and/or below/equal to respectively to be affected by critical hits. If target has zero health left this check is bypassed. - `Crit.AnimList` can be used to set a list of animations used instead of Warhead's `AnimList` if Warhead deals a critical hit to even one target. If `Crit.AnimList.PickRandom` is set (defaults to `AnimList.PickRandom`) then the animation is chosen randomly from the list. If `Crit.AnimList.CreateAll` is set (defaults to `AnimList.CreateAll`), all animations from the list are created. - `Crit.AnimOnAffectedTargets`, if set, makes the animation(s) from `Crit.AnimList` play on each affected target *in addition* to animation from Warhead's `AnimList` playing as normal instead of replacing `AnimList` animation. Note that because these animations are independent from `AnimList`, `Crit.AnimList.PickRandom` and `Crit.AnimList.CreateAll` will not default to their `AnimList` counterparts here and need to be explicitly set if needed. - `Crit.ActiveChanceAnims` can be used to set animation to be always displayed at the Warhead's detonation coordinates if the current Warhead has a chance to critically hit. If more than one animation is listed, a random one is selected. @@ -2281,8 +2281,8 @@ Crit.Warhead= ; WarheadType Crit.Warhead.FullDetonation=true ; boolean Crit.Affects=all ; List of Affected Target Enumeration (none|land|water|infantry|units|buildings|all) Crit.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) -Crit.AffectBelowPercent=1.0 ; floating point value, percents or absolute (0.0-1.0) -Crit.AffectAbovePercent=0.0 ; floating point value, percents or absolute (0.0-1.0) +Crit.AffectsBelowPercent=1.0 ; floating point value, percents or absolute (0.0-1.0) +Crit.AffectsAbovePercent=0.0 ; floating point value, percents or absolute (0.0-1.0) Crit.AnimList= ; List of AnimationTypes Crit.AnimList.PickRandom= ; boolean Crit.AnimList.CreateAll= ; boolean diff --git a/docs/Whats-New.md b/docs/Whats-New.md index baf3c1e532..2ccd5b796f 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -89,6 +89,18 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] - Key `rulesmd.ini -> [TechnoType] -> Deployed.RememberTarget` is deprecated and can be removed now, the bugfix for `DeployToFire` deployers is now always on. +### Changed tags + +- To standardize tag names for similar functions, prevent typos, or avoid misunderstandings, replace them with new tag names. + +#### From 0.4 + +- `[WarheadType] -> Crit.AffectBelowPercent` -> `[WarheadType] -> Crit.AffectsBelowPercent`. + +#### From ??? + +- `[WarheadType] -> Crit.AffectAbovePercent` -> `[WarheadType] -> Crit.AffectsAbovePercent`. + ### New user settings in RA2MD.INI - These are new user setting keys added by various features in Phobos. Most of them can be found in either in [user inteface](User-Interface.md) or [miscellaneous](Miscellanous.md) sections. Search functionality can be used to find them quickly if needed. diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index e1cd23d7a5..648638f4a8 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -8100,12 +8100,12 @@ msgstr "`Crit.AffectsHouses` 可用于自定义此弹头可暴击的目标所属 #: ../../New-or-Enhanced-Logics.md:2257 msgid "" -"`Crit.AffectBelowPercent` and `Crit.AffectAbovePercent` can be used to " +"`Crit.AffectsBelowPercent` and `Crit.AffectsAbovePercent` can be used to " "set the health percentage that targets must be above and/or below/equal " "to respectively to be affected by critical hits. If target has zero " "health left this check is bypassed." msgstr "" -"`Crit.AffectBelowPercent` 和 `Crit.AffectAbovePercent` " +"`Crit.AffectsBelowPercent` 和 `Crit.AffectsAbovePercent` " "用于设置可被暴击影响的单位其当前血量所占百分比必须高于和/或低于/等于的限制。若目标血量为 0 则跳过该检查。" #: ../../New-or-Enhanced-Logics.md:2258 @@ -8173,9 +8173,9 @@ msgid "" "Enumeration (none|land|water|infantry|units|buildings|all)\n" "Crit.AffectsHouses=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" -"Crit.AffectBelowPercent=1.0 ; floating point value, " +"Crit.AffectsBelowPercent=1.0 ; floating point value, " "percents or absolute (0.0-1.0)\n" -"Crit.AffectAbovePercent=0.0 ; floating point value, " +"Crit.AffectsAbovePercent=0.0 ; floating point value, " "percents or absolute (0.0-1.0)\n" "Crit.AnimList= ; List of AnimationTypes\n" "Crit.AnimList.PickRandom= ; boolean\n" @@ -8199,9 +8199,9 @@ msgstr "" "Enumeration (none|land|water|infantry|units|buildings|all)\n" "Crit.AffectsHouses=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" -"Crit.AffectBelowPercent=1.0 ; floating point value, " +"Crit.AffectsBelowPercent=1.0 ; floating point value, " "percents or absolute (0.0-1.0)\n" -"Crit.AffectAbovePercent=0.0 ; floating point value, " +"Crit.AffectsAbovePercent=0.0 ; floating point value, " "percents or absolute (0.0-1.0)\n" "Crit.AnimList= ; List of AnimationTypes\n" "Crit.AnimList.PickRandom= ; boolean\n" diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index f3d54ee630..84a6cfbab6 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -163,12 +163,12 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_AnimList_CreateAll.Read(exINI, pSection, "Crit.AnimList.CreateAll"); this->Crit_ActiveChanceAnims.Read(exINI, pSection, "Crit.ActiveChanceAnims"); this->Crit_AnimOnAffectedTargets.Read(exINI, pSection, "Crit.AnimOnAffectedTargets"); - this->Crit_AffectBelowPercent.Read(exINI, pSection, "Crit.AffectBelowPercent"); - this->Crit_AffectAbovePercent.Read(exINI, pSection, "Crit.AffectAbovePercent"); + this->Crit_AffectBelowPercent.Read(exINI, pSection, "Crit.AffectsBelowPercent"); + this->Crit_AffectAbovePercent.Read(exINI, pSection, "Crit.AffectsAbovePercent"); this->Crit_SuppressWhenIntercepted.Read(exINI, pSection, "Crit.SuppressWhenIntercepted"); if (this->Crit_AffectAbovePercent > this->Crit_AffectBelowPercent) - Debug::Log("[Developer warning][%s] Crit.AffectAbovePercent is bigger than Crit.AffectBelowPercent, crit will never activate!\n", pSection); + Debug::Log("[Developer warning][%s] Crit.AffectsAbovePercent is bigger than Crit.AffectsBelowPercent, crit will never activate!\n", pSection); this->MindControl_Anim.Read(exINI, pSection, "MindControl.Anim"); this->MindControl_ThreatDelay.Read(exINI, pSection, "MindControl.ThreatDelay"); From eec941661105385d8d1a1226654d5c608a72ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Sat, 6 Dec 2025 01:08:57 +0800 Subject: [PATCH 2/8] =?UTF-8?q?DetonateOnAllMapObjects:=20`AffectHouses`?= =?UTF-8?q?=E2=86=92`AffectsHouses`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 6 +++--- docs/Whats-New.md | 1 + .../zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po | 12 ++++++------ src/Ext/WarheadType/Body.cpp | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index a8fbc1d034..625ff18476 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -2415,8 +2415,8 @@ PlayAnimAboveSurface=false ; boolean - 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. - `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. - `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. - - `DetonateOnAllMapObjects.AffectHouses` 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. - - `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.AffectHouses` take priority over this setting. + - `DetonateOnAllMapObjects.AffectsHouses` 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. + - `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.AffectsHouses` take priority over this setting. - `DetonateOnAllMapObjects.IgnoreTypes` can be used to list specific TechnoTypes to be never considered as valid targets. - `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. @@ -2426,7 +2426,7 @@ PlayAnimAboveSurface=false ; boolean DetonateOnAllMapObjects=false ; boolean DetonateOnAllMapObjects.Full=true ; boolean DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all) -DetonateOnAllMapObjects.AffectHouses=none ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +DetonateOnAllMapObjects.AffectsHouses=none ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes DetonateOnAllMapObjects.RequireVerses=false ; boolean diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 2ccd5b796f..0088b0a355 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -96,6 +96,7 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] #### From 0.4 - `[WarheadType] -> Crit.AffectBelowPercent` -> `[WarheadType] -> Crit.AffectsBelowPercent`. +- `[WarheadType] -> DetonateOnAllMapObjects.AffectHouses` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsHouses` #### From ??? diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index 648638f4a8..8edc3de1a6 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -8559,13 +8559,13 @@ msgstr "" #: ../../New-or-Enhanced-Logics.md:2409 msgid "" -"`DetonateOnAllMapObjects.AffectHouses` is used to filter which houses " +"`DetonateOnAllMapObjects.AffectsHouses` 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." msgstr "" -"`DetonateOnAllMapObjects.AffectHouses` 用于在非 `none` " +"`DetonateOnAllMapObjects.AffectsHouses` 用于在非 `none` " "时筛选哪些所属方的目标可以被视为有效。仅适用于发射弹头的所属方已知的情况。默认为 `none`,因为包含所有所属方可能会影响性能。" #: ../../New-or-Enhanced-Logics.md:2410 @@ -8574,12 +8574,12 @@ msgid "" "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.AffectHouses` take priority over this setting." +"`DetonateOnAllMapObjects.AffectsHouses` take priority over this setting." msgstr "" "`DetonateOnAllMapObjects.AffectTypes` " "可用于列出特定的科技类型作为有效目标。如果列出了任何有效科技类型,则只有匹配的对象才会被作为目标。注意 " "`DetonateOnAllMapObjects.AffectTargets` 和 " -"`DetonateOnAllMapObjects.AffectHouses` 的优先级高于此设置。" +"`DetonateOnAllMapObjects.AffectsHouses` 的优先级高于此设置。" #: ../../New-or-Enhanced-Logics.md:2411 msgid "" @@ -8606,7 +8606,7 @@ msgid "" "DetonateOnAllMapObjects.Full=true ; boolean\n" "DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" -"DetonateOnAllMapObjects.AffectHouses=none ; List of Affected House " +"DetonateOnAllMapObjects.AffectsHouses=none ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes\n" "DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes\n" @@ -8617,7 +8617,7 @@ msgstr "" "DetonateOnAllMapObjects.Full=true ; boolean\n" "DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" -"DetonateOnAllMapObjects.AffectHouses=none ; List of Affected House " +"DetonateOnAllMapObjects.AffectsHouses=none ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes\n" "DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes\n" diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 84a6cfbab6..1bb537ea42 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -235,7 +235,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full"); this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses"); this->DetonateOnAllMapObjects_AffectTargets.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); - this->DetonateOnAllMapObjects_AffectHouses.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectHouses"); + this->DetonateOnAllMapObjects_AffectHouses.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouses"); this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes"); this->DetonateOnAllMapObjects_IgnoreTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.IgnoreTypes"); From 2bf083734cc279de348972a1250a58e50017d842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Wed, 10 Dec 2025 16:44:09 +0800 Subject: [PATCH 3/8] =?UTF-8?q?Convert:=20`AffectedHouses`=E2=86=92`Affect?= =?UTF-8?q?sHouses`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starting from this commit, changes to the source code will be reduced except for reading, and processing will be conducted after discussions are concluded and migration is prepared. --- docs/New-or-Enhanced-Logics.md | 20 +++++----- docs/Whats-New.md | 1 + .../LC_MESSAGES/New-or-Enhanced-Logics.po | 38 +++++++++---------- src/New/Type/Affiliated/TypeConvertGroup.cpp | 4 +- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 625ff18476..8c3d1775c0 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1079,8 +1079,8 @@ AISuperWeaponDelay= ; integer, game frames - Warheads can now change TechnoTypes of affected units to other Types in the same category (infantry to infantry, vehicles to vehicles, aircraft to aircraft). - `ConvertN.From` (where N is 0, 1, 2...) specifies which TechnoTypes are valid for conversion. This entry can have many types listed, meanging that many types will be converted at once. When no types are included, conversion will affect all valid targets. - `ConvertN.To` specifies the TechnoType which is the result of conversion. - - `ConvertN.AffectedHouses` specifies whose units can be converted. - - `Convert.From`, `Convert.To` and `Convert.AffectedHouses` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectedHouses` if only one pair is specified. + - `ConvertN.AffectsHouses` specifies whose units can be converted. + - `Convert.From`, `Convert.To` and `Convert.AffectsHouses` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectsHouses` if only one pair is specified. - Conversion affects *all* existing units of set TechnoTypes, this includes units in: transports, occupied buildings, buildings with `InfantryAbsorb=yes` or `UnitAbsorb=yes`, buildings with `Bunker=yes`. In example, this superweapon would convert all owned and friendly `SOLDIERA` and `SOLDIERB` to `NEWSOLDIER`: @@ -1088,7 +1088,7 @@ In example, this superweapon would convert all owned and friendly `SOLDIERA` and [ExampleSW] Convert.From=SOLDIERA,SOLDIERB Convert.To=NEWSOLDIER -Convert.AffectedHouses=team +Convert.AffectsHouses=team ``` In `rulesmd.ini`: @@ -1096,12 +1096,12 @@ In `rulesmd.ini`: [SOMESW] ; SuperWeaponType ConvertN.From= ; List of TechnoTypes ConvertN.To= ; TechnoType -ConvertN.AffectedHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +ConvertN.AffectsHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ; where N = 0, 1, 2, ... ; or Convert.From= ; List of TechnoTypes Convert.To= ; TechnoType -Convert.AffectedHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +Convert.AffectsHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ``` ```{warning} @@ -2306,15 +2306,15 @@ If you set `Crit.Warhead` to the same Warhead it is defined on, or create a chai - Warheads can now change TechnoTypes of affected units to other Types in the same category (infantry to infantry, vehicles to vehicles, aircraft to aircraft). - `ConvertN.From` (where N is 0, 1, 2...) specifies which TechnoTypes are valid for conversion. This entry can have many types listed, meanging that many types will be converted at once. When no types are included, conversion will affect all valid targets. - `ConvertN.To` specifies the TechnoType which is the result of conversion. - - `ConvertN.AffectedHouses` specifies whose units can be converted. - - `Convert.From`, `Convert.To` and `Convert.AffectedHouses` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectedHouses` if only one pair is specified. + - `ConvertN.AffectsHouses` specifies whose units can be converted. + - `Convert.From`, `Convert.To` and `Convert.AffectsHouses` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectsHouses` if only one pair is specified. In example, this warhead would convert all affected owned and friendly `SOLDIERA` and `SOLDIERB` to `NEWSOLDIER`: ```ini [ExampleWH] Convert.From=SOLDIERA,SOLDIERB Convert.To=NEWSOLDIER -Convert.AffectedHouses=team +Convert.AffectsHouses=team ``` In `rulesmd.ini`: @@ -2322,12 +2322,12 @@ In `rulesmd.ini`: [SOMEWARHEAD] ; WarheadType ConvertN.From= ; List of TechnoTypes ConvertN.To= ; TechnoType -ConvertN.AffectedHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +ConvertN.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ; where N = 0, 1, 2, ... ; or Convert.From= ; List of TechnoTypes Convert.To= ; TechnoType -Convert.AffectedHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +Convert.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ``` ```{warning} diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 0088b0a355..27ee26c11a 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -97,6 +97,7 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] - `[WarheadType] -> Crit.AffectBelowPercent` -> `[WarheadType] -> Crit.AffectsBelowPercent`. - `[WarheadType] -> DetonateOnAllMapObjects.AffectHouses` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsHouses` +- `[WarheadType/SuperWeaponType] -> Convert(N).AffectedHouses` -> `[WarheadType/SuperWeaponType] -> Convert(N).AffectsHouses` #### From ??? diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index 8edc3de1a6..fdff1d996c 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -4499,18 +4499,18 @@ msgstr "" msgid "`ConvertN.To` specifies the TechnoType which is the result of conversion." msgstr "`ConvertN.To` 指定转换后的科技类型。" -#: ../../New-or-Enhanced-Logics.md:1082 ../../New-or-Enhanced-Logics.md:2300 -msgid "`ConvertN.AffectedHouses` specifies whose units can be converted." -msgstr "`ConvertN.AffectedHouses` 指定哪些所属方的单位可以被转换。" +#: ../../New-or-Enhanced-Logics.md:1082 ../../New-or-Enhanced-Logics.md:2244 +msgid "`ConvertN.AffectsHouses` specifies whose units can be converted." +msgstr "`ConvertN.AffectsHouses` 指定哪些所属方的单位可以被转换。" #: ../../New-or-Enhanced-Logics.md:1083 ../../New-or-Enhanced-Logics.md:2301 msgid "" -"`Convert.From`, `Convert.To` and `Convert.AffectedHouses` (without " +"`Convert.From`, `Convert.To` and `Convert.AffectsHouses` (without " "numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and " -"`Convert0.AffectedHouses` if only one pair is specified." +"`Convert0.AffectsHouses` if only one pair is specified." msgstr "" -"若只指定一组转换则 `Convert.From`、`Convert.To` 和 `Convert.AffectedHouses`(不带序号)相当于" -" `Convert0.From`、`Convert0.To` 和 `Convert0.AffectedHouses`的别称。" +"若只指定一组转换则 `Convert.From`、`Convert.To` 和 `Convert.AffectsHouses`(不带序号)相当于" +" `Convert0.From`、`Convert0.To` 和 `Convert0.AffectsHouses`的别称。" #: ../../New-or-Enhanced-Logics.md:1084 msgid "" @@ -4532,37 +4532,37 @@ msgid "" "[ExampleSW]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectedHouses=team\n" +"Convert.AffectsHouses=team\n" msgstr "" "[ExampleSW]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectedHouses=team\n" +"Convert.AffectsHouses=team\n" #: ../../New-or-Enhanced-Logics.md:1095 msgid "" "[SOMESW] ; SuperWeaponType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectedHouses=owner ; List of Affected House Enumeration " +"ConvertN.AffectsHouses=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectedHouses=owner ; List of Affected House Enumeration " +"Convert.AffectsHouses=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" msgstr "" "[SOMESW] ; SuperWeaponType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectedHouses=owner ; List of Affected House Enumeration " +"ConvertN.AffectsHouses=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectedHouses=owner ; List of Affected House Enumeration " +"Convert.AffectsHouses=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" #: ../../New-or-Enhanced-Logics.md:1108 ../../New-or-Enhanced-Logics.md:1375 @@ -8246,37 +8246,37 @@ msgid "" "[ExampleWH]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectedHouses=team\n" +"Convert.AffectsHouses=team\n" msgstr "" "[ExampleWH]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectedHouses=team\n" +"Convert.AffectsHouses=team\n" #: ../../New-or-Enhanced-Logics.md:2312 msgid "" "[SOMEWARHEAD] ; WarheadType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectedHouses=all ; List of Affected House Enumeration " +"ConvertN.AffectsHouses=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectedHouses=all ; List of Affected House Enumeration " +"Convert.AffectsHouses=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" msgstr "" "[SOMEWARHEAD] ; WarheadType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectedHouses=all ; List of Affected House Enumeration " +"ConvertN.AffectsHouses=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectedHouses=all ; List of Affected House Enumeration " +"Convert.AffectsHouses=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" #: ../../New-or-Enhanced-Logics.md:2332 diff --git a/src/New/Type/Affiliated/TypeConvertGroup.cpp b/src/New/Type/Affiliated/TypeConvertGroup.cpp index 58d17d6837..5c16b50ca3 100644 --- a/src/New/Type/Affiliated/TypeConvertGroup.cpp +++ b/src/New/Type/Affiliated/TypeConvertGroup.cpp @@ -56,7 +56,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, convertFrom.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.To", i); convertTo.Read(exINI, pSection, tempBuffer); - _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectedHouses", i); + _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectsHouses", i); convertAffectedHouses.Read(exINI, pSection, tempBuffer); if (!convertTo.isset()) @@ -72,7 +72,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, Nullable convertAffectedHouses; convertFrom.Read(exINI, pSection, "Convert.From"); convertTo.Read(exINI, pSection, "Convert.To"); - convertAffectedHouses.Read(exINI, pSection, "Convert.AffectedHouses"); + convertAffectedHouses.Read(exINI, pSection, "Convert.AffectsHouses"); if (convertTo.isset()) { if (!convertAffectedHouses.isset()) From 27f2f5753541b2066c71874df7a2e312d6e65f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Wed, 10 Dec 2025 16:48:51 +0800 Subject: [PATCH 4/8] =?UTF-8?q?LimboKill:=20`Affected`=E2=86=92`AffectsHou?= =?UTF-8?q?se`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 4 ++-- docs/Whats-New.md | 1 + docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po | 8 ++++---- src/Ext/SWType/Body.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 8c3d1775c0..36f44a3d72 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1148,7 +1148,7 @@ EMPulse.SuspendOthers=false ; boolean - `LimboDelivery.IDs` is the list of numeric IDs that will be assigned to buildings. Necessary for LimboKill to work. - Created buildings are not affected by any on-map threats. The only way to remove them from the game is by using a Superweapon with `LimboKill.IDs` set. - - `LimboKill.Affected` sets which houses are affected by this feature. + - `LimboKill.AffectsHouse` sets which houses are affected by this feature. - `LimboKill.IDs` lists IDs that will be targeted. Buildings with these IDs will be removed from the game instantly. - Delivery can be made random with these optional tags. The game will randomly choose only a single building from the list for each roll chance provided. @@ -1174,7 +1174,7 @@ LimboDelivery.Types= ; List of BuildingTypes LimboDelivery.IDs= ; List of numeric IDs. -1 cannot be used. LimboDelivery.RollChances= ; List of percentages. LimboDelivery.RandomWeightsN= ; List of integers. -LimboKill.Affected=self ; Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +LimboKill.AffectsHouse=self ; Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) LimboKill.IDs= ; List of numeric IDs. ``` diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 27ee26c11a..735c093baa 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -98,6 +98,7 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] - `[WarheadType] -> Crit.AffectBelowPercent` -> `[WarheadType] -> Crit.AffectsBelowPercent`. - `[WarheadType] -> DetonateOnAllMapObjects.AffectHouses` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsHouses` - `[WarheadType/SuperWeaponType] -> Convert(N).AffectedHouses` -> `[WarheadType/SuperWeaponType] -> Convert(N).AffectsHouses` +- `[SuperWeaponType] -> LimboKill.Affected` -> `[SuperWeaponType] -> LimboKill.AffectsHouse` #### From ??? diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index fdff1d996c..b22d2230cb 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -4697,8 +4697,8 @@ msgid "" msgstr "创建的建筑不受地图上任何威胁的影响。从游戏中移除它们的唯一方法是使用设置了 `LimboKill.IDs` 的超级武器。" #: ../../New-or-Enhanced-Logics.md:1151 -msgid "`LimboKill.Affected` sets which houses are affected by this feature." -msgstr "`LimboKill.Affected` 设置那个所属方受此效果影响。" +msgid "`LimboKill.AffectsHouse` sets which houses are affected by this feature." +msgstr "`LimboKill.AffectsHouse` 设置那个所属方受此效果影响。" #: ../../New-or-Enhanced-Logics.md:1152 msgid "" @@ -4788,7 +4788,7 @@ msgid "" "\n" "LimboDelivery.RollChances= ; List of percentages.\n" "LimboDelivery.RandomWeightsN= ; List of integers.\n" -"LimboKill.Affected=self ; Affected House Enumeration " +"LimboKill.AffectsHouse=self ; Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "LimboKill.IDs= ; List of numeric IDs.\n" msgstr "" @@ -4798,7 +4798,7 @@ msgstr "" "\n" "LimboDelivery.RollChances= ; List of percentages.\n" "LimboDelivery.RandomWeightsN= ; List of integers.\n" -"LimboKill.Affected=self ; Affected House Enumeration " +"LimboKill.AffectsHouse=self ; Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "LimboKill.IDs= ; List of numeric IDs.\n" diff --git a/src/Ext/SWType/Body.cpp b/src/Ext/SWType/Body.cpp index f230746dc7..1193481298 100644 --- a/src/Ext/SWType/Body.cpp +++ b/src/Ext/SWType/Body.cpp @@ -143,7 +143,7 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->LimboDelivery_Types.Read(exINI, pSection, "LimboDelivery.Types"); this->LimboDelivery_IDs.Read(exINI, pSection, "LimboDelivery.IDs"); this->LimboDelivery_RollChances.Read(exINI, pSection, "LimboDelivery.RollChances"); - this->LimboKill_Affected.Read(exINI, pSection, "LimboKill.Affected"); + this->LimboKill_Affected.Read(exINI, pSection, "LimboKill.AffectsHouse"); this->LimboKill_IDs.Read(exINI, pSection, "LimboKill.IDs"); this->SW_Next.Read(exINI, pSection, "SW.Next"); this->SW_Next_RealLaunch.Read(exINI, pSection, "SW.Next.RealLaunch"); From bcbe4f8959eed21cb003947361d5cbb0da6ecb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Wed, 10 Dec 2025 16:53:42 +0800 Subject: [PATCH 5/8] =?UTF-8?q?Crit:=20`Affects=3D`=E2=86=92`AffectsTarget?= =?UTF-8?q?=3D`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 4 ++-- docs/Whats-New.md | 1 + docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po | 8 ++++---- src/Ext/WarheadType/Body.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 36f44a3d72..73be90aa46 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -2261,7 +2261,7 @@ AffectsGround=true ; boolean - `Crit.ExtraDamage.ApplyFirepowerMult` determines whether or not the critical hit damage should multiply the TechnoType's firepower multipliers. - `Crit.Warhead` can be used to set a Warhead to detonate instead of using current Warhead. - `Crit.Warhead.FullDetonation` controls 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. - - `Crit.Affects` can be used to customize types of targets that this Warhead can deal critical hits against. Critical hits cannot affect empty cells or cells containing only TerrainTypes, overlays etc. + - `Crit.AffectsTarget` can be used to customize types of targets that this Warhead can deal critical hits against. Critical hits cannot affect empty cells or cells containing only TerrainTypes, overlays etc. - `Crit.AffectsHouses` can be used to customize houses that this Warhead can deal critical hits against. - `Crit.AffectsBelowPercent` and `Crit.AffectsAbovePercent` can be used to set the health percentage that targets must be above and/or below/equal to respectively to be affected by critical hits. If target has zero health left this check is bypassed. - `Crit.AnimList` can be used to set a list of animations used instead of Warhead's `AnimList` if Warhead deals a critical hit to even one target. If `Crit.AnimList.PickRandom` is set (defaults to `AnimList.PickRandom`) then the animation is chosen randomly from the list. If `Crit.AnimList.CreateAll` is set (defaults to `AnimList.CreateAll`), all animations from the list are created. @@ -2279,7 +2279,7 @@ Crit.ExtraDamage=0 ; integer Crit.ExtraDamage.ApplyFirepowerMult=false ; boolean Crit.Warhead= ; WarheadType Crit.Warhead.FullDetonation=true ; boolean -Crit.Affects=all ; List of Affected Target Enumeration (none|land|water|infantry|units|buildings|all) +Crit.AffectsTarget=all ; List of Affected Target Enumeration (none|land|water|infantry|units|buildings|all) Crit.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) Crit.AffectsBelowPercent=1.0 ; floating point value, percents or absolute (0.0-1.0) Crit.AffectsAbovePercent=0.0 ; floating point value, percents or absolute (0.0-1.0) diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 735c093baa..99dfeb13d7 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -99,6 +99,7 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] - `[WarheadType] -> DetonateOnAllMapObjects.AffectHouses` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsHouses` - `[WarheadType/SuperWeaponType] -> Convert(N).AffectedHouses` -> `[WarheadType/SuperWeaponType] -> Convert(N).AffectsHouses` - `[SuperWeaponType] -> LimboKill.Affected` -> `[SuperWeaponType] -> LimboKill.AffectsHouse` +- `[WarheadType] -> Crit.Affects` -> `[WarheadType] -> Crit.AffectsTarget` #### From ??? diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index b22d2230cb..ca0bfbd76c 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -8087,10 +8087,10 @@ msgstr "" #: ../../New-or-Enhanced-Logics.md:2255 msgid "" -"`Crit.Affects` can be used to customize types of targets that this " +"`Crit.AffectsTarget` can be used to customize types of targets that this " "Warhead can deal critical hits against. Critical hits cannot affect empty" " cells or cells containing only TerrainTypes, overlays etc." -msgstr "`Crit.Affects` 可用于自定义此弹头可暴击的目标类型。暴击不能影响空置单元格或仅包含地形对象和覆盖物等的单元格。" +msgstr "`Crit.AffectsTarget` 可用于自定义此弹头可暴击的目标类型。暴击不能影响空置单元格或仅包含地形对象和覆盖物等的单元格。" #: ../../New-or-Enhanced-Logics.md:2256 msgid "" @@ -8169,7 +8169,7 @@ msgid "" "Crit.ExtraDamage.ApplyFirepowerMult=false ; boolean\n" "Crit.Warhead= ; WarheadType\n" "Crit.Warhead.FullDetonation=true ; boolean\n" -"Crit.Affects=all ; List of Affected Target " +"Crit.AffectsTarget=all ; List of Affected Target " "Enumeration (none|land|water|infantry|units|buildings|all)\n" "Crit.AffectsHouses=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" @@ -8195,7 +8195,7 @@ msgstr "" "Crit.ExtraDamage.ApplyFirepowerMult=false ; boolean\n" "Crit.Warhead= ; WarheadType\n" "Crit.Warhead.FullDetonation=true ; boolean\n" -"Crit.Affects=all ; List of Affected Target " +"Crit.AffectsTarget=all ; List of Affected Target " "Enumeration (none|land|water|infantry|units|buildings|all)\n" "Crit.AffectsHouses=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 1bb537ea42..917cd512e5 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -156,7 +156,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_ExtraDamage_ApplyFirepowerMult.Read(exINI, pSection, "Crit.ExtraDamage.ApplyFirepowerMult"); this->Crit_Warhead.Read(exINI, pSection, "Crit.Warhead"); this->Crit_Warhead_FullDetonation.Read(exINI, pSection, "Crit.Warhead.FullDetonation"); - this->Crit_Affects.Read(exINI, pSection, "Crit.Affects"); + this->Crit_Affects.Read(exINI, pSection, "Crit.AffectsTarget"); this->Crit_AffectsHouses.Read(exINI, pSection, "Crit.AffectsHouses"); this->Crit_AnimList.Read(exINI, pSection, "Crit.AnimList"); this->Crit_AnimList_PickRandom.Read(exINI, pSection, "Crit.AnimList.PickRandom"); From 620b82bec6d6dd082566419f8d0860f5f549affb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Sat, 20 Dec 2025 15:41:45 +0800 Subject: [PATCH 6/8] =?UTF-8?q?`AffectsHouses`=E2=86=92`AffectsHouse`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 48 +++++----- docs/Whats-New.md | 9 +- .../LC_MESSAGES/New-or-Enhanced-Logics.po | 92 +++++++++---------- src/Ext/TechnoType/Body.cpp | 2 +- src/Ext/WarheadType/Body.cpp | 8 +- src/New/Type/Affiliated/TypeConvertGroup.cpp | 4 +- src/New/Type/AttachEffectTypeClass.cpp | 4 +- 7 files changed, 86 insertions(+), 81 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 73be90aa46..1edf324f06 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -50,7 +50,7 @@ This page describes all the engine features that are either new and introduced b - `Crit.Multiplier` and `Crit.ExtraChance` can be used to multiply the [critical hit](#chance-based-extra-damage-or-warhead-detonation--critical-hits) chance or grant a fixed bonus to it for the object the effect is attached to, respectively. - `Crit.AllowWarheads` can be used to list only Warheads that can benefit from this critical hit chance multiplier and `Crit.DisallowWarheads` weapons that are not allowed to, respectively. - `RevengeWeapon` can be used to temporarily grant the specified weapon as a [revenge weapon](#revenge-weapon) for the attached object. - - `RevengeWeapon.AffectsHouses` customizes which houses can trigger the revenge weapon. + - `RevengeWeapon.AffectsHouse` customizes which houses can trigger the revenge weapon. - `RevengeWeapon.UseInvokerAsOwner` can be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the weapon's owner & invoker instead of the object the effect is attached to. - `ReflectDamage` can be set to true to have any positive damage dealt to the object the effect is attached to be reflected back to the attacker. `ReflectDamage.Warhead` determines which Warhead is used to deal the damage, defaults to `[CombatDamage] -> C4Warhead`. If `ReflectDamage.Warhead.Detonate` is set to true, the Warhead is fully detonated instead of used to simply deal damage. `ReflectDamage.Chance` determines the chance of reflection. `ReflectDamage.Multiplier` is a multiplier to the damage received and then reflected back, while `ReflectDamage.Override` directly overrides the damage. Already reflected damage cannot be further reflected back. - Warheads can prevent reflect damage from occuring by setting `SuppressReflectDamage` to true. `SuppressReflectDamage.Types` can control which AttachEffectTypes' reflect damage is suppressed, if none are listed then all of them are suppressed. `SuppressReflectDamage.Groups` does the same thing but for all AttachEffectTypes in the listed groups. @@ -136,13 +136,13 @@ Crit.ExtraChance=0.0 ; floating point value Crit.AllowWarheads= ; List of WarheadTypes Crit.DisallowWarheads= ; List of WarheadTypes RevengeWeapon= ; WeaponType -RevengeWeapon.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +RevengeWeapon.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) RevengeWeapon.UseInvokerAsOwner=false ; boolean ReflectDamage=false ; boolean ReflectDamage.Warhead= ; WarheadType ReflectDamage.Warhead.Detonate=false ; WarheadType ReflectDamage.Multiplier=1.0 ; floating point value, percents or absolute -ReflectDamage.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +ReflectDamage.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ReflectDamage.Chance=1.0 ; floating point value ReflectDamage.Override= ; integer ReflectDamage.UseInvokerAsOwner=false ; boolean @@ -1079,8 +1079,8 @@ AISuperWeaponDelay= ; integer, game frames - Warheads can now change TechnoTypes of affected units to other Types in the same category (infantry to infantry, vehicles to vehicles, aircraft to aircraft). - `ConvertN.From` (where N is 0, 1, 2...) specifies which TechnoTypes are valid for conversion. This entry can have many types listed, meanging that many types will be converted at once. When no types are included, conversion will affect all valid targets. - `ConvertN.To` specifies the TechnoType which is the result of conversion. - - `ConvertN.AffectsHouses` specifies whose units can be converted. - - `Convert.From`, `Convert.To` and `Convert.AffectsHouses` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectsHouses` if only one pair is specified. + - `ConvertN.AffectsHouse` specifies whose units can be converted. + - `Convert.From`, `Convert.To` and `Convert.AffectsHouse` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectsHouse` if only one pair is specified. - Conversion affects *all* existing units of set TechnoTypes, this includes units in: transports, occupied buildings, buildings with `InfantryAbsorb=yes` or `UnitAbsorb=yes`, buildings with `Bunker=yes`. In example, this superweapon would convert all owned and friendly `SOLDIERA` and `SOLDIERB` to `NEWSOLDIER`: @@ -1088,7 +1088,7 @@ In example, this superweapon would convert all owned and friendly `SOLDIERA` and [ExampleSW] Convert.From=SOLDIERA,SOLDIERB Convert.To=NEWSOLDIER -Convert.AffectsHouses=team +Convert.AffectsHouse=team ``` In `rulesmd.ini`: @@ -1096,12 +1096,12 @@ In `rulesmd.ini`: [SOMESW] ; SuperWeaponType ConvertN.From= ; List of TechnoTypes ConvertN.To= ; TechnoType -ConvertN.AffectsHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +ConvertN.AffectsHouse=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ; where N = 0, 1, 2, ... ; or Convert.From= ; List of TechnoTypes Convert.To= ; TechnoType -Convert.AffectsHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +Convert.AffectsHouse=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ``` ```{warning} @@ -1998,7 +1998,7 @@ Convert.ResetMindControl=false ; boolean *Revenge Weapon usage in [RA2: Reboot](https://www.moddb.com/mods/reboot)* - Similar to `DeathWeapon` in that it is fired after a TechnoType is killed, but with the difference that it will be fired on whoever dealt the damage that killed the TechnoType. If TechnoType died of sources other than direct damage dealt by another TechnoType, `RevengeWeapon` will not be fired. - - `RevengeWeapon.AffectsHouses` can be used to filter which houses the damage that killed the TechnoType is allowed to come from to fire the weapon. + - `RevengeWeapon.AffectsHouse` can be used to filter which houses the damage that killed the TechnoType is allowed to come from to fire the weapon. - It is possible to grant revenge weapons through [attached effects](#attached-effects) as well. - If a Warhead has `SuppressRevengeWeapons` set to true, it will not trigger revenge weapons. `SuppressRevengeWeapons.Types` can be used to list WeaponTypes affected by this, if none are listed all WeaponTypes are affected. @@ -2006,7 +2006,7 @@ In `rulesmd.ini`: ```ini [SOMETECHNO] ; TechnoType RevengeWeapon= ; WeaponType -RevengeWeapon.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +RevengeWeapon.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) [SOMEWARHEAD] ; WarheadType SuppressRevengeWeapons=false ; boolean @@ -2262,7 +2262,7 @@ AffectsGround=true ; boolean - `Crit.Warhead` can be used to set a Warhead to detonate instead of using current Warhead. - `Crit.Warhead.FullDetonation` controls 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. - `Crit.AffectsTarget` can be used to customize types of targets that this Warhead can deal critical hits against. Critical hits cannot affect empty cells or cells containing only TerrainTypes, overlays etc. - - `Crit.AffectsHouses` can be used to customize houses that this Warhead can deal critical hits against. + - `Crit.AffectsHouse` can be used to customize houses that this Warhead can deal critical hits against. - `Crit.AffectsBelowPercent` and `Crit.AffectsAbovePercent` can be used to set the health percentage that targets must be above and/or below/equal to respectively to be affected by critical hits. If target has zero health left this check is bypassed. - `Crit.AnimList` can be used to set a list of animations used instead of Warhead's `AnimList` if Warhead deals a critical hit to even one target. If `Crit.AnimList.PickRandom` is set (defaults to `AnimList.PickRandom`) then the animation is chosen randomly from the list. If `Crit.AnimList.CreateAll` is set (defaults to `AnimList.CreateAll`), all animations from the list are created. - `Crit.AnimOnAffectedTargets`, if set, makes the animation(s) from `Crit.AnimList` play on each affected target *in addition* to animation from Warhead's `AnimList` playing as normal instead of replacing `AnimList` animation. Note that because these animations are independent from `AnimList`, `Crit.AnimList.PickRandom` and `Crit.AnimList.CreateAll` will not default to their `AnimList` counterparts here and need to be explicitly set if needed. @@ -2280,7 +2280,7 @@ Crit.ExtraDamage.ApplyFirepowerMult=false ; boolean Crit.Warhead= ; WarheadType Crit.Warhead.FullDetonation=true ; boolean Crit.AffectsTarget=all ; List of Affected Target Enumeration (none|land|water|infantry|units|buildings|all) -Crit.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +Crit.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) Crit.AffectsBelowPercent=1.0 ; floating point value, percents or absolute (0.0-1.0) Crit.AffectsAbovePercent=0.0 ; floating point value, percents or absolute (0.0-1.0) Crit.AnimList= ; List of AnimationTypes @@ -2306,15 +2306,15 @@ If you set `Crit.Warhead` to the same Warhead it is defined on, or create a chai - Warheads can now change TechnoTypes of affected units to other Types in the same category (infantry to infantry, vehicles to vehicles, aircraft to aircraft). - `ConvertN.From` (where N is 0, 1, 2...) specifies which TechnoTypes are valid for conversion. This entry can have many types listed, meanging that many types will be converted at once. When no types are included, conversion will affect all valid targets. - `ConvertN.To` specifies the TechnoType which is the result of conversion. - - `ConvertN.AffectsHouses` specifies whose units can be converted. - - `Convert.From`, `Convert.To` and `Convert.AffectsHouses` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectsHouses` if only one pair is specified. + - `ConvertN.AffectsHouse` specifies whose units can be converted. + - `Convert.From`, `Convert.To` and `Convert.AffectsHouse` (without numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and `Convert0.AffectsHouse` if only one pair is specified. In example, this warhead would convert all affected owned and friendly `SOLDIERA` and `SOLDIERB` to `NEWSOLDIER`: ```ini [ExampleWH] Convert.From=SOLDIERA,SOLDIERB Convert.To=NEWSOLDIER -Convert.AffectsHouses=team +Convert.AffectsHouse=team ``` In `rulesmd.ini`: @@ -2322,12 +2322,12 @@ In `rulesmd.ini`: [SOMEWARHEAD] ; WarheadType ConvertN.From= ; List of TechnoTypes ConvertN.To= ; TechnoType -ConvertN.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +ConvertN.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ; where N = 0, 1, 2, ... ; or Convert.From= ; List of TechnoTypes Convert.To= ; TechnoType -Convert.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +Convert.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) ``` ```{warning} @@ -2415,8 +2415,8 @@ PlayAnimAboveSurface=false ; boolean - 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. - `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. - `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. - - `DetonateOnAllMapObjects.AffectsHouses` 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. - - `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.AffectsHouses` take priority over this setting. + - `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. + - `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. - `DetonateOnAllMapObjects.IgnoreTypes` can be used to list specific TechnoTypes to be never considered as valid targets. - `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. @@ -2426,21 +2426,21 @@ PlayAnimAboveSurface=false ; boolean DetonateOnAllMapObjects=false ; boolean DetonateOnAllMapObjects.Full=true ; boolean DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all) -DetonateOnAllMapObjects.AffectsHouses=none ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes DetonateOnAllMapObjects.RequireVerses=false ; boolean ``` ```{warning} -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/Houses/Types` etc.) is advised. +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. ``` ### Fire weapon when Warhead kills something - `KillWeapon` will be fired at the target TechnoType's location once it's killed by this Warhead. - `KillWeapon.OnFirer` will be fired at the attacker's location once the target TechnoType is killed by this Warhead. If the source of this Warhead is not another TechnoType, `KillWeapon.OnFirer` will not be fired. -- `KillWeapon.AffectsHouses` / `KillWeapon.OnFirer.AffectsHouses` and `KillWeapon.Affects` / `KillWeapon.OnFirer.Affects` can be used to filter which houses targets can belong to and which types of targets are be considered valid for `KillWeapon` and `KillWeapon.OnFirer` respectively. +- `KillWeapon.AffectsHouse` / `KillWeapon.OnFirer.AffectsHouse` and `KillWeapon.Affects` / `KillWeapon.OnFirer.Affects` can be used to filter which houses targets can belong to and which types of targets are be considered valid for `KillWeapon` and `KillWeapon.OnFirer` respectively. - If the source of this Warhead is not another TechnoType, `KillWeapon` will be fired regardless of the target's house or type. - If a TechnoType has `SuppressKillWeapons` set to true, it will not trigger `KillWeapon` or `KillWeapon.OnFirer` upon being killed. `SuppressKillWeapons.Types` can be used to list WeaponTypes affected by this, if none are listed all WeaponTypes are affected. @@ -2449,8 +2449,8 @@ While this feature can provide better performance than a large `CellSpread` valu [SOMEWARHEAD] ; WarheadType KillWeapon= ; WeaponType KillWeapon.OnFirer= ; WeaponType -KillWeapon.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) -KillWeapon.OnFirer.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +KillWeapon.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) +KillWeapon.OnFirer.AffectsHouse=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) KillWeapon.Affects=all ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all) KillWeapon.OnFirer.Affects=all ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all) diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 99dfeb13d7..5498ce71e2 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -96,10 +96,15 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] #### From 0.4 - `[WarheadType] -> Crit.AffectBelowPercent` -> `[WarheadType] -> Crit.AffectsBelowPercent`. -- `[WarheadType] -> DetonateOnAllMapObjects.AffectHouses` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsHouses` -- `[WarheadType/SuperWeaponType] -> Convert(N).AffectedHouses` -> `[WarheadType/SuperWeaponType] -> Convert(N).AffectsHouses` +- `[WarheadType] -> DetonateOnAllMapObjects.AffectHouses` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsHouse` +- `[WarheadType/SuperWeaponType] -> Convert(N).AffectedHouses` -> `[WarheadType/SuperWeaponType] -> Convert(N).AffectsHouse` - `[SuperWeaponType] -> LimboKill.Affected` -> `[SuperWeaponType] -> LimboKill.AffectsHouse` - `[WarheadType] -> Crit.Affects` -> `[WarheadType] -> Crit.AffectsTarget` +- `[AttachEffectType/TechnoType] -> RevengeWeapon.AffectsHouses` -> `[AttachEffectType/TechnoType] -> RevengeWeapon.AffectsHouse` +- `[AttachEffectType] -> ReflectDamage.AffectsHouses` -> `[AttachEffectType] -> ReflectDamage.AffectsHouse` +- `[WarheadType] -> Crit.AffectsHouses` -> `[WarheadType] -> Crit.AffectsHouse` +- `[WarheadType] -> KillWeapon.AffectsHouses` -> `[WarheadType] -> KillWeapon.AffectsHouse` +- `[WarheadType] -> KillWeapon.OnFirer.AffectsHouses` -> `[WarheadType] -> KillWeapon.OnFirer.AffectsHouse` #### From ??? diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index ca0bfbd76c..1f94bc0bcf 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -408,9 +408,9 @@ msgstr "`RevengeWeapon` 可用于通过 AE 为被附加对象设置一个临时 #: ../../New-or-Enhanced-Logics.md:53 msgid "" -"`RevengeWeapon.AffectsHouses` customizes which houses can trigger the " +"`RevengeWeapon.AffectsHouse` customizes which houses can trigger the " "revenge weapon." -msgstr "`RevengeWeapon.AffectsHouses` 定义哪些所属方可以触发这个复仇武器。" +msgstr "`RevengeWeapon.AffectsHouse` 定义哪些所属方可以触发这个复仇武器。" #: ../../New-or-Enhanced-Logics.md:54 msgid "" @@ -805,7 +805,7 @@ msgid "" "Crit.DisallowWarheads= ; List of WarheadTypes" "\n" "RevengeWeapon= ; WeaponType\n" -"RevengeWeapon.AffectsHouses=all ; List of Affected " +"RevengeWeapon.AffectsHouse=all ; List of Affected " "House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "RevengeWeapon.UseInvokerAsOwner=false ; boolean\n" "ReflectDamage=false ; boolean\n" @@ -813,7 +813,7 @@ msgid "" "ReflectDamage.Warhead.Detonate=false ; WarheadType\n" "ReflectDamage.Multiplier=1.0 ; floating point " "value, percents or absolute\n" -"ReflectDamage.AffectsHouses=all ; List of Affected " +"ReflectDamage.AffectsHouse=all ; List of Affected " "House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "ReflectDamage.Chance=1.0 ; floating point value" "\n" @@ -964,7 +964,7 @@ msgstr "" "Crit.DisallowWarheads= ; List of WarheadTypes" "\n" "RevengeWeapon= ; WeaponType\n" -"RevengeWeapon.AffectsHouses=all ; List of Affected " +"RevengeWeapon.AffectsHouse=all ; List of Affected " "House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "RevengeWeapon.UseInvokerAsOwner=false ; boolean\n" "ReflectDamage=false ; boolean\n" @@ -972,7 +972,7 @@ msgstr "" "ReflectDamage.Warhead.Detonate=false ; WarheadType\n" "ReflectDamage.Multiplier=1.0 ; floating point " "value, percents or absolute\n" -"ReflectDamage.AffectsHouses=all ; List of Affected " +"ReflectDamage.AffectsHouse=all ; List of Affected " "House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "ReflectDamage.Chance=1.0 ; floating point value" "\n" @@ -4500,17 +4500,17 @@ msgid "`ConvertN.To` specifies the TechnoType which is the result of conversion. msgstr "`ConvertN.To` 指定转换后的科技类型。" #: ../../New-or-Enhanced-Logics.md:1082 ../../New-or-Enhanced-Logics.md:2244 -msgid "`ConvertN.AffectsHouses` specifies whose units can be converted." -msgstr "`ConvertN.AffectsHouses` 指定哪些所属方的单位可以被转换。" +msgid "`ConvertN.AffectsHouse` specifies whose units can be converted." +msgstr "`ConvertN.AffectsHouse` 指定哪些所属方的单位可以被转换。" #: ../../New-or-Enhanced-Logics.md:1083 ../../New-or-Enhanced-Logics.md:2301 msgid "" -"`Convert.From`, `Convert.To` and `Convert.AffectsHouses` (without " +"`Convert.From`, `Convert.To` and `Convert.AffectsHouse` (without " "numbers) are a valid alternative to `Convert0.From`, `Convert0.To` and " -"`Convert0.AffectsHouses` if only one pair is specified." +"`Convert0.AffectsHouse` if only one pair is specified." msgstr "" -"若只指定一组转换则 `Convert.From`、`Convert.To` 和 `Convert.AffectsHouses`(不带序号)相当于" -" `Convert0.From`、`Convert0.To` 和 `Convert0.AffectsHouses`的别称。" +"若只指定一组转换则 `Convert.From`、`Convert.To` 和 `Convert.AffectsHouse`(不带序号)相当于" +" `Convert0.From`、`Convert0.To` 和 `Convert0.AffectsHouse`的别称。" #: ../../New-or-Enhanced-Logics.md:1084 msgid "" @@ -4532,37 +4532,37 @@ msgid "" "[ExampleSW]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectsHouses=team\n" +"Convert.AffectsHouse=team\n" msgstr "" "[ExampleSW]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectsHouses=team\n" +"Convert.AffectsHouse=team\n" #: ../../New-or-Enhanced-Logics.md:1095 msgid "" "[SOMESW] ; SuperWeaponType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectsHouses=owner ; List of Affected House Enumeration " +"ConvertN.AffectsHouse=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectsHouses=owner ; List of Affected House Enumeration " +"Convert.AffectsHouse=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" msgstr "" "[SOMESW] ; SuperWeaponType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectsHouses=owner ; List of Affected House Enumeration " +"ConvertN.AffectsHouse=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectsHouses=owner ; List of Affected House Enumeration " +"Convert.AffectsHouse=owner ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" #: ../../New-or-Enhanced-Logics.md:1108 ../../New-or-Enhanced-Logics.md:1375 @@ -7355,10 +7355,10 @@ msgstr "" #: ../../New-or-Enhanced-Logics.md:1992 msgid "" -"`RevengeWeapon.AffectsHouses` can be used to filter which houses the " +"`RevengeWeapon.AffectsHouse` can be used to filter which houses the " "damage that killed the TechnoType is allowed to come from to fire the " "weapon." -msgstr "`RevengeWeapon.AffectsHouses` 可用于筛选可以对哪些所属方的击杀者发射武器。" +msgstr "`RevengeWeapon.AffectsHouse` 可用于筛选可以对哪些所属方的击杀者发射武器。" #: ../../New-or-Enhanced-Logics.md:1993 msgid "" @@ -7381,7 +7381,7 @@ msgstr "" msgid "" "[SOMETECHNO] ; TechnoType\n" "RevengeWeapon= ; WeaponType\n" -"RevengeWeapon.AffectsHouses=all ; List of Affected House Enumeration " +"RevengeWeapon.AffectsHouse=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "\n" "[SOMEWARHEAD] ; WarheadType\n" @@ -7390,7 +7390,7 @@ msgid "" msgstr "" "[SOMETECHNO] ; TechnoType\n" "RevengeWeapon= ; WeaponType\n" -"RevengeWeapon.AffectsHouses=all ; List of Affected House Enumeration " +"RevengeWeapon.AffectsHouse=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "\n" "[SOMEWARHEAD] ; WarheadType\n" @@ -8094,9 +8094,9 @@ msgstr "`Crit.AffectsTarget` 可用于自定义此弹头可暴击的目标类型 #: ../../New-or-Enhanced-Logics.md:2256 msgid "" -"`Crit.AffectsHouses` can be used to customize houses that this Warhead " +"`Crit.AffectsHouse` can be used to customize houses that this Warhead " "can deal critical hits against." -msgstr "`Crit.AffectsHouses` 可用于自定义此弹头可暴击的目标所属。" +msgstr "`Crit.AffectsHouse` 可用于自定义此弹头可暴击的目标所属。" #: ../../New-or-Enhanced-Logics.md:2257 msgid "" @@ -8171,7 +8171,7 @@ msgid "" "Crit.Warhead.FullDetonation=true ; boolean\n" "Crit.AffectsTarget=all ; List of Affected Target " "Enumeration (none|land|water|infantry|units|buildings|all)\n" -"Crit.AffectsHouses=all ; List of Affected House " +"Crit.AffectsHouse=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "Crit.AffectsBelowPercent=1.0 ; floating point value, " "percents or absolute (0.0-1.0)\n" @@ -8197,7 +8197,7 @@ msgstr "" "Crit.Warhead.FullDetonation=true ; boolean\n" "Crit.AffectsTarget=all ; List of Affected Target " "Enumeration (none|land|water|infantry|units|buildings|all)\n" -"Crit.AffectsHouses=all ; List of Affected House " +"Crit.AffectsHouse=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "Crit.AffectsBelowPercent=1.0 ; floating point value, " "percents or absolute (0.0-1.0)\n" @@ -8246,37 +8246,37 @@ msgid "" "[ExampleWH]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectsHouses=team\n" +"Convert.AffectsHouse=team\n" msgstr "" "[ExampleWH]\n" "Convert.From=SOLDIERA,SOLDIERB\n" "Convert.To=NEWSOLDIER\n" -"Convert.AffectsHouses=team\n" +"Convert.AffectsHouse=team\n" #: ../../New-or-Enhanced-Logics.md:2312 msgid "" "[SOMEWARHEAD] ; WarheadType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectsHouses=all ; List of Affected House Enumeration " +"ConvertN.AffectsHouse=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectsHouses=all ; List of Affected House Enumeration " +"Convert.AffectsHouse=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" msgstr "" "[SOMEWARHEAD] ; WarheadType\n" "ConvertN.From= ; List of TechnoTypes\n" "ConvertN.To= ; TechnoType\n" -"ConvertN.AffectsHouses=all ; List of Affected House Enumeration " +"ConvertN.AffectsHouse=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" "; where N = 0, 1, 2, ...\n" "; or\n" "Convert.From= ; List of TechnoTypes\n" "Convert.To= ; TechnoType\n" -"Convert.AffectsHouses=all ; List of Affected House Enumeration " +"Convert.AffectsHouse=all ; List of Affected House Enumeration " "(none|owner/self|allies/ally|team|enemies/enemy|all)\n" #: ../../New-or-Enhanced-Logics.md:2332 @@ -8559,13 +8559,13 @@ msgstr "" #: ../../New-or-Enhanced-Logics.md:2409 msgid "" -"`DetonateOnAllMapObjects.AffectsHouses` is used to filter which houses " +"`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." msgstr "" -"`DetonateOnAllMapObjects.AffectsHouses` 用于在非 `none` " +"`DetonateOnAllMapObjects.AffectsHouse` 用于在非 `none` " "时筛选哪些所属方的目标可以被视为有效。仅适用于发射弹头的所属方已知的情况。默认为 `none`,因为包含所有所属方可能会影响性能。" #: ../../New-or-Enhanced-Logics.md:2410 @@ -8574,12 +8574,12 @@ msgid "" "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.AffectsHouses` take priority over this setting." +"`DetonateOnAllMapObjects.AffectsHouse` take priority over this setting." msgstr "" "`DetonateOnAllMapObjects.AffectTypes` " "可用于列出特定的科技类型作为有效目标。如果列出了任何有效科技类型,则只有匹配的对象才会被作为目标。注意 " "`DetonateOnAllMapObjects.AffectTargets` 和 " -"`DetonateOnAllMapObjects.AffectsHouses` 的优先级高于此设置。" +"`DetonateOnAllMapObjects.AffectsHouse` 的优先级高于此设置。" #: ../../New-or-Enhanced-Logics.md:2411 msgid "" @@ -8606,7 +8606,7 @@ msgid "" "DetonateOnAllMapObjects.Full=true ; boolean\n" "DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" -"DetonateOnAllMapObjects.AffectsHouses=none ; List of Affected House " +"DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes\n" "DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes\n" @@ -8617,7 +8617,7 @@ msgstr "" "DetonateOnAllMapObjects.Full=true ; boolean\n" "DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" -"DetonateOnAllMapObjects.AffectsHouses=none ; List of Affected House " +"DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes\n" "DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes\n" @@ -8629,7 +8629,7 @@ msgid "" "`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/Houses/Types` etc.) is advised." +"(`AffectTargets/House/Types` etc.) is advised." msgstr "" "虽然此功能比巨大的 `CellSpread` 值性能上好得多但它仍然可能减慢游戏速度。特别是与动画、AlphaImage 等共同使用时。建议 " "modder 谨慎使用并通过筛选语句进行限制。" @@ -8654,13 +8654,13 @@ msgstr "如果可以追溯到弹头来自哪个单位,那么 `KillWeapon.OnFir #: ../../New-or-Enhanced-Logics.md:2434 msgid "" -"`KillWeapon.AffectsHouses` / `KillWeapon.OnFirer.AffectsHouses` and " +"`KillWeapon.AffectsHouse` / `KillWeapon.OnFirer.AffectsHouse` and " "`KillWeapon.Affects` / `KillWeapon.OnFirer.Affects` can be used to filter" " which houses targets can belong to and which types of targets are be " "considered valid for `KillWeapon` and `KillWeapon.OnFirer` respectively." msgstr "" -"`KillWeapon.AffectsHouses`/`KillWeapon.OnFirer.AffectsHouses` 和 " -"`KillWeapon.OnFirer.AffectsHouses`/`KillWeapon.OnFirer.Affects` " +"`KillWeapon.AffectsHouse`/`KillWeapon.OnFirer.AffectsHouse` 和 " +"`KillWeapon.OnFirer.AffectsHouse`/`KillWeapon.OnFirer.Affects` " "分别用于筛选哪些所属方和哪些类型的目标可以触发 `KillWeapon` 与 `KillWeapon.OnFirer`。" #: ../../New-or-Enhanced-Logics.md:2435 @@ -8685,9 +8685,9 @@ msgid "" "[SOMEWARHEAD] ; WarheadType\n" "KillWeapon= ; WeaponType\n" "KillWeapon.OnFirer= ; WeaponType\n" -"KillWeapon.AffectsHouses=all ; List of Affected House " +"KillWeapon.AffectsHouse=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" -"KillWeapon.OnFirer.AffectsHouses=all ; List of Affected House " +"KillWeapon.OnFirer.AffectsHouse=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "KillWeapon.Affects=all ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" @@ -8701,9 +8701,9 @@ msgstr "" "[SOMEWARHEAD] ; WarheadType\n" "KillWeapon= ; WeaponType\n" "KillWeapon.OnFirer= ; WeaponType\n" -"KillWeapon.AffectsHouses=all ; List of Affected House " +"KillWeapon.AffectsHouse=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" -"KillWeapon.OnFirer.AffectsHouses=all ; List of Affected House " +"KillWeapon.OnFirer.AffectsHouse=all ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" "KillWeapon.Affects=all ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" diff --git a/src/Ext/TechnoType/Body.cpp b/src/Ext/TechnoType/Body.cpp index 3caaa4f57a..092fed71e9 100644 --- a/src/Ext/TechnoType/Body.cpp +++ b/src/Ext/TechnoType/Body.cpp @@ -981,7 +981,7 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Tint_VisibleToHouses.Read(exINI, pSection, "Tint.VisibleToHouses"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); - this->RevengeWeapon_AffectsHouses.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); + this->RevengeWeapon_AffectsHouses.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RecountBurst.Read(exINI, pSection, "RecountBurst"); diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 917cd512e5..739f27ca72 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -157,7 +157,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->Crit_Warhead.Read(exINI, pSection, "Crit.Warhead"); this->Crit_Warhead_FullDetonation.Read(exINI, pSection, "Crit.Warhead.FullDetonation"); this->Crit_Affects.Read(exINI, pSection, "Crit.AffectsTarget"); - this->Crit_AffectsHouses.Read(exINI, pSection, "Crit.AffectsHouses"); + this->Crit_AffectsHouses.Read(exINI, pSection, "Crit.AffectsHouse"); this->Crit_AnimList.Read(exINI, pSection, "Crit.AnimList"); this->Crit_AnimList_PickRandom.Read(exINI, pSection, "Crit.AnimList.PickRandom"); this->Crit_AnimList_CreateAll.Read(exINI, pSection, "Crit.AnimList.CreateAll"); @@ -235,7 +235,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full"); this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses"); this->DetonateOnAllMapObjects_AffectTargets.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); - this->DetonateOnAllMapObjects_AffectHouses.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouses"); + this->DetonateOnAllMapObjects_AffectHouses.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouse"); this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes"); this->DetonateOnAllMapObjects_IgnoreTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.IgnoreTypes"); @@ -275,8 +275,8 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->KillWeapon.Read(exINI, pSection, "KillWeapon"); this->KillWeapon_OnFirer.Read(exINI, pSection, "KillWeapon.OnFirer"); - this->KillWeapon_AffectsHouses.Read(exINI, pSection, "KillWeapon.AffectsHouses"); - this->KillWeapon_OnFirer_AffectsHouses.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouses"); + this->KillWeapon_AffectsHouses.Read(exINI, pSection, "KillWeapon.AffectsHouse"); + this->KillWeapon_OnFirer_AffectsHouses.Read(exINI, pSection, "KillWeapon.OnFirer.AffectsHouse"); this->KillWeapon_Affects.Read(exINI, pSection, "KillWeapon.Affects"); this->KillWeapon_OnFirer_Affects.Read(exINI, pSection, "KillWeapon.OnFirer.Affects"); diff --git a/src/New/Type/Affiliated/TypeConvertGroup.cpp b/src/New/Type/Affiliated/TypeConvertGroup.cpp index 5c16b50ca3..ead20dac7d 100644 --- a/src/New/Type/Affiliated/TypeConvertGroup.cpp +++ b/src/New/Type/Affiliated/TypeConvertGroup.cpp @@ -56,7 +56,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, convertFrom.Read(exINI, pSection, tempBuffer); _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.To", i); convertTo.Read(exINI, pSection, tempBuffer); - _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectsHouses", i); + _snprintf_s(tempBuffer, sizeof(tempBuffer), "Convert%d.AffectsHouse", i); convertAffectedHouses.Read(exINI, pSection, tempBuffer); if (!convertTo.isset()) @@ -72,7 +72,7 @@ void TypeConvertGroup::Parse(std::vector& list, INI_EX& exINI, Nullable convertAffectedHouses; convertFrom.Read(exINI, pSection, "Convert.From"); convertTo.Read(exINI, pSection, "Convert.To"); - convertAffectedHouses.Read(exINI, pSection, "Convert.AffectsHouses"); + convertAffectedHouses.Read(exINI, pSection, "Convert.AffectsHouse"); if (convertTo.isset()) { if (!convertAffectedHouses.isset()) diff --git a/src/New/Type/AttachEffectTypeClass.cpp b/src/New/Type/AttachEffectTypeClass.cpp index 0b8191e409..bbf8c9bf27 100644 --- a/src/New/Type/AttachEffectTypeClass.cpp +++ b/src/New/Type/AttachEffectTypeClass.cpp @@ -145,14 +145,14 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->Crit_DisallowWarheads.Read(exINI, pSection, "Crit.DisallowWarheads"); this->RevengeWeapon.Read(exINI, pSection, "RevengeWeapon"); - this->RevengeWeapon_AffectsHouses.Read(exINI, pSection, "RevengeWeapon.AffectsHouses"); + this->RevengeWeapon_AffectsHouses.Read(exINI, pSection, "RevengeWeapon.AffectsHouse"); this->RevengeWeapon_UseInvokerAsOwner.Read(exINI, pSection, "RevengeWeapon.UseInvokerAsOwner"); this->ReflectDamage.Read(exINI, pSection, "ReflectDamage"); this->ReflectDamage_Warhead.Read(exINI, pSection, "ReflectDamage.Warhead"); this->ReflectDamage_Warhead_Detonate.Read(exINI, pSection, "ReflectDamage.Warhead.Detonate"); this->ReflectDamage_Multiplier.Read(exINI, pSection, "ReflectDamage.Multiplier"); - this->ReflectDamage_AffectsHouses.Read(exINI, pSection, "ReflectDamage.AffectsHouses"); + this->ReflectDamage_AffectsHouses.Read(exINI, pSection, "ReflectDamage.AffectsHouse"); this->ReflectDamage_Chance.Read(exINI, pSection, "ReflectDamage.Chance"); this->ReflectDamage_Override.Read(exINI, pSection, "ReflectDamage.Override"); this->ReflectDamage_UseInvokerAsOwner.Read(exINI, pSection, "ReflectDamage.UseInvokerAsOwner"); From 0da2d1a339101621e61c6e1a4c4716a990273343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Sat, 20 Dec 2025 15:42:41 +0800 Subject: [PATCH 7/8] =?UTF-8?q?`AffectTargets`=E2=86=92`AffectsTarget`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 12 +++++----- docs/Whats-New.md | 2 ++ .../LC_MESSAGES/New-or-Enhanced-Logics.po | 23 +++++++++---------- src/Ext/WarheadType/Body.cpp | 2 +- src/New/Type/AttachEffectTypeClass.cpp | 2 +- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 1edf324f06..7bf46a909e 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -24,7 +24,7 @@ This page describes all the engine features that are either new and introduced b - `PenetratesForceShield` can be used to set this separately for Force Shielded objects, defaults to value of `PenetratesIronCurtain`. - `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. - `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`. - - `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. + - `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. - `Animation` defines animation to play in an indefinite loop for as long as the effect is active on the object it is attached to. - If `Animation.ResetOnReapply` is set to true, the animation playback is reset every time the effect is applied if `Cumulative=false`. - `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 PenetratesForceShield= ; boolean AffectTypes= ; List of TechnoTypes IgnoreTypes= ; List of TechnoTypes -AffectTargets=all ; List of TechnoType Enumeration (none|infantry|units|aircraft|buildings|all) +AffectsTarget=all ; List of TechnoType Enumeration (none|infantry|units|aircraft|buildings|all) Animation= ; AnimationType Animation.ResetOnReapply=false ; boolean Animation.OfflineAction=Hides ; AttachedAnimFlag (None, Hides, Temporal, Paused or PausedTemporal) @@ -2414,9 +2414,9 @@ PlayAnimAboveSurface=false ; boolean - 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. - `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. - - `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. + - `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. - `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. - - `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. + - `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. - `DetonateOnAllMapObjects.IgnoreTypes` can be used to list specific TechnoTypes to be never considered as valid targets. - `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. @@ -2425,7 +2425,7 @@ PlayAnimAboveSurface=false ; boolean [SOMEWARHEAD] ; WarheadType DetonateOnAllMapObjects=false ; boolean DetonateOnAllMapObjects.Full=true ; boolean -DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all) +DetonateOnAllMapObjects.AffectsTarget=none ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all) DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all) DetonateOnAllMapObjects.AffectTypes= ; List of TechnoTypes DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes @@ -2433,7 +2433,7 @@ DetonateOnAllMapObjects.RequireVerses=false ; boolean ``` ```{warning} -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. +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. ``` ### Fire weapon when Warhead kills something diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 5498ce71e2..5fe48f95f8 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -105,6 +105,8 @@ You can use the migration utility (can be found on [Phobos supplementaries repo] - `[WarheadType] -> Crit.AffectsHouses` -> `[WarheadType] -> Crit.AffectsHouse` - `[WarheadType] -> KillWeapon.AffectsHouses` -> `[WarheadType] -> KillWeapon.AffectsHouse` - `[WarheadType] -> KillWeapon.OnFirer.AffectsHouses` -> `[WarheadType] -> KillWeapon.OnFirer.AffectsHouse` +- `[AttachEffectType] -> AffectTargets` -> `[AttachEffectType] -> AffectsTarget` +- `[WarheadType] -> DetonateOnAllMapObjects.AffectTargets` -> `[WarheadType] -> DetonateOnAllMapObjects.AffectsTarget` #### From ??? diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index 1f94bc0bcf..f886538992 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -182,13 +182,12 @@ msgstr "" #: ../../New-or-Enhanced-Logics.md:27 msgid "" -"`AffectTargets`, if set to a non-empty list, restricts the effect to only" +"`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." msgstr "" -"如果 `AffectTargets` 设为非空列表,则 AE " -"仅可对特定大类目标生效(例如步兵、载具、战机、建筑)。此项检查在两个类型名单过滤之后执行。" +"如果 `AffectsTarget` 设为非空列表,则 AE 仅可对特定大类目标生效(例如步兵、载具、战机、建筑)。此项检查在两个类型名单过滤之后执行。" #: ../../New-or-Enhanced-Logics.md:28 msgid "" @@ -750,7 +749,7 @@ msgid "" "PenetratesForceShield= ; boolean\n" "AffectTypes= ; List of TechnoTypes\n" "IgnoreTypes= ; List of TechnoTypes\n" -"AffectTargets=all ; List of TechnoType " +"AffectsTarget=all ; List of TechnoType " "Enumeration (none|infantry|units|aircraft|buildings|all)\n" "Animation= ; AnimationType\n" "Animation.ResetOnReapply=false ; boolean\n" @@ -909,7 +908,7 @@ msgstr "" "PenetratesForceShield= ; boolean\n" "AffectTypes= ; List of TechnoTypes\n" "IgnoreTypes= ; List of TechnoTypes\n" -"AffectTargets=all ; List of TechnoType " +"AffectsTarget=all ; List of TechnoType " "Enumeration (none|infantry|units|aircraft|buildings|all)\n" "Animation= ; AnimationType\n" "Animation.ResetOnReapply=false ; boolean\n" @@ -8546,14 +8545,14 @@ msgstr "" #: ../../New-or-Enhanced-Logics.md:2408 msgid "" -"`DetonateOnAllMapObjects.AffectTargets` is used to filter which types of " +"`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." msgstr "" -"`DetonateOnAllMapObjects.AffectTargets` 用于在非 `none` " +"`DetonateOnAllMapObjects.AffectsTarget` 用于在非 `none` " "时筛选哪些类型的目标(科技类型)可被视为有效。仅 `none`、`all`、`aircraft`、`buildings`、`infantry` 和" " `units` 是有效值。默认为 `none`,因为包含所有对象类型可能会影响性能。" @@ -8573,12 +8572,12 @@ msgid "" "`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.AffectsTarget` and " "`DetonateOnAllMapObjects.AffectsHouse` take priority over this setting." msgstr "" "`DetonateOnAllMapObjects.AffectTypes` " "可用于列出特定的科技类型作为有效目标。如果列出了任何有效科技类型,则只有匹配的对象才会被作为目标。注意 " -"`DetonateOnAllMapObjects.AffectTargets` 和 " +"`DetonateOnAllMapObjects.AffectsTarget` 和 " "`DetonateOnAllMapObjects.AffectsHouse` 的优先级高于此设置。" #: ../../New-or-Enhanced-Logics.md:2411 @@ -8604,7 +8603,7 @@ msgid "" "[SOMEWARHEAD] ; WarheadType\n" "DetonateOnAllMapObjects=false ; boolean\n" "DetonateOnAllMapObjects.Full=true ; boolean\n" -"DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target " +"DetonateOnAllMapObjects.AffectsTarget=none ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" "DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" @@ -8615,7 +8614,7 @@ msgstr "" "[SOMEWARHEAD] ; WarheadType\n" "DetonateOnAllMapObjects=false ; boolean\n" "DetonateOnAllMapObjects.Full=true ; boolean\n" -"DetonateOnAllMapObjects.AffectTargets=none ; List of Affected Target " +"DetonateOnAllMapObjects.AffectsTarget=none ; List of Affected Target " "Enumeration (none|aircraft|buildings|infantry|units|all)\n" "DetonateOnAllMapObjects.AffectsHouse=none ; List of Affected House " "Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n" @@ -8629,7 +8628,7 @@ msgid "" "`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." +"(`AffectsTarget/House/Types` etc.) is advised." msgstr "" "虽然此功能比巨大的 `CellSpread` 值性能上好得多但它仍然可能减慢游戏速度。特别是与动画、AlphaImage 等共同使用时。建议 " "modder 谨慎使用并通过筛选语句进行限制。" diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 739f27ca72..319b125cc9 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -234,7 +234,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->DetonateOnAllMapObjects.Read(exINI, pSection, "DetonateOnAllMapObjects"); this->DetonateOnAllMapObjects_Full.Read(exINI, pSection, "DetonateOnAllMapObjects.Full"); this->DetonateOnAllMapObjects_RequireVerses.Read(exINI, pSection, "DetonateOnAllMapObjects.RequireVerses"); - this->DetonateOnAllMapObjects_AffectTargets.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTargets"); + this->DetonateOnAllMapObjects_AffectTargets.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsTarget"); this->DetonateOnAllMapObjects_AffectHouses.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectsHouse"); this->DetonateOnAllMapObjects_AffectTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.AffectTypes"); this->DetonateOnAllMapObjects_IgnoreTypes.Read(exINI, pSection, "DetonateOnAllMapObjects.IgnoreTypes"); diff --git a/src/New/Type/AttachEffectTypeClass.cpp b/src/New/Type/AttachEffectTypeClass.cpp index bbf8c9bf27..81b2bbff21 100644 --- a/src/New/Type/AttachEffectTypeClass.cpp +++ b/src/New/Type/AttachEffectTypeClass.cpp @@ -103,7 +103,7 @@ void AttachEffectTypeClass::LoadFromINI(CCINIClass* pINI) this->PenetratesForceShield.Read(exINI, pSection, "PenetratesForceShield"); this->AffectTypes.Read(exINI, pSection, "AffectTypes"); this->IgnoreTypes.Read(exINI, pSection, "IgnoreTypes"); - this->AffectTargets.Read(exINI, pSection, "AffectTargets"); + this->AffectTargets.Read(exINI, pSection, "AffectsTarget"); this->Animation.Read(exINI, pSection, "Animation"); this->CumulativeAnimations.Read(exINI, pSection, "CumulativeAnimations"); From 503a27ce85bd911b057b56472ad643d52e3cb455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=9D=E5=8D=83=E5=A4=A9=E5=8D=8E?= <1065703286@qq.com> Date: Sat, 20 Dec 2025 15:52:56 +0800 Subject: [PATCH 8/8] =?UTF-8?q?`AutoFire`=E2=86=92`AutoTargetOwnPosition`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 8 ++++---- .../LC_MESSAGES/New-or-Enhanced-Logics.po | 18 +++++++++--------- src/Ext/TechnoType/Body.cpp | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 7bf46a909e..0c3bfaa39d 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1433,13 +1433,13 @@ Passengers.SyncOwner.RevertOnExit=true ; boolean ### Automatically firing weapons -- You can now make TechnoType automatically fire its weapon(s) without having to scan for suitable targets by setting `AutoFire`, on either its base cell (in which case the weapon that is used for force-firing is used) or itself (in which case normal targeting and weapon selection rules and are respected) depending on if `AutoFire.TargetSelf` is set or not. +- You can now make TechnoType automatically fire its weapon(s) without having to scan for suitable targets by setting `AutoTargetOwnPosition`, on either its base cell (in which case the weapon that is used for force-firing is used) or itself (in which case normal targeting and weapon selection rules and are respected) depending on if `AutoTargetOwnPosition.Self` is set or not. In `rulesmd.ini`: ```ini -[SOMETECHNO] ; TechnoType -AutoFire=false ; boolean -AutoFire.TargetSelf=false ; boolean +[SOMETECHNO] ; TechnoType +AutoTargetOwnPosition=false ; boolean +AutoTargetOwnPosition.Self=false ; boolean ``` ```{note} diff --git a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po index f886538992..8aa7ea6f8c 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po @@ -5619,24 +5619,24 @@ msgstr "自动发射武器" #: ../../New-or-Enhanced-Logics.md:1436 msgid "" "You can now make TechnoType automatically fire its weapon(s) without " -"having to scan for suitable targets by setting `AutoFire`, on either its " +"having to scan for suitable targets by setting `AutoTargetOwnPosition`, on either its " "base cell (in which case the weapon that is used for force-firing is " "used) or itself (in which case normal targeting and weapon selection " -"rules and are respected) depending on if `AutoFire.TargetSelf` is set or " +"rules and are respected) depending on if `AutoTargetOwnPosition.Self` is set or " "not." msgstr "" -"现在你可以设置 `AutoFire` 使科技类型根据 `AutoFire.TargetSelf` " +"现在你可以设置 `AutoTargetOwnPosition` 使科技类型根据 `AutoTargetOwnPosition.Self` " "选择当前单元格或开火者自身自动发射其武器而无需检索一个合适的目标。" #: ../../New-or-Enhanced-Logics.md:1439 msgid "" -"[SOMETECHNO] ; TechnoType\n" -"AutoFire=false ; boolean\n" -"AutoFire.TargetSelf=false ; boolean\n" +"[SOMETECHNO] ; TechnoType\n" +"AutoTargetOwnPosition=false ; boolean\n" +"AutoTargetOwnPosition.Self=false ; boolean\n" msgstr "" -"[SOMETECHNO] ; TechnoType\n" -"AutoFire=false ; boolean\n" -"AutoFire.TargetSelf=false ; boolean\n" +"[SOMETECHNO] ; TechnoType\n" +"AutoTargetOwnPosition=false ; boolean\n" +"AutoTargetOwnPosition.Self=false ; boolean\n" msgid "To make this logic work properly, you need to ensure that there is no flag like `CanPassiveAquire=false` set on units that prevents target scanning." msgstr "为了让该逻辑正常工作,你需要确保单位上没有设置 `CanPassiveAquire=false` 等阻止索敌的语句。" diff --git a/src/Ext/TechnoType/Body.cpp b/src/Ext/TechnoType/Body.cpp index 092fed71e9..eded25017c 100644 --- a/src/Ext/TechnoType/Body.cpp +++ b/src/Ext/TechnoType/Body.cpp @@ -839,8 +839,8 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->OpenTransport_RangeBonus.Read(exINI, pSection, "OpenTransport.RangeBonus"); this->OpenTransport_DamageMultiplier.Read(exINI, pSection, "OpenTransport.DamageMultiplier"); - this->AutoFire.Read(exINI, pSection, "AutoFire"); - this->AutoFire_TargetSelf.Read(exINI, pSection, "AutoFire.TargetSelf"); + this->AutoFire.Read(exINI, pSection, "AutoTargetOwnPosition"); + this->AutoFire_TargetSelf.Read(exINI, pSection, "AutoTargetOwnPosition.Self"); this->NoSecondaryWeaponFallback.Read(exINI, pSection, "NoSecondaryWeaponFallback"); this->NoSecondaryWeaponFallback_AllowAA.Read(exINI, pSection, "NoSecondaryWeaponFallback.AllowAA");