From dbca92045d107640608741287fdd2a4e8297de93 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Sun, 25 May 2025 07:25:40 -0400 Subject: [PATCH] Add a Voice Hook for (#13332) --- core/src/com/unciv/ui/screens/worldscreen/AlertPopup.kt | 5 +++++ .../Mod-file-structure/2-Civilization-related-JSON-files.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/screens/worldscreen/AlertPopup.kt b/core/src/com/unciv/ui/screens/worldscreen/AlertPopup.kt index ebf4220223..972b58756c 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/AlertPopup.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/AlertPopup.kt @@ -403,6 +403,11 @@ class AlertPopup( addGoodSizedLabel(civInfo.nation.startIntroPart1).row() addGoodSizedLabel(civInfo.nation.startIntroPart2).row() addCloseButton("Let's begin!") + + // Since there's introduction text, play the startIntroPart1 voice hook with the nation's theme. + val music = UncivGame.Current.musicController + music.chooseTrack(civInfo.nation.name, MusicMood.themeOrPeace, MusicTrackChooserFlags.setSpecific) + music.playVoice("${civInfo.nation.name}.startIntroPart1") } private fun addTechResearched() { diff --git a/docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md b/docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md index 7ec2330671..957f200e83 100644 --- a/docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md +++ b/docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md @@ -66,7 +66,7 @@ Each nation has the following structure: | preferredVictoryType | String | Neutral | The victory type major civilizations will pursue (need not be specified in [VictoryTypes.json](5-Miscellaneous-JSON-files.md#victorytypesjson)) | | personality | String | none | The name of the personality specified in [Personalities.json](#personalitiesjson) | | favoredReligion | String | none | The religion major civilization will choose if available when founding a religion. Must be in [Religions.json](#religionsjson) | -| startIntroPart1 | String | none | Introductory blurb shown to Player on game start... | +| startIntroPart1 | String | none | Introductory blurb shown to Player on game start... [^V] | | startIntroPart2 | String | none | ... second paragraph. ___NO___ "TBD"!!! Leave empty to skip that alert. | | declaringWar | String | none | Another greeting, voice hook supported [^V] | | attacked | String | none | Another greeting, voice hook supported [^V] |