diff --git a/README.md b/README.md index e929e9d..6378ae9 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Please also note that PvP is not supported at the moment and that the mission wi - [x] Helicopter hunt - [x] Offensive counter-air - Balance improvements + - [x] Missions with higher cloud cover and wind speed now award more XP - [ ] Tweaked XP requirements for medals/promotions - Bug fixes - [x] AWACS datalinked now showing on SA pages @@ -87,7 +88,7 @@ Please also note that PvP is not supported at the moment and that the mission wi - Extras - [ ] GitHub page - Improvements - - [ ] Better weather reports (cloud cover, rain, etc) + - [x] Better weather reports (cloud cover, rain, etc) - Misc - [x] AWACS unit now spawned when mission is loaded - New features diff --git a/Script/The Universal Mission/PlayerScore.lua b/Script/The Universal Mission/PlayerScore.lua index 173f288..f69e034 100644 --- a/Script/The Universal Mission/PlayerScore.lua +++ b/Script/The Universal Mission/PlayerScore.lua @@ -300,11 +300,18 @@ do if not DCSEx.io.canReadAndWrite() then return 1.0 end -- IO disabled, career and scoring disabled if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) then return 1.0 end -- No scoring in multiplayer + -- Base XP multiplier is 1.0 (100%) local scoreMultiplier = 1.0 + + -- Add XP multipliers for game settings for _,v in pairs(TUM.settings.id) do scoreMultiplier = scoreMultiplier + (TUM.playerScore.getScoreMultiplier(v) or 0.0) end + -- Add XP multipliers for weather + scoreMultiplier = scoreMultiplier + TUM.weather.getWeatherXPModifier() + scoreMultiplier = scoreMultiplier + TUM.weather.getWindXPModifier() + return math.max(0.0, scoreMultiplier) end diff --git a/Script/The Universal Mission/Settings.lua b/Script/The Universal Mission/Settings.lua index 37d07c5..78234be 100644 --- a/Script/The Universal Mission/Settings.lua +++ b/Script/The Universal Mission/Settings.lua @@ -194,6 +194,10 @@ do end end + -- Weather + summary = summary.."\n\nWEATHER: "..TUM.weather.getWeatherName().." (+"..tostring(math.ceil(TUM.weather.getWeatherXPModifier() * 100)).."% xp)" + summary = summary.."\nWIND: "..DCSEx.string.firstToUpper(TUM.weather.getWindName()).." (+"..tostring(math.ceil(TUM.weather.getWindXPModifier() * 100)).."% xp)" + if showScoreMultiplier then summary = summary.."\n\nTotal XP modifier: "..tostring(math.ceil(TUM.playerScore.getTotalScoreMultiplier() * 100)).."%" end