From b1b1d3f1e612cb1b63afc0c6ae7532ec68a79845 Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 07:13:19 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E6=AD=A6=E5=99=A8=E9=9F=B3=E4=B9=90=E6=8E=A7=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 16 ++++++++++++++++ docs/Whats-New.md | 1 + src/Ext/House/Body.h | 5 +++++ src/Ext/SWType/Body.cpp | 11 +++++++++++ src/Ext/SWType/Body.h | 4 ++++ src/Ext/SWType/FireSuperWeapon.cpp | 15 +++++++++++++++ src/Ext/Scenario/Body.cpp | 20 ++++++++++++++++++++ 7 files changed, 72 insertions(+) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 2d314b67d1..d574aa6066 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1217,6 +1217,22 @@ Detonate.Damage= ; integer Detonate.AtFirer=false ; boolean ``` +### Superweapon music control + +- Superweapons can now play a soundtrack theme when fired and optionally stop after a configurable duration. + +In `rulesmd.ini`: +```ini +[SOMESW] ; SuperWeaponType +Music.Theme= ; Soundtrack theme ID from thememd.ini (such as GodsendOne) +Music.Duration=0 ; integer, game frames; 0 or below means do not auto-stop +``` + +- `Music.Theme` selects the soundtrack theme by its ID defined in `thememd.ini` (such as `GodsendOne`). +- `Music.Duration` sets how long to keep playing, in game frames. 0 or below means no auto-stop. +- If a different theme is already playing, it will be replaced when the superweapon fires. +- When the timer completes, the current theme is stopped. + ## Technos ### Aggressive attack move mission diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 787d5253bc..b2a47afcaf 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -329,6 +329,7 @@ HideLightFlashEffects=false ; boolean :open: New: +- [Superweapon music control](New-or-Enhanced-Logics.md#superweapon-music-control) (by ahasasjeb) - [Allow using waypoints, area guard and attack move with aircraft](Fixed-or-Improved-Logics.md#extended-aircraft-missions) (by CrimRecya) - [Enhanced Straight trajectory](New-or-Enhanced-Logics.md#straight-trajectory) (by CrimRecya) - [Enable building production queue](User-Interface.md#building-production-queue) (by CrimRecya) diff --git a/src/Ext/House/Body.h b/src/Ext/House/Body.h index 8f99bffc31..61e65beb9b 100644 --- a/src/Ext/House/Body.h +++ b/src/Ext/House/Body.h @@ -6,6 +6,7 @@ #include #include +#include #include @@ -61,6 +62,10 @@ class HouseExt struct SWExt { int ShotCount; + CDTimerClass MusicTimer; + bool MusicActive; + + SWExt() : ShotCount(0), MusicTimer(), MusicActive(false) { } }; std::vector SuperExts; diff --git a/src/Ext/SWType/Body.cpp b/src/Ext/SWType/Body.cpp index f230746dc7..44bdd53af8 100644 --- a/src/Ext/SWType/Body.cpp +++ b/src/Ext/SWType/Body.cpp @@ -12,6 +12,10 @@ void SWTypeExt::ExtData::Initialize() this->EVA_SelectTarget = VoxClass::FindIndex("EVA_SelectTarget"); this->Message_CannotFire = CSFText("MSG:CannotFire"); + + // defaults for music control + this->Music_Theme = -1; + this->Music_Duration = 0; } // ============================= @@ -58,6 +62,9 @@ void SWTypeExt::ExtData::Serialize(T& Stm) .Process(this->LimboKill_Affected) .Process(this->LimboKill_IDs) .Process(this->RandomBuffer) + // music control + .Process(this->Music_Theme) + .Process(this->Music_Duration) .Process(this->Detonate_Warhead) .Process(this->Detonate_Weapon) .Process(this->Detonate_Damage) @@ -131,6 +138,10 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->SW_MaxCount.Read(exINI, pSection, "SW.MaxCount"); this->SW_Shots.Read(exINI, pSection, "SW.Shots"); + // music control + this->Music_Theme = pINI->ReadTheme(pSection, "Music.Theme", this->Music_Theme); + this->Music_Duration.Read(exINI, pSection, "Music.Duration"); + this->Message_CannotFire.Read(exINI, pSection, "Message.CannotFire"); this->Message_InsufficientFunds.Read(exINI, pSection, "Message.InsufficientFunds"); diff --git a/src/Ext/SWType/Body.h b/src/Ext/SWType/Body.h index e4af1c3879..80bae23b7e 100644 --- a/src/Ext/SWType/Body.h +++ b/src/Ext/SWType/Body.h @@ -63,6 +63,10 @@ class SWTypeExt Valueable LimboKill_Affected; ValueableVector LimboKill_IDs; Valueable RandomBuffer; + + // SuperWeapon music control + Valueable Music_Theme; // soundtrack theme index (from ThemeClass) + Valueable Music_Duration; // duration in frames for how long to play, then stop ValueableIdxVector SW_Next; Valueable SW_Next_RealLaunch; Valueable SW_Next_IgnoreInhibitors; diff --git a/src/Ext/SWType/FireSuperWeapon.cpp b/src/Ext/SWType/FireSuperWeapon.cpp index b43b5c35fe..f65bfb483d 100644 --- a/src/Ext/SWType/FireSuperWeapon.cpp +++ b/src/Ext/SWType/FireSuperWeapon.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,20 @@ void SWTypeExt::FireSuperWeaponExt(SuperClass* pSW, const CellStruct& cell) auto& sw_ext = HouseExt::ExtMap.Find(pHouse)->SuperExts[pType->ArrayIndex]; sw_ext.ShotCount++; + // Music: play theme and start timer if configured + if (pTypeExt->Music_Theme.Get() >= 0) + { + // start playing immediately + ThemeClass::Instance.Play(pTypeExt->Music_Theme); + + const int duration = pTypeExt->Music_Duration.Get(); + if (duration > 0) + { + sw_ext.MusicTimer.Start(duration); + sw_ext.MusicActive = true; + } + } + const auto pTags = &pHouse->RelatedTags; if (pTags->Count > 0) { diff --git a/src/Ext/Scenario/Body.cpp b/src/Ext/Scenario/Body.cpp index 6463387b5b..d4ebcfdf7d 100644 --- a/src/Ext/Scenario/Body.cpp +++ b/src/Ext/Scenario/Body.cpp @@ -2,6 +2,9 @@ #include #include +#include +#include +#include std::unique_ptr ScenarioExt::Data = nullptr; @@ -265,5 +268,22 @@ DEFINE_HOOK(0x55B4E1, LogicClass_Update_BeforeAll, 0x5) ScenarioExt::Global()->UpdateAutoDeathObjectsInLimbo(); ScenarioExt::Global()->UpdateTransportReloaders(); + // SW music timers: stop music when timer completes + for (auto const pHouse : HouseClass::Array) + { + if (!pHouse) { continue; } + auto& houseExt = *HouseExt::ExtMap.Find(pHouse); + for (size_t i = 0; i < houseExt.SuperExts.size(); ++i) + { + auto& swExt = houseExt.SuperExts[i]; + if (swExt.MusicActive && swExt.MusicTimer.Completed()) + { + ThemeClass::Instance.Stop(); + swExt.MusicTimer.Stop(); + swExt.MusicActive = false; + } + } + } + return 0; } From c720b02dacc17b0f7f4156e496cada320d8d4f2a Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 07:55:26 +0800 Subject: [PATCH 02/10] 0 --- src/Ext/SWType/Body.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Ext/SWType/Body.h b/src/Ext/SWType/Body.h index 80bae23b7e..14f6e505b9 100644 --- a/src/Ext/SWType/Body.h +++ b/src/Ext/SWType/Body.h @@ -63,10 +63,8 @@ class SWTypeExt Valueable LimboKill_Affected; ValueableVector LimboKill_IDs; Valueable RandomBuffer; - - // SuperWeapon music control - Valueable Music_Theme; // soundtrack theme index (from ThemeClass) - Valueable Music_Duration; // duration in frames for how long to play, then stop + Valueable Music_Theme; + Valueable Music_Duration; ValueableIdxVector SW_Next; Valueable SW_Next_RealLaunch; Valueable SW_Next_IgnoreInhibitors; From 47e1727f2687907074fc372e5e58d43630280ce0 Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 08:42:50 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E9=9F=B3=E4=B9=90=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Ext/Scenario/Body.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Ext/Scenario/Body.cpp b/src/Ext/Scenario/Body.cpp index d4ebcfdf7d..9b56ad1cc0 100644 --- a/src/Ext/Scenario/Body.cpp +++ b/src/Ext/Scenario/Body.cpp @@ -5,6 +5,7 @@ #include #include #include +#include std::unique_ptr ScenarioExt::Data = nullptr; @@ -278,7 +279,22 @@ DEFINE_HOOK(0x55B4E1, LogicClass_Update_BeforeAll, 0x5) auto& swExt = houseExt.SuperExts[i]; if (swExt.MusicActive && swExt.MusicTimer.Completed()) { - ThemeClass::Instance.Stop(); + // Only stop the music if the current theme is still the one configured for this superweapon. + // If the music has been changed by any means in the meantime, don't switch/stop it here. + int configuredTheme = -1; + if (pHouse->Supers.Count > static_cast(i)) + { + auto const pSuper = pHouse->Supers[static_cast(i)]; + if (pSuper && pSuper->Type) + { + auto const pTypeExt = SWTypeExt::ExtMap.Find(pSuper->Type); + configuredTheme = pTypeExt->Music_Theme.Get(); + } + } + if (configuredTheme >= 0 && ThemeClass::Instance.CurrentTheme == configuredTheme) + { + ThemeClass::Instance.Stop(); + } swExt.MusicTimer.Stop(); swExt.MusicActive = false; } From fc0d3ce6521ec83a275c3493d24502a5033521d3 Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 08:50:51 +0800 Subject: [PATCH 04/10] Superweapon music control doc --- docs/New-or-Enhanced-Logics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index d574aa6066..d93608ada9 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1231,7 +1231,7 @@ Music.Duration=0 ; integer, game frames; 0 or below means do not auto-stop - `Music.Theme` selects the soundtrack theme by its ID defined in `thememd.ini` (such as `GodsendOne`). - `Music.Duration` sets how long to keep playing, in game frames. 0 or below means no auto-stop. - If a different theme is already playing, it will be replaced when the superweapon fires. -- When the timer completes, the current theme is stopped. +- When the timer completes, the theme is stopped only if the currently playing theme still equals the configured `Music.Theme`; if music was changed during the countdown, it will not be altered. ## Technos From a05ce7db6b9e367d5d93909d491a20c4b68cdac6 Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 13:49:56 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E9=98=B5=E8=90=A5=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/New-or-Enhanced-Logics.md | 2 ++ src/Ext/SWType/Body.cpp | 2 ++ src/Ext/SWType/Body.h | 2 ++ src/Ext/SWType/FireSuperWeapon.cpp | 10 ++++++++-- src/Ext/Scenario/Body.cpp | 8 +++++++- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index d93608ada9..8932ee2792 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1226,12 +1226,14 @@ In `rulesmd.ini`: [SOMESW] ; SuperWeaponType Music.Theme= ; Soundtrack theme ID from thememd.ini (such as GodsendOne) Music.Duration=0 ; integer, game frames; 0 or below means do not auto-stop +Music.AffectedHouses= ; owner|allies|enemies|all (default all) ``` - `Music.Theme` selects the soundtrack theme by its ID defined in `thememd.ini` (such as `GodsendOne`). - `Music.Duration` sets how long to keep playing, in game frames. 0 or below means no auto-stop. - If a different theme is already playing, it will be replaced when the superweapon fires. - When the timer completes, the theme is stopped only if the currently playing theme still equals the configured `Music.Theme`; if music was changed during the countdown, it will not be altered. +- `Music.AffectedHouses` determines which houses will hear and be affected by the superweapon music on their client: `owner` (firer only), `allies`, `enemies`, or `all` (default). Playback and auto-stop are applied only for those houses. ## Technos diff --git a/src/Ext/SWType/Body.cpp b/src/Ext/SWType/Body.cpp index 44bdd53af8..17320a0a38 100644 --- a/src/Ext/SWType/Body.cpp +++ b/src/Ext/SWType/Body.cpp @@ -65,6 +65,7 @@ void SWTypeExt::ExtData::Serialize(T& Stm) // music control .Process(this->Music_Theme) .Process(this->Music_Duration) + .Process(this->Music_AffectedHouses) .Process(this->Detonate_Warhead) .Process(this->Detonate_Weapon) .Process(this->Detonate_Damage) @@ -141,6 +142,7 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) // music control this->Music_Theme = pINI->ReadTheme(pSection, "Music.Theme", this->Music_Theme); this->Music_Duration.Read(exINI, pSection, "Music.Duration"); + this->Music_AffectedHouses.Read(exINI, pSection, "Music.AffectedHouses"); this->Message_CannotFire.Read(exINI, pSection, "Message.CannotFire"); this->Message_InsufficientFunds.Read(exINI, pSection, "Message.InsufficientFunds"); diff --git a/src/Ext/SWType/Body.h b/src/Ext/SWType/Body.h index 14f6e505b9..176d61bb74 100644 --- a/src/Ext/SWType/Body.h +++ b/src/Ext/SWType/Body.h @@ -65,6 +65,7 @@ class SWTypeExt Valueable RandomBuffer; Valueable Music_Theme; Valueable Music_Duration; + Valueable Music_AffectedHouses; ValueableIdxVector SW_Next; Valueable SW_Next_RealLaunch; Valueable SW_Next_IgnoreInhibitors; @@ -189,6 +190,7 @@ class SWTypeExt , SW_Link_RandomWeightsData {} , Message_LinkedSWAcquired {} , EVA_LinkedSWAcquired {} + , Music_AffectedHouses { AffectedHouse::All } { } // Ares 0.A functions diff --git a/src/Ext/SWType/FireSuperWeapon.cpp b/src/Ext/SWType/FireSuperWeapon.cpp index f65bfb483d..2644a1a1c5 100644 --- a/src/Ext/SWType/FireSuperWeapon.cpp +++ b/src/Ext/SWType/FireSuperWeapon.cpp @@ -50,12 +50,18 @@ void SWTypeExt::FireSuperWeaponExt(SuperClass* pSW, const CellStruct& cell) // Music: play theme and start timer if configured if (pTypeExt->Music_Theme.Get() >= 0) { - // start playing immediately - ThemeClass::Instance.Play(pTypeExt->Music_Theme); + const auto affected = pTypeExt->Music_AffectedHouses.Get(AffectedHouse::All); + // only play on local client if allowed by affected houses + if (EnumFunctions::CanTargetHouse(affected, pHouse, HouseClass::CurrentPlayer)) + { + // start playing immediately + ThemeClass::Instance.Play(pTypeExt->Music_Theme); + } const int duration = pTypeExt->Music_Duration.Get(); if (duration > 0) { + // Only arm the timer on owner side; stopping is gated in Scenario update by affected houses sw_ext.MusicTimer.Start(duration); sw_ext.MusicActive = true; } diff --git a/src/Ext/Scenario/Body.cpp b/src/Ext/Scenario/Body.cpp index 9b56ad1cc0..980664f807 100644 --- a/src/Ext/Scenario/Body.cpp +++ b/src/Ext/Scenario/Body.cpp @@ -293,7 +293,13 @@ DEFINE_HOOK(0x55B4E1, LogicClass_Update_BeforeAll, 0x5) } if (configuredTheme >= 0 && ThemeClass::Instance.CurrentTheme == configuredTheme) { - ThemeClass::Instance.Stop(); + // respect affected houses: only stop if local client is within allowed houses + auto const pTypeExt = pSuper ? SWTypeExt::ExtMap.Find(pSuper->Type) : nullptr; + const auto affected = pTypeExt ? pTypeExt->Music_AffectedHouses.Get(AffectedHouse::All) : AffectedHouse::All; + if (EnumFunctions::CanTargetHouse(affected, pHouse, HouseClass::CurrentPlayer)) + { + ThemeClass::Instance.Stop(); + } } swExt.MusicTimer.Stop(); swExt.MusicActive = false; From 91caada38c602797407ff97f709deefddfcefbbc Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 14:24:01 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=88=B0=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E9=98=B5=E8=90=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Ext/SWType/FireSuperWeapon.cpp | 5 +---- src/Ext/Scenario/Body.cpp | 17 ++++++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Ext/SWType/FireSuperWeapon.cpp b/src/Ext/SWType/FireSuperWeapon.cpp index 2644a1a1c5..b0b8094caa 100644 --- a/src/Ext/SWType/FireSuperWeapon.cpp +++ b/src/Ext/SWType/FireSuperWeapon.cpp @@ -50,18 +50,15 @@ void SWTypeExt::FireSuperWeaponExt(SuperClass* pSW, const CellStruct& cell) // Music: play theme and start timer if configured if (pTypeExt->Music_Theme.Get() >= 0) { - const auto affected = pTypeExt->Music_AffectedHouses.Get(AffectedHouse::All); - // only play on local client if allowed by affected houses + const auto affected = pTypeExt->Music_AffectedHouses.Get(); if (EnumFunctions::CanTargetHouse(affected, pHouse, HouseClass::CurrentPlayer)) { - // start playing immediately ThemeClass::Instance.Play(pTypeExt->Music_Theme); } const int duration = pTypeExt->Music_Duration.Get(); if (duration > 0) { - // Only arm the timer on owner side; stopping is gated in Scenario update by affected houses sw_ext.MusicTimer.Start(duration); sw_ext.MusicActive = true; } diff --git a/src/Ext/Scenario/Body.cpp b/src/Ext/Scenario/Body.cpp index 980664f807..1d3c28d1e4 100644 --- a/src/Ext/Scenario/Body.cpp +++ b/src/Ext/Scenario/Body.cpp @@ -279,23 +279,26 @@ DEFINE_HOOK(0x55B4E1, LogicClass_Update_BeforeAll, 0x5) auto& swExt = houseExt.SuperExts[i]; if (swExt.MusicActive && swExt.MusicTimer.Completed()) { - // Only stop the music if the current theme is still the one configured for this superweapon. - // If the music has been changed by any means in the meantime, don't switch/stop it here. int configuredTheme = -1; + SuperClass* pSuper = nullptr; + SWTypeExt::ExtData* pTypeExt = nullptr; if (pHouse->Supers.Count > static_cast(i)) { - auto const pSuper = pHouse->Supers[static_cast(i)]; + pSuper = pHouse->Supers[static_cast(i)]; if (pSuper && pSuper->Type) { - auto const pTypeExt = SWTypeExt::ExtMap.Find(pSuper->Type); + pTypeExt = SWTypeExt::ExtMap.Find(pSuper->Type); configuredTheme = pTypeExt->Music_Theme.Get(); } } if (configuredTheme >= 0 && ThemeClass::Instance.CurrentTheme == configuredTheme) { - // respect affected houses: only stop if local client is within allowed houses - auto const pTypeExt = pSuper ? SWTypeExt::ExtMap.Find(pSuper->Type) : nullptr; - const auto affected = pTypeExt ? pTypeExt->Music_AffectedHouses.Get(AffectedHouse::All) : AffectedHouse::All; + // stop only if same theme and local house is affected + AffectedHouse affected = AffectedHouse::All; + if (pTypeExt) + { + affected = pTypeExt->Music_AffectedHouses.Get(); + } if (EnumFunctions::CanTargetHouse(affected, pHouse, HouseClass::CurrentPlayer)) { ThemeClass::Instance.Stop(); From 39884781ca254d630b5caf10ced37981ee66fd0f Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 14:28:20 +0800 Subject: [PATCH 07/10] docs update --- docs/New-or-Enhanced-Logics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 8932ee2792..289b3c14c9 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1225,7 +1225,7 @@ In `rulesmd.ini`: ```ini [SOMESW] ; SuperWeaponType Music.Theme= ; Soundtrack theme ID from thememd.ini (such as GodsendOne) -Music.Duration=0 ; integer, game frames; 0 or below means do not auto-stop +Music.Duration=0 ; integer, game frames; 0 or below means do not auto-stop,with the game speed set to 4, 15 frames equal 1 second. Music.AffectedHouses= ; owner|allies|enemies|all (default all) ``` From 4b9fb1a18aa95bc6c4abfa1a293f2b8f4b94050b Mon Sep 17 00:00:00 2001 From: lvjia Date: Wed, 27 Aug 2025 19:16:48 +0800 Subject: [PATCH 08/10] doc --- docs/New-or-Enhanced-Logics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 289b3c14c9..150f03c5c5 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1233,7 +1233,7 @@ Music.AffectedHouses= ; owner|allies|enemies|all (default all) - `Music.Duration` sets how long to keep playing, in game frames. 0 or below means no auto-stop. - If a different theme is already playing, it will be replaced when the superweapon fires. - When the timer completes, the theme is stopped only if the currently playing theme still equals the configured `Music.Theme`; if music was changed during the countdown, it will not be altered. -- `Music.AffectedHouses` determines which houses will hear and be affected by the superweapon music on their client: `owner` (firer only), `allies`, `enemies`, or `all` (default). Playback and auto-stop are applied only for those houses. +- `Music.AffectedHouses` determines which houses will hear and be affected by the superweapon music on their client: `owner`, `allies`, `enemies`, or `all` (default). Playback and auto-stop are applied only for those houses. ## Technos From 8aae9b1b91602e04f127f10f85580fa4ce4394c5 Mon Sep 17 00:00:00 2001 From: lvjia Date: Thu, 28 Aug 2025 17:09:48 +0800 Subject: [PATCH 09/10] doc --- docs/New-or-Enhanced-Logics.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 150f03c5c5..4ffd697b0d 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1235,6 +1235,10 @@ Music.AffectedHouses= ; owner|allies|enemies|all (default all) - When the timer completes, the theme is stopped only if the currently playing theme still equals the configured `Music.Theme`; if music was changed during the countdown, it will not be altered. - `Music.AffectedHouses` determines which houses will hear and be affected by the superweapon music on their client: `owner`, `allies`, `enemies`, or `all` (default). Playback and auto-stop are applied only for those houses. +```{note} +To loop the music correctly during this period, set `Repeat=yes` for the corresponding theme in `thememd.ini`. Otherwise, the track may stop at its end even if `Music.Duration` has not elapsed. +``` + ## Technos ### Aggressive attack move mission From fd3536223a923bf44aac7aa2f3c195690d9159bb Mon Sep 17 00:00:00 2001 From: lvjia Date: Fri, 29 Aug 2025 16:41:31 +0800 Subject: [PATCH 10/10] update CREDITS.md --- CREDITS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CREDITS.md b/CREDITS.md index 59b2dc7b82..29dac315ed 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -642,3 +642,4 @@ This page lists all the individual contributions to the project by their author. - **Damfoos** - extensive and thorough testing - **Dmitry Volkov** - extensive and thorough testing - **Rise of the East community** - extensive playtesting of in-dev features +- **ahasasjeb** - Add music to super weapons \ No newline at end of file