From 96e131c7e62602fd1960ae2ccceaa03940ebed04 Mon Sep 17 00:00:00 2001 From: Ampitere Date: Sun, 12 May 2024 23:44:10 -0700 Subject: [PATCH] add: synthesis high quality related configurable settings --- settings/default/map.lua | 3 +++ src/map/utils/synthutils.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/settings/default/map.lua b/settings/default/map.lua index 7e9b402e330..fcf21dd8d80 100644 --- a/settings/default/map.lua +++ b/settings/default/map.lua @@ -138,6 +138,9 @@ xi.settings.map = -- Amount of points allowed in crafts over the level defined above. Points are shared across all crafting skills. (Retail = 400; All skills can go to max = 3200) CRAFT_SPECIALIZATION_POINTS = 400, + -- Multiplier applied to high quality chance + CRAFT_HQ_CHANCE_MULTIPLIER = 1.0, + -- Enables fishing. 0 = Disabled. 1 = Enable. ENABLE AT YOUR OWN RISK. FISHING_ENABLE = false, diff --git a/src/map/utils/synthutils.cpp b/src/map/utils/synthutils.cpp index 913b8bb4294..0113f9c1ba2 100644 --- a/src/map/utils/synthutils.cpp +++ b/src/map/utils/synthutils.cpp @@ -364,6 +364,7 @@ namespace synthutils // HQ success rate modifier. // See: https://www.bluegartr.com/threads/130586-CraftyMath-v2-Post-September-2017-Update page 3. chanceHQ = chanceHQ + 100.0f * PChar->getMod(Mod::SYNTH_HQ_RATE) / 512.0f; + chanceHQ = chanceHQ * settings::get("map.CRAFT_HQ_CHANCE_MULTIPLIER"); // server configured additional HQ multiplier (default 1.0) // limit max hq chance if (chanceHQ > maxChanceHQ)