multiplicators by profession rank

This commit is contained in:
Tereneckla
2025-07-26 01:12:32 +02:00
parent c212b6b49b
commit d22ffa499c
2 changed files with 50 additions and 4 deletions

View File

@@ -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

View File

@@ -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<float>(PEConfig::MULT_GREEN, "ProfessionExperience.MultGreen", 0.75f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_YELLOW, "ProfessionExperience.MultYellow", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_ORANGE, "ProfessionExperience.MultOrange", 1.25f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_APPRENTICE, "ProfessionExperience.MultApprentice", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_JOURNEYMAN, "ProfessionExperience.MultJourneyman", 2.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_EXPERT, "ProfessionExperience.MultExpert", 3.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_ARTISAN, "ProfessionExperience.MultArtisan", 4.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(PEConfig::MULT_MASTER, "ProfessionExperience.MultMaster", 5.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
SetConfigValue<float>(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<float>(PEConfig::MULT_ORANGE);
if (gray > 375)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_GRANDMASTER);
else if (gray > 300)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_MASTER);
else if (gray > 225)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_ARTISAN);
else if (gray > 150)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_EXPERT);
else if (gray > 75)
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_JOURNEYMAN);
else
xp = xp * peConfigData.GetConfigValue<float>(PEConfig::MULT_APPRENTICE);
player->GiveXP(xp, nullptr);
}
};