diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index d3ffb571c..fc9bb9db4 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -3035,10 +3035,45 @@ function ItemsTabClass:AddCustomModifierToDisplayItem() return a.essence.tierLevel > b.essence.tierLevel end end) + elseif sourceId == "EMOTION" then + local radiusJewel = not not (self.displayItem.base.subType and self.displayItem.base.subType:match("Radius")) + local baseColour + for _, itemName in ipairs({ "Ruby", "Emerald", "Sapphire", "Diamond" }) do + if self.displayItem.baseName:match(itemName) then + baseColour = itemName + break + end + end + if not baseColour then + error("Base is a gem but has no colour. Base name: " .. tostring(self.displayItem.baseName)) + end + for _, emotion in pairs(data.emotions) do + if emotion.radiusJewel == radiusJewel then + for modType, modId in pairs(emotion.mods[baseColour] or {}) do + local mod = data.itemMods.Jewel[modId] + if mod then + t_insert(modList, { + label = string.format("%s ^8[%s] (%s)", emotion.name, table.concat(mod, "/"), + mod.type or ""), + mod = mod, + type = "custom", + emotion = emotion, + }) + end + end + end + end + table.sort(modList, function(a, b) + if a.emotion.tierLevel ~= b.emotion.tierLevel then + return a.emotion.tierLevel > b.emotion.tierLevel + else + return a.emotion.name > b.emotion.name + end + end) elseif sourceId == "DESECRATED" then local function isDesecratedMod(mod) for _, tag in ipairs(mod.modTags or { }) do - if tag == "ulaman_mod" or tag == "amanamu_mod" or tag == "kurgal_mod" then + if tag == "ulaman_mod" or tag == "amanamu_mod" or tag == "kurgal_mod" or tag == "unveiled_mod" then return true end end @@ -3102,6 +3137,12 @@ function ItemsTabClass:AddCustomModifierToDisplayItem() if hasDesecratedMods then t_insert(sourceList, { label = "Desecrated", sourceId = "DESECRATED" }) end + if self.displayItem.base.type == "Jewel" then + buildMods("EMOTION") + if #modList > 0 then + t_insert(sourceList, { label = "Emotion", sourceId = "EMOTION" }) + end + end t_insert(sourceList, { label = "Custom", sourceId = "CUSTOM" }) buildMods(sourceList[1].sourceId) local function addModifier() diff --git a/src/Data/LiquidEmotions.lua b/src/Data/LiquidEmotions.lua new file mode 100644 index 000000000..811acff14 --- /dev/null +++ b/src/Data/LiquidEmotions.lua @@ -0,0 +1,31 @@ +-- This file is automatically generated, do not edit! +-- Item data (c) Grinding Gear Games + +return { + ["Metadata/Items/Currency/DistilledEmotion1"] = { name = "Diluted Liquid Ire", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelArmour", }, ["Sapphire"] = {["Prefix"] = "JewelEvasion", }, ["Emerald"] = {["Prefix"] = "JewelEnergyShield", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion2"] = { name = "Diluted Liquid Guilt", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelFireDamage", }, ["Sapphire"] = {["Prefix"] = "JewelLightningDamage", }, ["Emerald"] = {["Prefix"] = "JewelColdDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion3"] = { name = "Diluted Liquid Greed", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelPhysicalDamage", }, ["Sapphire"] = {["Prefix"] = "JewelElementalDamage", }, ["Emerald"] = {["Prefix"] = "JewelChaosDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion4"] = { name = "Liquid Paranoia", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelAttackDamage", }, ["Sapphire"] = {["Suffix"] = "JewelAttackSpeed", }, ["Emerald"] = {["Suffix"] = "JewelCastSpeed", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion5"] = { name = "Liquid Envy", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Suffix"] = "JewelLifeCost", }, ["Sapphire"] = {["Suffix"] = "JewelCooldownSpeed", }, ["Emerald"] = {["Prefix"] = "JewelSpellDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion6"] = { name = "Liquid Disgust", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Suffix"] = "JewelLifeRegeneration", }, ["Sapphire"] = {["Suffix"] = "JewelLifeonKill", }, ["Emerald"] = {["Suffix"] = "JewelManaonKill", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion7"] = { name = "Liquid Despair", radiusJewel = false, tierLevel = 1, mods = {["Ruby"] = {["Suffix"] = "JewelRageonHit", }, ["Sapphire"] = {["Suffix"] = "JewelAttackCriticalChance", }, ["Emerald"] = {["Suffix"] = "JewelSpellCriticalChance", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion8"] = { name = "Concentrated Liquid Fear", radiusJewel = false, tierLevel = 69, mods = {["Ruby"] = {["Suffix"] = "JewelWarcrySpeed", }, ["Sapphire"] = {["Suffix"] = "JewelAttackCriticalDamage", }, ["Emerald"] = {["Suffix"] = "JewelSpellCriticalDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion9"] = { name = "Concentrated Liquid Suffering", radiusJewel = false, tierLevel = 73, mods = {["Ruby"] = {["Prefix"] = "JewelMaximumRage", }, ["Sapphire"] = {["Suffix"] = "JewelMovementSpeed", }, ["Emerald"] = {["Prefix"] = "JewelAreaofEffect", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotion10"] = { name = "Concentrated Liquid Isolation", radiusJewel = false, tierLevel = 77, mods = {["Ruby"] = {["Suffix"] = "JewelMaximumFireResistance", }, ["Sapphire"] = {["Suffix"] = "JewelMaximumLightningResistance", }, ["Emerald"] = {["Suffix"] = "JewelMaximumColdResistance", }, ["Diamond"] = {["Suffix"] = "CraftedJewelMaximumChaosResistance", }, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost1"] = { name = "Ancient Diluted Liquid Ire", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelRadiusArmour", }, ["Sapphire"] = {["Prefix"] = "JewelRadiusEvasion", }, ["Emerald"] = {["Prefix"] = "JewelRadiusEnergyShield", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost2"] = { name = "Ancient Diluted Liquid Guilt", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelRadiusFireDamage", }, ["Sapphire"] = {["Prefix"] = "JewelRadiusLightningDamage", }, ["Emerald"] = {["Prefix"] = "JewelRadiusColdDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost3"] = { name = "Ancient Diluted Liquid Greed", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelRadiusPhysicalDamage", }, ["Sapphire"] = {["Prefix"] = "JewelRadiusElementalDamage", }, ["Emerald"] = {["Prefix"] = "JewelRadiusChaosDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost4"] = { name = "Ancient Liquid Paranoia", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Prefix"] = "JewelRadiusAttackDamage", }, ["Sapphire"] = {["Suffix"] = "JewelRadiusAttackSpeed", }, ["Emerald"] = {["Suffix"] = "JewelRadiusCastSpeed", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost5"] = { name = "Ancient Liquid Envy", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Suffix"] = "JewelRadiusLifeCost", }, ["Sapphire"] = {["Suffix"] = "JewelRadiusCooldownSpeed", }, ["Emerald"] = {["Prefix"] = "JewelRadiusSpellDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost6"] = { name = "Ancient Liquid Disgust", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Suffix"] = "JewelRadiusLifeRegeneration", }, ["Sapphire"] = {["Suffix"] = "JewelRadiusLifeonKill", }, ["Emerald"] = {["Suffix"] = "JewelRadiusManaonKill", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost7"] = { name = "Ancient Liquid Despair", radiusJewel = true, tierLevel = 1, mods = {["Ruby"] = {["Suffix"] = "JewelRadiusRageonHit", }, ["Sapphire"] = {["Suffix"] = "JewelRadiusAttackCriticalChance", }, ["Emerald"] = {["Suffix"] = "JewelRadiusSpellCriticalChance", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost8"] = { name = "Ancient Concentrated Liquid Fear", radiusJewel = true, tierLevel = 69, mods = {["Ruby"] = {["Suffix"] = "JewelRadiusWarcrySpeed", }, ["Sapphire"] = {["Suffix"] = "JewelRadiusAttackCriticalDamage", }, ["Emerald"] = {["Suffix"] = "JewelRadiusSpellCriticalDamage", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost9"] = { name = "Ancient Concentrated Liquid Suffering", radiusJewel = true, tierLevel = 73, mods = {["Ruby"] = {["Prefix"] = "JewelRadiusMaximumRage", }, ["Sapphire"] = {["Suffix"] = "JewelRadiusMovementSpeed", }, ["Emerald"] = {["Prefix"] = "JewelRadiusAreaofEffect", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/DistilledEmotionTimeLost10"] = { name = "Ancient Concentrated Liquid Isolation", radiusJewel = true, tierLevel = 77, mods = {["Ruby"] = {["Prefix"] = "JewelRadiusIncLightningColdToFire", }, ["Sapphire"] = {["Prefix"] = "JewelRadiusIncColdFreToLightning", }, ["Emerald"] = {["Prefix"] = "JewelRadiusIncLightningFireToCold", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/EndgameDistilledEmotion1"] = { name = "Potent Liquid Melancholy", radiusJewel = false, tierLevel = 65, mods = {["Ruby"] = {["Suffix"] = "CraftedJewelDebilitateOnHitWhileEmeraldSapphireSocketed", }, ["Sapphire"] = {["Suffix"] = "CraftedJewelBlindOnHitWhileRubySapphireSocketed", }, ["Emerald"] = {["Suffix"] = "CraftedJewelExposureOnHitWhileRubyEmeraldSocketed", }, ["Diamond"] = {}, }, }, + ["Metadata/Items/Currency/EndgameDistilledEmotion2"] = { name = "Potent Liquid Ferocity", radiusJewel = false, tierLevel = 65, mods = {["Ruby"] = {["Prefix"] = "CraftedJewelSuffixEffect", ["Suffix"] = "CraftedJewelPrefixEffect", }, ["Sapphire"] = {["Prefix"] = "CraftedJewelSuffixEffect", ["Suffix"] = "CraftedJewelPrefixEffect", }, ["Emerald"] = {["Prefix"] = "CraftedJewelSuffixEffect", ["Suffix"] = "CraftedJewelPrefixEffect", }, ["Diamond"] = {["Prefix"] = "CraftedJewelSuffixEffect", ["Suffix"] = "CraftedJewelPrefixEffect", }, }, }, + ["Metadata/Items/Currency/EndgameDistilledEmotion3"] = { name = "Potent Liquid Contempt", radiusJewel = false, tierLevel = 65, mods = {["Ruby"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, ["Sapphire"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, ["Emerald"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, ["Diamond"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, }, }, + ["Metadata/Items/Currency/EndgameDistilledEmotionTimeLost1"] = { name = "Ancient Potent Liquid Melancholy", radiusJewel = true, tierLevel = 65, mods = {["Ruby"] = {["Prefix"] = "CraftedJewelRadiusExtraLargeSize", }, ["Sapphire"] = {["Prefix"] = "CraftedJewelRadiusExtraLargeSize", }, ["Emerald"] = {["Prefix"] = "CraftedJewelRadiusExtraLargeSize", }, ["Diamond"] = {["Prefix"] = "CraftedJewelRadiusExtraLargeSize", }, }, }, + ["Metadata/Items/Currency/EndgameDistilledEmotionTimeLost2"] = { name = "Ancient Potent Liquid Ferocity", radiusJewel = true, tierLevel = 65, mods = {["Ruby"] = {["Suffix"] = "CraftedJewelRadiusFireResistance", }, ["Sapphire"] = {["Suffix"] = "CraftedJewelRadiusLightningResistance", }, ["Emerald"] = {["Suffix"] = "CraftedJewelRadiusColdResistance", }, ["Diamond"] = {["Suffix"] = "CraftedJewelRadiusChaosResistance", }, }, }, + ["Metadata/Items/Currency/EndgameDistilledEmotionTimeLost3"] = { name = "Ancient Potent Liquid Contempt", radiusJewel = true, tierLevel = 65, mods = {["Ruby"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, ["Sapphire"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, ["Emerald"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, ["Diamond"] = {["Prefix"] = "CraftedJewelAdditionalSuffixAllowed", ["Suffix"] = "CraftedJewelAdditionalPrefixAllowed", }, }, }, +} \ No newline at end of file diff --git a/src/Export/Classes/GGPKData.lua b/src/Export/Classes/GGPKData.lua index d65324ed5..278e4b3c6 100644 --- a/src/Export/Classes/GGPKData.lua +++ b/src/Export/Classes/GGPKData.lua @@ -368,6 +368,7 @@ function GGPKClass:GetNeededFiles() "Data/Balance/CharacterShapeshiftBasicSkills.dat", "Data/Balance/UniqueOrigins.dat", "Data/Balance/Origin.dat", + "Data/Balance/LiquidEmotionOutcomes.dat", } local csdFiles = { "^Data/StatDescriptions/specific_skill_stat_descriptions/\\w+.csd$", diff --git a/src/Export/Scripts/essence.lua b/src/Export/Scripts/essence.lua index c5512ced5..8b0bc684b 100644 --- a/src/Export/Scripts/essence.lua +++ b/src/Export/Scripts/essence.lua @@ -20,4 +20,26 @@ end out:write('}') out:close() -print("Essences exported.") +local out = io.open("../Data/LiquidEmotions.lua", "w") +out:write('-- This file is automatically generated, do not edit!\n') +out:write('-- Item data (c) Grinding Gear Games\n\nreturn {\n') +for emotion in dat("LiquidEmotionOutcomes"):Rows() do + local text = string.format('\t["%s"] = { name = "%s", radiusJewel = %s, tierLevel = %s, mods = {', + emotion.BaseItemType.Id, emotion.BaseItemType.Name, emotion.RadiusJewel == 1, emotion.BaseItemType.DropLevel) + out:write(text) + for _, jewelBase in ipairs({ "Ruby", "Sapphire", "Emerald", "Diamond" }) do + out:write(string.format('["%s"] = {', jewelBase)) + for _, modType in ipairs({ "Prefix", "Suffix" }) do + local key = jewelBase .. modType + local mod = emotion[key] + if mod then + out:write(string.format('["%s"] = "%s", ', modType, mod.Id)) + end + end + out:write("}, ") + end + out:write("}, },\n") +end +out:write('}') +out:close() +print("Essences and emotions exported.") diff --git a/src/Export/spec.lua b/src/Export/spec.lua index 974b6a6b5..64ee00451 100644 --- a/src/Export/spec.lua +++ b/src/Export/spec.lua @@ -35715,7 +35715,7 @@ return { name="BaseItemType", refTo="BaseItemTypes", type="Key", - width=150 + width=300 }, [2]={ list=false, diff --git a/src/Modules/Data.lua b/src/Modules/Data.lua index 8fc98820d..31b067b34 100644 --- a/src/Modules/Data.lua +++ b/src/Modules/Data.lua @@ -630,18 +630,21 @@ data.itemMods = { -- update JewelRadius affixes for Time-Lost jewels do - for index, value in pairs(data.itemMods.Jewel) do - if index:find("JewelRadius") and value.nodeType and value[1] then - if value.nodeType == 1 then - value[1] = "Small Passive Skills in Radius also grant "..value[1] - elseif value.nodeType == 2 then - value[1] = "Notable Passive Skills in Radius also grant "..value[1] + for _, key in ipairs({ "Jewel", "Desecrated" }) do + for index, value in pairs(data.itemMods[key]) do + if (index:find("JewelRadius") or index:find("AbyssModRadiusJewel")) and value.nodeType and value[1] then + if value.nodeType == 1 then + value[1] = "Small Passive Skills in Radius also grant " .. value[1] + elseif value.nodeType == 2 then + value[1] = "Notable Passive Skills in Radius also grant " .. value[1] + end end end end end data.essences = LoadModule("Data/Essence") +data.emotions = LoadModule("Data/LiquidEmotions") data.costs = LoadModule("Data/Costs") do local map = { }