From b5b24b2003d7cf005cd156b091a175dc090c40ce Mon Sep 17 00:00:00 2001 From: R3ality Date: Sun, 27 Jul 2025 13:04:50 +0300 Subject: [PATCH 1/4] Fix typo in traderPriceMultipler --- Libraries/SPTarkov.Server.Assets/SPT_Data/configs/trader.json | 2 +- .../SPTarkov.Server.Core/Models/Spt/Config/TraderConfig.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/trader.json b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/trader.json index 37e6610c..665bb728 100644 --- a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/trader.json +++ b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/trader.json @@ -84,7 +84,7 @@ "updateTimeDefault": 3600, "tradersResetFromServerStart": true, "purchasesAreFoundInRaid": false, - "traderPriceMultipler": 1, + "traderPriceMultiplier": 1, "fence": { "discountOptions": { "assortSize": 45, diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/TraderConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/TraderConfig.cs index 541f2230..40692ef2 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/TraderConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/TraderConfig.cs @@ -24,7 +24,7 @@ public record TraderConfig : BaseConfig [JsonPropertyName("tradersResetFromServerStart")] public bool TradersResetFromServerStart { get; set; } - [JsonPropertyName("traderPriceMultipler")] + [JsonPropertyName("traderPriceMultiplier")] public double TraderPriceMultiplier { get; set; } [JsonPropertyName("fence")] From 7733d2df96f33869ec1cb34f3b68ba01072b3107 Mon Sep 17 00:00:00 2001 From: R3ality Date: Sun, 27 Jul 2025 13:15:37 +0300 Subject: [PATCH 2/4] Fix typo in locationMultipler --- Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json | 6 +++--- .../Extensions/LootContainerSettingsExtensions.cs | 4 ++-- .../SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json index ef456c23..d9731cf3 100644 --- a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json +++ b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json @@ -276,7 +276,7 @@ "value": 50000 } ], - "locationMultipler": { + "locationMultiplier": { "default": 1, "laboratory": 2, "labyrinth": 4 @@ -290,7 +290,7 @@ "value": 50000 } ], - "locationMultipler": { + "locationMultiplier": { "default": 1, "laboratory": 2, "labyrinth": 4 @@ -324,7 +324,7 @@ "value": 2500000 } ], - "locationMultipler": { + "locationMultiplier": { "default": 1, "laboratory": 2, "labyrinth": 4 diff --git a/Libraries/SPTarkov.Server.Core/Extensions/LootContainerSettingsExtensions.cs b/Libraries/SPTarkov.Server.Core/Extensions/LootContainerSettingsExtensions.cs index 4b5c9693..81df05f3 100644 --- a/Libraries/SPTarkov.Server.Core/Extensions/LootContainerSettingsExtensions.cs +++ b/Libraries/SPTarkov.Server.Core/Extensions/LootContainerSettingsExtensions.cs @@ -24,9 +24,9 @@ namespace SPTarkov.Server.Core.Extensions } // Get multiplier for map, use default if map not found - if (!settings.LocationMultipler.TryGetValue(locationId, out var multiplier)) + if (!settings.LocationMultiplier.TryGetValue(locationId, out var multiplier)) { - if (!settings.LocationMultipler.TryGetValue("default", out multiplier)) + if (!settings.LocationMultiplier.TryGetValue("default", out multiplier)) { return roubleTotalByLevel; } diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs index 934c7407..1a523ccb 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs @@ -172,8 +172,8 @@ public record LootContainerSettings [JsonPropertyName("totalRubByLevel")] public List TotalRubByLevel { get; set; } - [JsonPropertyName("locationMultipler")] - public Dictionary LocationMultipler { get; set; } + [JsonPropertyName("locationMultiplier")] + public Dictionary LocationMultiplier { get; set; } } public record HostilitySettings From 82efbfc7db98b28e74d9d903c6aa21e48f992df5 Mon Sep 17 00:00:00 2001 From: R3ality Date: Sun, 27 Jul 2025 13:36:38 +0300 Subject: [PATCH 3/4] Refactor Json key name to offerCurrencyChancePercent --- .../SPTarkov.Server.Assets/SPT_Data/configs/ragfair.json | 3 +-- .../SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs | 2 +- .../SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/ragfair.json b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/ragfair.json index 992b8dbc..faac4d8f 100644 --- a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/ragfair.json +++ b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/ragfair.json @@ -1,6 +1,5 @@ { "dynamic": { - "_currencies": "what percentage of the offers are in each currency", "armor": { "plateSlotIdToRemovePool": [ "front_plate", @@ -229,7 +228,7 @@ } } }, - "currencies": { + "offerCurrencyChancePercent": { "5449016a4bdc2d6f028b456f": 78, "5696686a4bdc2da3298b456a": 14, "569668774bdc2da2298b4568": 8 diff --git a/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs index 6faa08f4..f8a20be9 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs @@ -199,7 +199,7 @@ public class RagfairServerHelper( /// Currency TPL public MongoId GetDynamicOfferCurrency() { - return weightedRandomHelper.GetWeightedValue(ragfairConfig.Dynamic.Currencies); + return weightedRandomHelper.GetWeightedValue(ragfairConfig.Dynamic.OfferCurrencyChangePercent); } /// diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs index edf6d955..582fbdcd 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs @@ -202,10 +202,10 @@ public record Dynamic public Dictionary? ItemPriceMultiplier { get; set; } /// - /// Percentages to sell offers in each currency + /// Percentage chance for offers to be listed in specified currency /// - [JsonPropertyName("currencies")] - public required Dictionary Currencies { get; set; } + [JsonPropertyName("offerCurrencyChancePercent")] + public required Dictionary OfferCurrencyChangePercent { get; set; } /// /// Item tpls that should be forced to sell as a single item From a5c2fb08e6e669b2fd8c8e49a516ff6bf27c821d Mon Sep 17 00:00:00 2001 From: R3ality Date: Sun, 27 Jul 2025 13:54:54 +0300 Subject: [PATCH 4/4] Style: Satisfy csharpier --- Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs index f8a20be9..b95ba1ee 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs @@ -199,7 +199,9 @@ public class RagfairServerHelper( /// Currency TPL public MongoId GetDynamicOfferCurrency() { - return weightedRandomHelper.GetWeightedValue(ragfairConfig.Dynamic.OfferCurrencyChangePercent); + return weightedRandomHelper.GetWeightedValue( + ragfairConfig.Dynamic.OfferCurrencyChangePercent + ); } ///