From 8a7991c429b51c130b8911bfbdae59f06fbc6068 Mon Sep 17 00:00:00 2001 From: NetsuNegi39 Date: Wed, 25 Mar 2026 11:45:35 +0800 Subject: [PATCH 1/6] init --- CREDITS.md | 1 + docs/Fixed-or-Improved-Logics.md | 1 + docs/Whats-New.md | 1 + docs/locale/zh_CN/LC_MESSAGES/CREDITS.po | 6 ++++++ .../zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po | 6 ++++++ docs/locale/zh_CN/LC_MESSAGES/Whats-New.po | 6 ++++++ src/Misc/Hooks.BugFixes.cpp | 11 +++++++++++ 7 files changed, 32 insertions(+) diff --git a/CREDITS.md b/CREDITS.md index fbe33c4733..979468a780 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -517,6 +517,7 @@ This page lists all the individual contributions to the project by their author. - Fix the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead - Fix the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air - Fix an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` + - Fix an issue where techno's `Strength` was less than `[General] -> RepairStep`, which caused crashes during repairs - **Apollo** - Translucent SHP drawing patches - **ststl**: - Customizable `ShowTimer` priority of superweapons diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 2ee15a0dd5..8e510214af 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -313,6 +313,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead. - Fixed the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air. - Fixed an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes`. +- Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, which caused crashes during repairs. ## Fixes / interactions with other extensions diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 6760638c91..b932a105f7 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -623,6 +623,7 @@ Vanilla fixes: - Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead (by NetsuNegi) - Fixed the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air (by NetsuNegi) - Fixed an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` (by NetsuNegi) +- Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, which caused crashes during repairs (by NetsuNegi) Phobos fixes: - Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi) diff --git a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po index a83a9cb8de..eb1d204381 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po +++ b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po @@ -1694,6 +1694,12 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题" +msgid "" +"Fix an issue where techno's `Strength` was less than `[General] -> RepairStep`, " +"which caused crashes during repairs" +msgstr "" +"修复了当科技类型的 `Strength` 小于 `[General] -> RepairStep` 时可能导致在维修时发生崩溃的问题" + msgid "**Apollo** - Translucent SHP drawing patches" msgstr "**Apollo** - 半透明 SHP 绘制补丁" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po index 70d5a0fbf2..b38d8a7a7e 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po @@ -1606,6 +1606,12 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题。" +msgid "" +"Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, " +"which caused crashes during repairs" +msgstr "" +"修复了当科技类型的 `Strength` 小于 `[General] -> RepairStep` 时可能导致在维修时发生崩溃的问题。" + msgid "Fixes / interactions with other extensions" msgstr "修复或与其他扩展的交互" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po index 590ddb47f6..fdc9b0f8be 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po @@ -2124,6 +2124,12 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题(by NetsuNegi)" +msgid "" +"Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, " +"which caused crashes during repairs (by NetsuNegi)" +msgstr "" +"修复了当科技类型的 `Strength` 小于 `[General] -> RepairStep` 时可能导致在维修时发生崩溃的问题(by NetsuNegi)" + msgid "Phobos fixes:" msgstr "Phobos 过往版本问题修复:" diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index 67db318703..ffb84045a2 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -3260,3 +3260,14 @@ DEFINE_HOOK(0x54B3E7, JumpjetLocomotionClass_Move_To_LocomotorWarheadFix, 0x5) { return ImbueLocomotorTemp::Imbuing ? 0x54B3FC : 0; } + +DEFINE_HOOK(0x7120DD, TechnoTypeClass_GetRepairStepCost, 0x6) +{ + enum { SkipGameCode = 0x71210C }; + + GET(TechnoTypeClass*, pType, ESI); + GET(int, cost, EAX); + + R->EAX(static_cast((cost / (static_cast(pType->Strength) / RulesClass::Instance->RepairStep)) * RulesClass::Instance->RepairPercent)); + return SkipGameCode; +} From 188b7137e419339480d72707f4a15eeb0905a953 Mon Sep 17 00:00:00 2001 From: NetsuNegi39 Date: Wed, 25 Mar 2026 17:21:51 +0800 Subject: [PATCH 2/6] add global toggle --- src/Ext/Rules/Body.cpp | 3 +++ src/Ext/Rules/Body.h | 3 +++ src/Misc/Hooks.BugFixes.cpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/Ext/Rules/Body.cpp b/src/Ext/Rules/Body.cpp index 0feba814bd..24d8be3d65 100644 --- a/src/Ext/Rules/Body.cpp +++ b/src/Ext/Rules/Body.cpp @@ -297,6 +297,8 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI) this->AIAllToHunt.Read(exINI, GameStrings::General, "AIAllToHunt"); this->RepairBaseNodes.Read(exINI, GameStrings::Basic, "RepairBaseNodes"); + this->FixRepairStepCost.Read(exINI, GameStrings::General, "FixRepairStepCost"); + this->WarheadParticleAlphaImageIsLightFlash.Read(exINI, GameStrings::AudioVisual, "WarheadParticleAlphaImageIsLightFlash"); this->CombatLightDetailLevel.Read(exINI, GameStrings::AudioVisual, "CombatLightDetailLevel"); this->LightFlashAlphaImageDetailLevel.Read(exINI, GameStrings::AudioVisual, "LightFlashAlphaImageDetailLevel"); @@ -624,6 +626,7 @@ void RulesExt::ExtData::Serialize(T& Stm) .Process(this->AIFireSaleDelay) .Process(this->AIAllToHunt) .Process(this->RepairBaseNodes) + .Process(this->FixRepairStepCost) .Process(this->WarheadParticleAlphaImageIsLightFlash) .Process(this->CombatLightDetailLevel) .Process(this->LightFlashAlphaImageDetailLevel) diff --git a/src/Ext/Rules/Body.h b/src/Ext/Rules/Body.h index 813b7e5cdc..bb098335a8 100644 --- a/src/Ext/Rules/Body.h +++ b/src/Ext/Rules/Body.h @@ -240,6 +240,8 @@ class RulesExt Valueable AIAllToHunt; Valueable RepairBaseNodes; + Valueable FixRepairStepCost; + Valueable WarheadParticleAlphaImageIsLightFlash; Valueable CombatLightDetailLevel; Valueable LightFlashAlphaImageDetailLevel; @@ -512,6 +514,7 @@ class RulesExt , AIFireSaleDelay { 0 } , AIAllToHunt { true } , RepairBaseNodes { false } + , FixRepairStepCost { false } , WarheadParticleAlphaImageIsLightFlash { false } , CombatLightDetailLevel { 0 } , LightFlashAlphaImageDetailLevel { 0 } diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index ffb84045a2..b87febb834 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -3265,6 +3265,9 @@ DEFINE_HOOK(0x7120DD, TechnoTypeClass_GetRepairStepCost, 0x6) { enum { SkipGameCode = 0x71210C }; + if (!RulesExt::Global()->FixRepairStepCost) + return 0; + GET(TechnoTypeClass*, pType, ESI); GET(int, cost, EAX); From a55bbbc4224eb200b342c38ef07deaa59461e035 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Wed, 25 Mar 2026 23:20:33 +0800 Subject: [PATCH 3/6] Update docs --- CREDITS.md | 2 +- docs/Fixed-or-Improved-Logics.md | 10 ++++++++- docs/Whats-New.md | 2 +- docs/locale/zh_CN/LC_MESSAGES/CREDITS.po | 7 ++---- .../LC_MESSAGES/Fixed-or-Improved-Logics.po | 22 ++++++++++++++----- docs/locale/zh_CN/LC_MESSAGES/Whats-New.po | 14 +++++++----- 6 files changed, 37 insertions(+), 20 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 979468a780..73b47dace1 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -517,7 +517,7 @@ This page lists all the individual contributions to the project by their author. - Fix the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead - Fix the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air - Fix an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` - - Fix an issue where techno's `Strength` was less than `[General] -> RepairStep`, which caused crashes during repairs + - Allow the use of more precise calculation of repair costs - **Apollo** - Translucent SHP drawing patches - **ststl**: - Customizable `ShowTimer` priority of superweapons diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 8e510214af..e8c83a9a77 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -313,7 +313,6 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead. - Fixed the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air. - Fixed an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes`. -- Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, which caused crashes during repairs. ## Fixes / interactions with other extensions @@ -587,6 +586,15 @@ In `rulesmd.ini`: ColorAddUse8BitRGB=false ; boolean ``` +### Use of more precise calculation of repair costs + +- In vanilla, a calculation step for repairing technos performs a floor operation on the value after `Strength`/`RepairStep` and then uses it as a divisor for other calculations. This results in incorrect actual fund amounts and causes technos with `Strength` values less than `RepairStep` to crash due to division by zero whenever they are repaired. Now you can use a more precise cost calculation via the following flag. + +```ini +[General] +FixRepairStepCost=false ; boolean +``` + ### Veinholes & Weeds #### Veinholes diff --git a/docs/Whats-New.md b/docs/Whats-New.md index b932a105f7..8524beba4c 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -553,6 +553,7 @@ New: - [Implement `CurleyShuffle` for AircraftTypes](Fixed-or-Improved-Logics.md#implement-curleyshuffle-for-aircrafttypes) (ported from Vinifera by Noble_Fish) - Customize which parasite can remove by warhead (by NetsuNegi) - Add toggle of whether shield use ArmorMultiplier or not (by NetsuNegi) +- [Allow the use of more precise calculation of repair costs](Fixed-or-Improved-Logics.md#use-of-more-precise-calculation-of-repair-costs) (by NetsuNegi) Vanilla fixes: - Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya) @@ -623,7 +624,6 @@ Vanilla fixes: - Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead (by NetsuNegi) - Fixed the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air (by NetsuNegi) - Fixed an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` (by NetsuNegi) -- Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, which caused crashes during repairs (by NetsuNegi) Phobos fixes: - Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi) diff --git a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po index eb1d204381..faef96895a 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po +++ b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po @@ -1694,11 +1694,8 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题" -msgid "" -"Fix an issue where techno's `Strength` was less than `[General] -> RepairStep`, " -"which caused crashes during repairs" -msgstr "" -"修复了当科技类型的 `Strength` 小于 `[General] -> RepairStep` 时可能导致在维修时发生崩溃的问题" +msgid "Allow the use of more precise calculation of repair costs" +msgstr "允许使用更精确的维修费用计算" msgid "**Apollo** - Translucent SHP drawing patches" msgstr "**Apollo** - 半透明 SHP 绘制补丁" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po index b38d8a7a7e..59f4e6ff90 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po @@ -1606,12 +1606,6 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题。" -msgid "" -"Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, " -"which caused crashes during repairs" -msgstr "" -"修复了当科技类型的 `Strength` 小于 `[General] -> RepairStep` 时可能导致在维修时发生崩溃的问题。" - msgid "Fixes / interactions with other extensions" msgstr "修复或与其他扩展的交互" @@ -2153,6 +2147,22 @@ msgstr "" "这适用于 `LaserTargetColor`、`IronCurtainColor`、`BerserkColor` 和 " "`ForceShieldColor`。" +msgid "Use of more precise calculation of repair costs" +msgstr "使用更精确的维修费用计算" + +msgid "" +"In vanilla, a calculation step for repairing technos performs a floor " +"operation on the value after `Strength`/`RepairStep` and then uses it as " +"a divisor for other calculations. This results in incorrect actual fund " +"amounts and causes technos with `Strength` values less than `RepairStep` " +"to crash due to division by zero whenever they are repaired. Now you can " +"use a more precise cost calculation via the following flag." +msgstr "" +"在原版中,维修单位时的一个计算步骤在 `Strength`/`RepairStep` 后将该值向下取整" +"再作为其他计算的除数,以至于实际的资金数额计算不正确,并且导致 `Strength` 值小" +"于 `RepairStep` 的那些单位只要维修就会除零崩溃。现在你可以通过下面的语句使用更" +"精确的费用计算。" + msgid "Veinholes & Weeds" msgstr "泰伯利亚藤蔓与泰伯利亚废矿" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po index fdc9b0f8be..f212100080 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po @@ -1754,6 +1754,14 @@ msgstr "自定义哪些寄生者可被弹头移除(by NetsuNegi)" msgid "Add toggle of whether shield use ArmorMultiplier or not (by NetsuNegi)" msgstr "添加了护盾是否使用护甲倍率的开关(by NetsuNegi)" +msgid "" +"[Allow the use of more precise calculation of repair costs](Fixed-or-" +"Improved-Logics.md#use-of-more-precise-calculation-of-repair-costs) (by " +"NetsuNegi)" +msgstr "" +"[允许使用更精确的维修费用计算](Fixed-or-Improved-Logics.md#use-of-more-" +"precise-calculation-of-repair-costs)(by NetsuNegi)" + msgid "Vanilla fixes:" msgstr "原版问题修复:" @@ -2124,12 +2132,6 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题(by NetsuNegi)" -msgid "" -"Fixed an issue where techno's `Strength` was less than `[General] -> RepairStep`, " -"which caused crashes during repairs (by NetsuNegi)" -msgstr "" -"修复了当科技类型的 `Strength` 小于 `[General] -> RepairStep` 时可能导致在维修时发生崩溃的问题(by NetsuNegi)" - msgid "Phobos fixes:" msgstr "Phobos 过往版本问题修复:" From bf90b0cfd3948261f755ac4242d0a9991d414be6 Mon Sep 17 00:00:00 2001 From: NetsuNegi39 Date: Thu, 26 Mar 2026 07:54:19 +0800 Subject: [PATCH 4/6] Update Hooks.BugFixes.cpp --- src/Misc/Hooks.BugFixes.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index b87febb834..e9ee83fd62 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -3265,12 +3265,13 @@ DEFINE_HOOK(0x7120DD, TechnoTypeClass_GetRepairStepCost, 0x6) { enum { SkipGameCode = 0x71210C }; - if (!RulesExt::Global()->FixRepairStepCost) - return 0; - GET(TechnoTypeClass*, pType, ESI); GET(int, cost, EAX); - R->EAX(static_cast((cost / (static_cast(pType->Strength) / RulesClass::Instance->RepairStep)) * RulesClass::Instance->RepairPercent)); + if (RulesExt::Global()->FixRepairStepCost) + R->EAX(static_cast((cost / std::max(static_cast(pType->Strength) / RulesClass::Instance->RepairStep, 1.0)) * RulesClass::Instance->RepairPercent)); + else + R->EAX(static_cast((cost / std::max(pType->Strength / RulesClass::Instance->RepairStep, 1))* RulesClass::Instance->RepairPercent)); + return SkipGameCode; } From 344dcb0d27c3c0d4f518743bc07bd80e8a9d0179 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Thu, 26 Mar 2026 13:24:23 +0800 Subject: [PATCH 5/6] Update docs on the changes in bf90b0cfd3948261f755ac4242d0a9991d414be6 --- CREDITS.md | 2 +- docs/Fixed-or-Improved-Logics.md | 5 +++-- docs/Whats-New.md | 2 +- docs/locale/zh_CN/LC_MESSAGES/CREDITS.po | 4 ++-- .../LC_MESSAGES/Fixed-or-Improved-Logics.po | 16 +++++++++++----- docs/locale/zh_CN/LC_MESSAGES/Whats-New.po | 14 ++++++++++---- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 73b47dace1..ce79414ddb 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -517,7 +517,7 @@ This page lists all the individual contributions to the project by their author. - Fix the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead - Fix the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air - Fix an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` - - Allow the use of more precise calculation of repair costs + - Allow the use of more precise calculation of repair costs and fix the EIP#007120F7 caused when the `Strength` value is lower than `RepairStep` - **Apollo** - Translucent SHP drawing patches - **ststl**: - Customizable `ShowTimer` priority of superweapons diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index e8c83a9a77..8a41b6a961 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -313,6 +313,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead. - Fixed the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air. - Fixed an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes`. +- Fixed the [EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7) that was triggered when repairing because the `Strength` value was lower than `RepairStep`. ## Fixes / interactions with other extensions @@ -586,9 +587,9 @@ In `rulesmd.ini`: ColorAddUse8BitRGB=false ; boolean ``` -### Use of more precise calculation of repair costs +### Use more precise calculation of repair costs -- In vanilla, a calculation step for repairing technos performs a floor operation on the value after `Strength`/`RepairStep` and then uses it as a divisor for other calculations. This results in incorrect actual fund amounts and causes technos with `Strength` values less than `RepairStep` to crash due to division by zero whenever they are repaired. Now you can use a more precise cost calculation via the following flag. +- In vanilla, a calculation step for repairing technos performs a floor operation on the value after `Strength`/`RepairStep` and then uses it as a divisor for other calculations. This results in incorrect actual fund amounts. Now you can use a more precise cost calculation via the following flag. ```ini [General] diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 8524beba4c..4cff389c13 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -553,7 +553,7 @@ New: - [Implement `CurleyShuffle` for AircraftTypes](Fixed-or-Improved-Logics.md#implement-curleyshuffle-for-aircrafttypes) (ported from Vinifera by Noble_Fish) - Customize which parasite can remove by warhead (by NetsuNegi) - Add toggle of whether shield use ArmorMultiplier or not (by NetsuNegi) -- [Allow the use of more precise calculation of repair costs](Fixed-or-Improved-Logics.md#use-of-more-precise-calculation-of-repair-costs) (by NetsuNegi) +- Allow the [use of more precise calculation of repair costs](Fixed-or-Improved-Logics.md#use-more-precise-calculation-of-repair-costs) and fix the [EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7) caused when the `Strength` value is lower than `RepairStep` (by NetsuNegi) Vanilla fixes: - Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya) diff --git a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po index faef96895a..2295d2f60a 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po +++ b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po @@ -1694,8 +1694,8 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题" -msgid "Allow the use of more precise calculation of repair costs" -msgstr "允许使用更精确的维修费用计算" +msgid "Allow the use of more precise calculation of repair costs and fix the EIP#007120F7 caused when the `Strength` value is lower than `RepairStep`" +msgstr "允许使用更精确的维修费用计算并修复了由于 `Strength` 值低于 `RepairStep` 时引发的 EIP#007120F7" msgid "**Apollo** - Translucent SHP drawing patches" msgstr "**Apollo** - 半透明 SHP 绘制补丁" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po index 59f4e6ff90..8ae91f241a 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po @@ -1606,6 +1606,14 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题。" +msgid "" +"Fixed the " +"[EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)" +" that was triggered when repairing because the `Strength` value was lower" +" than `RepairStep`." +msgstr "" +"修复了由于 `Strength` 值低于 `RepairStep` 而在维修时引发的 [EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)。" + msgid "Fixes / interactions with other extensions" msgstr "修复或与其他扩展的交互" @@ -2147,20 +2155,18 @@ msgstr "" "这适用于 `LaserTargetColor`、`IronCurtainColor`、`BerserkColor` 和 " "`ForceShieldColor`。" -msgid "Use of more precise calculation of repair costs" +msgid "Use more precise calculation of repair costs" msgstr "使用更精确的维修费用计算" msgid "" "In vanilla, a calculation step for repairing technos performs a floor " "operation on the value after `Strength`/`RepairStep` and then uses it as " "a divisor for other calculations. This results in incorrect actual fund " -"amounts and causes technos with `Strength` values less than `RepairStep` " -"to crash due to division by zero whenever they are repaired. Now you can " +"amounts. Now you can " "use a more precise cost calculation via the following flag." msgstr "" "在原版中,维修单位时的一个计算步骤在 `Strength`/`RepairStep` 后将该值向下取整" -"再作为其他计算的除数,以至于实际的资金数额计算不正确,并且导致 `Strength` 值小" -"于 `RepairStep` 的那些单位只要维修就会除零崩溃。现在你可以通过下面的语句使用更" +"再作为其他计算的除数,以至于实际的资金数额计算不正确。现在你可以通过下面的语句使用更" "精确的费用计算。" msgid "Veinholes & Weeds" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po index f212100080..c03acd51c0 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po @@ -1755,12 +1755,18 @@ msgid "Add toggle of whether shield use ArmorMultiplier or not (by NetsuNegi)" msgstr "添加了护盾是否使用护甲倍率的开关(by NetsuNegi)" msgid "" -"[Allow the use of more precise calculation of repair costs](Fixed-or-" -"Improved-Logics.md#use-of-more-precise-calculation-of-repair-costs) (by " +"Allow the [use of more precise calculation of repair costs](Fixed-or-" +"Improved-Logics.md#use-more-precise-calculation-of-repair-costs) and fix " +"the " +"[EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)" +" caused when the `Strength` value is lower than `RepairStep` (by " "NetsuNegi)" msgstr "" -"[允许使用更精确的维修费用计算](Fixed-or-Improved-Logics.md#use-of-more-" -"precise-calculation-of-repair-costs)(by NetsuNegi)" +"允许 使用更精确的维修费用计算 并修复了由于 `Strength` 值低于 `RepairStep` " +"时引发的 " +"[EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)(by" +" NetsuNegi)" msgid "Vanilla fixes:" msgstr "原版问题修复:" From eb2088bbfd34e9aa349e4db55b67e0721ca04a5c Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Thu, 26 Mar 2026 19:40:48 +0800 Subject: [PATCH 6/6] Split fixe and improvement into two items --- CREDITS.md | 3 ++- docs/Whats-New.md | 3 ++- docs/locale/zh_CN/LC_MESSAGES/CREDITS.po | 7 +++++-- docs/locale/zh_CN/LC_MESSAGES/Whats-New.po | 18 +++++++++--------- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index ce79414ddb..6098478f2c 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -517,7 +517,8 @@ This page lists all the individual contributions to the project by their author. - Fix the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead - Fix the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air - Fix an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` - - Allow the use of more precise calculation of repair costs and fix the EIP#007120F7 caused when the `Strength` value is lower than `RepairStep` + - Fix the EIP#007120F7 caused when the `Strength` value is lower than `RepairStep` + - Allow the use of more precise calculation of repair costs - **Apollo** - Translucent SHP drawing patches - **ststl**: - Customizable `ShowTimer` priority of superweapons diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 4cff389c13..0437431661 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -553,7 +553,7 @@ New: - [Implement `CurleyShuffle` for AircraftTypes](Fixed-or-Improved-Logics.md#implement-curleyshuffle-for-aircrafttypes) (ported from Vinifera by Noble_Fish) - Customize which parasite can remove by warhead (by NetsuNegi) - Add toggle of whether shield use ArmorMultiplier or not (by NetsuNegi) -- Allow the [use of more precise calculation of repair costs](Fixed-or-Improved-Logics.md#use-more-precise-calculation-of-repair-costs) and fix the [EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7) caused when the `Strength` value is lower than `RepairStep` (by NetsuNegi) +- Allow the [use of more precise calculation of repair costs](Fixed-or-Improved-Logics.md#use-more-precise-calculation-of-repair-costs) (by NetsuNegi) Vanilla fixes: - Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya) @@ -624,6 +624,7 @@ Vanilla fixes: - Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead (by NetsuNegi) - Fixed the bug where paradropped infantry with `NotHuman=yes` will ignore `Crashable=no` and crash on ground when killed in air (by NetsuNegi) - Fixed an issue where a unit might cause the target to fall from above its own head when using a locomotor warhead with `Locomotor=Jumpjet` to pull a target with `BalloonHover=yes` (by NetsuNegi) +- Fixed the [EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7) caused when the `Strength` value is lower than `RepairStep` (by NetsuNegi) Phobos fixes: - Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi) diff --git a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po index 2295d2f60a..21a31f888f 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po +++ b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po @@ -1694,8 +1694,11 @@ msgid "" msgstr "" "修复了单位使用 `Locomotor=Jumpjet` 的运动模式弹头牵引拥有 `BalloonHover=yes` 的目标时可能使其从自己头顶下落的问题" -msgid "Allow the use of more precise calculation of repair costs and fix the EIP#007120F7 caused when the `Strength` value is lower than `RepairStep`" -msgstr "允许使用更精确的维修费用计算并修复了由于 `Strength` 值低于 `RepairStep` 时引发的 EIP#007120F7" +msgid "Fix the EIP#007120F7 caused when the `Strength` value is lower than `RepairStep`" +msgstr "修复了由于 `Strength` 值低于 `RepairStep` 时引发的 EIP#007120F7" + +msgid "Allow the use of more precise calculation of repair costs" +msgstr "允许使用更精确的维修费用计算" msgid "**Apollo** - Translucent SHP drawing patches" msgstr "**Apollo** - 半透明 SHP 绘制补丁" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po index c03acd51c0..c7e69e3002 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po @@ -1756,17 +1756,17 @@ msgstr "添加了护盾是否使用护甲倍率的开关(by NetsuNegi)" msgid "" "Allow the [use of more precise calculation of repair costs](Fixed-or-" -"Improved-Logics.md#use-more-precise-calculation-of-repair-costs) and fix " -"the " -"[EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)" -" caused when the `Strength` value is lower than `RepairStep` (by " +"Improved-Logics.md#use-more-precise-calculation-of-repair-costs) (by " "NetsuNegi)" msgstr "" -"允许 使用更精确的维修费用计算 并修复了由于 `Strength` 值低于 `RepairStep` " -"时引发的 " -"[EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)(by" -" NetsuNegi)" +"允许 [使用更精确的维修费用计算](Fixed-or-Improved-Logics.md#use-more-precise-calculation-of-repair-costs)(by NetsuNegi)" + +msgid "" +"Fixed the " +"[EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)" +" caused when the `Strength` value is lower than `RepairStep` (by NetsuNegi)" +msgstr "" +"修复了由于 `Strength` 值低于 `RepairStep` 时引发的 [EIP#007120F7](https://modenc.renegadeprojects.com/Internal_Error#eip_007120F7)(by NetsuNegi)" msgid "Vanilla fixes:" msgstr "原版问题修复:"