From 90e47153ea1146c2fb394b71cad0d19cba221659 Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Sat, 14 Sep 2024 14:35:49 +0200 Subject: [PATCH 1/3] Convert variation in carriers and turrets to new format so it is translatable --- scripts/scenario_56_carrierTurret.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/scenario_56_carrierTurret.lua b/scripts/scenario_56_carrierTurret.lua index 6c9ba9c589..57f737c116 100644 --- a/scripts/scenario_56_carrierTurret.lua +++ b/scripts/scenario_56_carrierTurret.lua @@ -3,9 +3,10 @@ --- --- Carrier and several player ships with turrets available for use by the players made available with this scenario script and the associated files. -- Type: Mission --- Variation[Easy]: Easy goals and/or enemies --- Variation[Hard]: Hard goals and/or enemies --- Variation[Very Easy]: Very Easy goals and/or enemies +-- Setting[Difficulty]: Sets the overall scenario difficulty +-- Difficulty[Easy]: Easy goals and/or enemies +-- Difficulty[Hard]: Hard goals and/or enemies +-- Difficulty[Very Easy]: Very Easy goals and/or enemies -- If you find that your crew cannot resist the do not push button, -- change "plot4 = doNotPush" to "plot4 = nil" in this scenario file @@ -6005,4 +6006,4 @@ function update(delta) if plotC ~= nil then -- cargo transfer plotC(delta) end -end \ No newline at end of file +end From e87072d0f7c76df1d0b3a4d0b528cc6a4a7105fc Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Mon, 16 Sep 2024 20:30:14 +0200 Subject: [PATCH 2/3] recognise the difficulty settings --- scripts/scenario_56_carrierTurret.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/scenario_56_carrierTurret.lua b/scripts/scenario_56_carrierTurret.lua index 57f737c116..3487561e72 100644 --- a/scripts/scenario_56_carrierTurret.lua +++ b/scripts/scenario_56_carrierTurret.lua @@ -291,6 +291,7 @@ function init() addGMFunction(GMStartPlot3upgradeBeamDamage,gmPlot3upgradeBeamDamage) addGMFunction(GMStartPlot3tractorDisabledShip,gmPlot3tractorDisabledShip) addGMFunction(GMStartPlot3addTubeToShip,gmPlot3addTubeToShip) + setVariations() --plot 4 choices will come eventually, just not with this release wfv = "end of init" end @@ -379,11 +380,11 @@ function delayFastToNormal() end --translate variations into a numeric difficulty value function setVariations() - if string.find(getScenarioVariation(),"Very Easy") then + if string.find(getScenarioSetting("Difficulty"),"Very Easy") then difficulty = .2 - elseif string.find(getScenarioVariation(),"Easy") then + elseif string.find(getScenarioSetting("Difficulty"),"Easy") then difficulty = .5 - elseif string.find(getScenarioVariation(),"Hard") then + elseif string.find(getScenarioSetting("Difficulty"),"Hard") then difficulty = 2 else difficulty = 1 From f94ccd6fe7513c409334f7e01861c819224ef402 Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Mon, 16 Sep 2024 20:49:48 +0200 Subject: [PATCH 3/3] add default "normal" option Successor of the "none" variation, so no additional checks in setVariations() are needed --- scripts/scenario_56_carrierTurret.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/scenario_56_carrierTurret.lua b/scripts/scenario_56_carrierTurret.lua index 3487561e72..57f3ab8cfd 100644 --- a/scripts/scenario_56_carrierTurret.lua +++ b/scripts/scenario_56_carrierTurret.lua @@ -4,9 +4,10 @@ --- Carrier and several player ships with turrets available for use by the players made available with this scenario script and the associated files. -- Type: Mission -- Setting[Difficulty]: Sets the overall scenario difficulty +-- Difficulty[Very Easy]: Very Easy goals and/or enemies -- Difficulty[Easy]: Easy goals and/or enemies +-- Difficulty[Normal|Default]: Normal goals and/or enemies -- Difficulty[Hard]: Hard goals and/or enemies --- Difficulty[Very Easy]: Very Easy goals and/or enemies -- If you find that your crew cannot resist the do not push button, -- change "plot4 = doNotPush" to "plot4 = nil" in this scenario file