From d22ffa499cd05f97eabde8d09a53249d5de3903e Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Sat, 26 Jul 2025 01:12:32 +0200 Subject: [PATCH] multiplicators by profession rank --- conf/mod-profession-experience.conf.dist | 23 ++++++++++++++++++ src/ProfessionExp.cpp | 31 +++++++++++++++++++++--- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/conf/mod-profession-experience.conf.dist b/conf/mod-profession-experience.conf.dist index b2e4795..b6b8354 100644 --- a/conf/mod-profession-experience.conf.dist +++ b/conf/mod-profession-experience.conf.dist @@ -24,6 +24,29 @@ ProfessionExperience.MultYellow = 1.0 ProfessionExperience.MultOrange = 1.25 +# +# ProfessionExperience.MultApprentice 1-75 +# ProfessionExperience.MultJourneyman 76-150 +# ProfessionExperience.MultExpert 151-225 +# ProfessionExperience.MultArtisan 226-300 +# ProfessionExperience.MultMaster 301-375 +# ProfessionExperience.MultGrandMaster 376-450 +# Description: Multiplicator to experience when using a skill in this skill range +# Default: 1.0 - (ProfessionExperience.MultApprentice) +# 2.0 - (ProfessionExperience.MultJourneyman) +# 3.0 - (ProfessionExperience.MultExpert) +# 4.0 - (ProfessionExperience.MultArtisan) +# 5.0 - (ProfessionExperience.MultMaster) +# 6.0 - (ProfessionExperience.MultGrandMaster) + +ProfessionExperience.MultApprentice = 1.0 +ProfessionExperience.MultJourneyman = 2.0 +ProfessionExperience.MultExpert = 3.0 +ProfessionExperience.MultArtisan = 4.0 +ProfessionExperience.MultMaster = 5.0 +ProfessionExperience.MultGrandMaster = 6.0 + + # # ProfessionExperience.*.Enabled # Description: Enable experience gain when crafting or gathering with this profession diff --git a/src/ProfessionExp.cpp b/src/ProfessionExp.cpp index d27df5c..6cdc632 100644 --- a/src/ProfessionExp.cpp +++ b/src/ProfessionExp.cpp @@ -36,12 +36,8 @@ enum class PEConfig LEATHERWORKING_EXPERIENCE, LOCKPICK_ENABLED, LOCKPICK_EXPERIENCE, - MILLING_ENABLED, - MILLING_EXPERIENCE, MINING_ENABLED, MINING_EXPERIENCE, - PROSPECTING_ENABLED, - PROSPECTING_EXPERIENCE, SKINNING_ENABLED, SKINNING_EXPERIENCE, SMELTING_ENABLED, @@ -52,6 +48,12 @@ enum class PEConfig MULT_GREEN, MULT_YELLOW, MULT_ORANGE, + MULT_APPRENTICE, + MULT_JOURNEYMAN, + MULT_EXPERT, + MULT_ARTISAN, + MULT_MASTER, + MULT_GRANDMASTER, NUM_CONFIGS, }; @@ -118,6 +120,14 @@ public: SetConfigValue(PEConfig::MULT_GREEN, "ProfessionExperience.MultGreen", 0.75f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); SetConfigValue(PEConfig::MULT_YELLOW, "ProfessionExperience.MultYellow", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); SetConfigValue(PEConfig::MULT_ORANGE, "ProfessionExperience.MultOrange", 1.25f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + + SetConfigValue(PEConfig::MULT_APPRENTICE, "ProfessionExperience.MultApprentice", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + SetConfigValue(PEConfig::MULT_JOURNEYMAN, "ProfessionExperience.MultJourneyman", 2.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + SetConfigValue(PEConfig::MULT_EXPERT, "ProfessionExperience.MultExpert", 3.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + SetConfigValue(PEConfig::MULT_ARTISAN, "ProfessionExperience.MultArtisan", 4.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + SetConfigValue(PEConfig::MULT_MASTER, "ProfessionExperience.MultMaster", 5.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + SetConfigValue(PEConfig::MULT_GRANDMASTER,"ProfessionExperience.MultGrandMaster",6.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0"); + } }; static PEConfigData peConfigData; @@ -251,6 +261,19 @@ RewardExperienceScript() : PlayerScript("RewardExperienceScript", { else xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_ORANGE); + if (gray > 375) + xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_GRANDMASTER); + else if (gray > 300) + xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_MASTER); + else if (gray > 225) + xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_ARTISAN); + else if (gray > 150) + xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_EXPERT); + else if (gray > 75) + xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_JOURNEYMAN); + else + xp = xp * peConfigData.GetConfigValue(PEConfig::MULT_APPRENTICE); + player->GiveXP(xp, nullptr); } };