diff --git a/src/Data/QuestRewards.lua b/src/Data/QuestRewards.lua index 58f2f21891..18be5ac1ca 100644 --- a/src/Data/QuestRewards.lua +++ b/src/Data/QuestRewards.lua @@ -1,244 +1,158 @@ +-- This file is automatically generated, do not edit! +-- Item data (c) Grinding Gear Games + return { { ["Act"] = 1, - ["Type"] = "Normal", - ["Area"] = "Clearfell", + ["Area"] = "Beira of the Rotten Pack", ["Stat"] = "+10% to Cold Resistance", + ["questPoints"] = 0, ["AreaLevel"] = 2, - ["useConfig"] = true }, { ["Act"] = 1, - ["Type"] = "Normal", - ["Area"] = "Hunting Grounds", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Area"] = "The Crowbell", ["questPoints"] = 2, ["AreaLevel"] = 10, - ["useConfig"] = false }, { ["Act"] = 1, - ["Type"] = "Normal", - ["Area"] = "Freythorn", + ["Area"] = "The King in the Mists", ["Stat"] = "+30 to Spirit", + ["questPoints"] = 0, ["AreaLevel"] = 11, - ["useConfig"] = true }, { ["Act"] = 1, - ["Type"] = "Normal", - ["Area"] = "Ogham Farmlands", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 12, - ["useConfig"] = false - }, - { - ["Act"] = 1, - ["Type"] = "Normal", - ["Area"] = "Ogham Manor", + ["Area"] = "Candlemass, the Living Rite", ["Stat"] = "+20 to maximum Life", + ["questPoints"] = 0, ["AreaLevel"] = 15, - ["useConfig"] = true }, { ["Act"] = 2, - ["Type"] = "Normal", - ["Area"] = "Keth", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Area"] = "Kabala, Constrictor Queen", ["questPoints"] = 2, - ["AreaLevel"] = 25, - ["useConfig"] = false + ["AreaLevel"] = 21, + }, + { + ["Act"] = 2, + ["Area"] = "Medallion", + ["Stat"] = "30% increased Charm Charges gained,+1 Charm Slot", + ["questPoints"] = 0, + ["AreaLevel"] = 21, }, { ["Act"] = 2, - ["Type"] = "Normal", - ["Area"] = "Valley of the Titans", - ["Options"] = { - "30% increased Charm Charges gained", - "15% increased Mana Recovery from Flasks", - }, - ["AreaLevel"] = 26, - ["useConfig"] = true + ["Area"] = "Medallion", + ["Stat"] = "30% increased Charm Effect Duration,+1 Charm Slot", + ["questPoints"] = 0, + ["AreaLevel"] = 21, }, { ["Act"] = 2, - ["Type"] = "Normal", - ["Area"] = "Deshar", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Area"] = "Final Letter", ["questPoints"] = 2, ["AreaLevel"] = 28, - ["useConfig"] = false }, { ["Act"] = 2, - ["Type"] = "Normal", - ["Area"] = "The Spires of Deshar", + ["Area"] = "Sisters of Garukhan", ["Stat"] = "+10% to Lightning Resistance", + ["questPoints"] = 0, ["AreaLevel"] = 30, - ["useConfig"] = true }, { ["Act"] = 3, - ["Type"] = "Normal", - ["Area"] = "Jungle Ruins", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Area"] = "Mighty Silverfist", ["questPoints"] = 2, - ["AreaLevel"] = 32, - ["useConfig"] = false + ["AreaLevel"] = 34, }, { ["Act"] = 3, - ["Type"] = "Normal", - ["Area"] = "The Azak Bog", - ["Stat"] = "+30 to Spirit", - ["AreaLevel"] = 38, - ["useConfig"] = true + ["Area"] = "Venom Draught", + ["Stat"] = "25% increased Stun Threshold", + ["questPoints"] = 0, + ["AreaLevel"] = 35, }, { ["Act"] = 3, - ["Type"] = "Normal", - ["Area"] = "The Venom Crypts", - ["Options"] = { - "25% increased Stun Threshold", - "30% increased Elemental Ailment Threshold", - "25% increased Mana Regeneration Rate", - }, - ["AreaLevel"] = 39, - ["useConfig"] = true + ["Area"] = "Venom Draught", + ["Stat"] = "30% increased Elemental Ailment Threshold", + ["questPoints"] = 0, + ["AreaLevel"] = 35, }, { ["Act"] = 3, - ["Type"] = "Normal", - ["Area"] = "Jiquanis Machinarium", - ["Stat"] = "+10% to Fire Resistance", - ["AreaLevel"] = 40, - ["useConfig"] = true + ["Area"] = "Venom Draught", + ["Stat"] = "25% increased Mana Regeneration Rate", + ["questPoints"] = 0, + ["AreaLevel"] = 35, }, { ["Act"] = 3, - ["Type"] = "Normal", - ["Area"] = "Aggorat", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 44, - ["useConfig"] = false + ["Area"] = "Blackjaw, the Remnant", + ["Stat"] = "+10% to Fire Resistance", + ["questPoints"] = 0, + ["AreaLevel"] = 37, }, { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Clearfell", - ["Stat"] = "+10% to Cold Resistance", - ["AreaLevel"] = 45, - ["useConfig"] = true + ["Act"] = 3, + ["Area"] = "Ignagduk, the Bog Witch", + ["Stat"] = "+30 to Spirit", + ["questPoints"] = 0, + ["AreaLevel"] = 36, }, { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Hunting Grounds", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 49, - ["useConfig"] = false + ["Act"] = 3, + ["Area"] = "Ultimatum", + ["questPoints"] = 0, + ["AreaLevel"] = 38, }, { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Ogham Farmlands", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Act"] = 3, + ["Area"] = "Blood Sacrifice", ["questPoints"] = 2, - ["AreaLevel"] = 49, - ["useConfig"] = false - }, - { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Ogham Manor", - ["Stat"] = "5% increased maximum Life", - ["AreaLevel"] = 51, - ["useConfig"] = true + ["AreaLevel"] = 44, }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "Keth", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 55, - ["useConfig"] = false + ["Act"] = 4, + ["Area"] = "Goddess of Justice", + ["Stat"] = "30% increased Life Recovery from Flasks", + ["questPoints"] = 0, + ["AreaLevel"] = 46, }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "Valley of the Titans", - ["Options"] = { - "30% increased Charm Charges gained", - "15% increased Life Recovery from Flasks", - }, - ["AreaLevel"] = 55, - ["useConfig"] = true + ["Act"] = 4, + ["Area"] = "Goddess of Justice", + ["Stat"] = "30% increased Mana Recovery from Flasks", + ["questPoints"] = 0, + ["AreaLevel"] = 46, }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "Deshar", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Act"] = 6, + ["Area"] = "Oswin, the Dread Warden", ["questPoints"] = 2, ["AreaLevel"] = 56, - ["useConfig"] = false - }, - { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "The Spires of Deshar", - ["Stat"] = "+10% to Lightning Resistance", - ["AreaLevel"] = 57, - ["useConfig"] = true }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "Jungle Ruins", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 58, - ["useConfig"] = false + ["Act"] = 6, + ["Area"] = "Molten Shrine", + ["Stat"] = "5% increased maximum Life", + ["questPoints"] = 0, + ["AreaLevel"] = 54, }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "The Azak Bog", + ["Act"] = 6, + ["Area"] = "Lythara, the Wayward Spear", ["Stat"] = "+40 to Spirit", - ["AreaLevel"] = 60, - ["useConfig"] = true - }, - { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "The Venom Crypts", - ["Options"] = { - "+10% to Chaos Resistance", - "+5 to All Attributes", - "15% reduced Slowing Potency of Debuffs on you", - }, - ["AreaLevel"] = 59, - ["useConfig"] = true + ["questPoints"] = 0, + ["AreaLevel"] = 54, }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "Jiquanis Machinarium", - ["Stat"] = "+10% to Fire Resistance", - ["AreaLevel"] = 60, - ["useConfig"] = true - }, - { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "Aggorat", - ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["Act"] = 6, + ["Area"] = "The Abominable Yeti", ["questPoints"] = 2, - ["AreaLevel"] = 63, - ["useConfig"] = false + ["AreaLevel"] = 55, }, } \ No newline at end of file diff --git a/src/Export/Classes/GGPKData.lua b/src/Export/Classes/GGPKData.lua index f6d5212df3..1bde5d351c 100644 --- a/src/Export/Classes/GGPKData.lua +++ b/src/Export/Classes/GGPKData.lua @@ -173,6 +173,7 @@ function GGPKClass:GetNeededFiles() "Data/Stats.dat", "Data/VirtualStatContextFlags.dat", "Data/BaseItemTypes.dat", + "Data/MapPins.dat", "Data/WeaponTypes.dat", "Data/ArmourTypes.dat", "Data/ShieldTypes.dat", diff --git a/src/Export/Scripts/questRewards.lua b/src/Export/Scripts/questRewards.lua new file mode 100644 index 0000000000..f6a9766716 --- /dev/null +++ b/src/Export/Scripts/questRewards.lua @@ -0,0 +1,34 @@ +if not loadStatFile then + dofile("statdesc.lua") +end +loadStatFile("stat_descriptions.csd") + +local out = io.open("../Data/QuestRewards.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 _, pin in pairs(dat("MapPins"):GetRowList("HasReward", true)) do + if #pin.ShowFlags == 1 then + local questReward = dat("QuestStaticRewards"):GetRow("QuestFlag", pin.ShowFlags[1]) + if questReward then + out:write('\t{\n') + out:write('\t\t["Act"] = ', pin.Act, ',\n') + out:write('\t\t["Area"] = "', pin.Name, '",\n') + local stats = { } + local hasStat = false + for i, stat in pairs(questReward.Stats) do + hasStat = true + local statValue = questReward.StatValues[i] + stats[stat.Id] = { min = statValue, max = statValue } + end + if hasStat then + out:write('\t\t["Stat"] = "', table.concat(describeStats(stats), ","), '",\n') + end + out:write('\t\t["questPoints"] = ', questReward.WeaponSetPointsRewarded, ',\n') + local worldArea = dat("WorldAreas"):GetRow("Id", pin.BaseMapPin.Id) + out:write('\t\t["AreaLevel"] = ', worldArea.AreaLevel, ',\n') + out:write('\t},\n') + end + end +end +out:write('}') +out:close() \ No newline at end of file diff --git a/src/Export/spec.lua b/src/Export/spec.lua index 941d2c801e..a98276acf1 100644 --- a/src/Export/spec.lua +++ b/src/Export/spec.lua @@ -9685,6 +9685,167 @@ return { mapinhabitants={ }, mappins={ + [1]={ + list=false, + name="Id", + refTo="", + type="String", + width=210 + }, + [2]={ + list=false, + name="PosX", + refTo="", + type="Int", + width=150 + }, + [3]={ + list=false, + name="PosY", + refTo="", + type="Int", + width=150 + }, + [4]={ + list=false, + name="", + refTo="", + type="Int", + width=150 + }, + [5]={ + list=false, + name="", + refTo="", + type="Int", + width=150 + }, + [6]={ + list=true, + name="WorldArea", + refTo="WorldAreas", + type="Key", + width=150 + }, + [7]={ + list=false, + name="Name", + refTo="", + type="String", + width=150 + }, + [8]={ + list=false, + name="Text", + refTo="", + type="String", + width=150 + }, + [9]={ + list=true, + name="ShowFlags", + refTo="QuestFlags", + type="Key", + width=410 + }, + [10]={ + list=false, + name="Act", + refTo="", + type="Int", + width=150 + }, + [11]={ + list=true, + name="", + refTo="QuestFlags", + type="Key", + width=150 + }, + [12]={ + list=true, + name="HideFlags", + refTo="QuestFlags", + type="Key", + width=150 + }, + [13]={ + list=false, + name="", + refTo="", + type="Key", + width=150 + }, + [14]={ + list=false, + name="", + refTo="", + type="String", + width=270 + }, + [15]={ + list=false, + name="", + refTo="MapPins", + type="ShortKey", + width=150 + }, + [16]={ + list=false, + name="MetadataId", + refTo="", + type="String", + width=390 + }, + [17]={ + list=false, + name="", + refTo="", + type="Key", + width=150 + }, + [18]={ + list=false, + name="", + refTo="QuestFlags", + type="Key", + width=150 + }, + [19]={ + list=false, + name="", + refTo="", + type="String", + width=150 + }, + [20]={ + list=false, + name="", + refTo="", + type="Bool", + width=150 + }, + [21]={ + list=false, + name="", + refTo="", + type="Int", + width=150 + }, + [22]={ + list=false, + name="", + refTo="", + type="Int", + width=150 + }, + [23]={ + list=false, + name="HasReward", + refTo="", + type="Bool", + width=150 + } }, mappurchasecosts={ }, @@ -15730,7 +15891,7 @@ return { name="NormalReward", refTo="QuestRewardType", type="Key", - width=150 + width=210 } }, questachievements={ @@ -15754,6 +15915,118 @@ return { questitemnpcaudio={ }, questitems={ + [1]={ + list=false, + name="", + refTo="BaseItemTypes", + type="Key", + width=440 + }, + [2]={ + list=false, + name="", + refTo="QuestFlags", + type="Key", + width=230 + }, + [3]={ + list=false, + name="", + refTo="QuestFlags", + type="Key", + width=220 + }, + [4]={ + list=false, + name="", + refTo="", + type="Int", + width=150 + }, + [5]={ + list=true, + name="", + refTo="", + type="Int", + width=150 + }, + [6]={ + list=false, + name="", + refTo="", + type="Bool", + width=150 + }, + [7]={ + list=false, + name="", + refTo="", + type="Bool", + width=150 + }, + [8]={ + list=false, + name="HelpText", + refTo="ClientStrings", + type="Key", + width=270 + }, + [9]={ + list=false, + name="", + refTo="ClientStrings", + type="Key", + width=150 + }, + [10]={ + list=false, + name="", + refTo="", + type="String", + width=150 + }, + [11]={ + list=false, + name="", + refTo="", + type="Key", + width=150 + }, + [12]={ + list=false, + name="", + refTo="", + type="Key", + width=150 + }, + [13]={ + list=false, + name="", + refTo="", + type="Int", + width=150 + }, + [14]={ + list=true, + name="arr", + refTo="", + type="Int", + width=150 + }, + [15]={ + list=false, + name="", + refTo="", + type="Key", + width=150 + }, + [16]={ + list=false, + name="", + refTo="", + type="Key", + width=150 + } }, questrewardoffers={ [1]={ diff --git a/src/Modules/Build.lua b/src/Modules/Build.lua index 1ead505231..db71b8c1e0 100644 --- a/src/Modules/Build.lua +++ b/src/Modules/Build.lua @@ -75,20 +75,17 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin -- calculate acts Table based on data.questRewards self.acts = { { level = 1 , questPoints = 0 } } for _, quest in ipairs(data.questRewards) do - if not quest.questPoints then - goto nextQuest - end - local act = quest.Act + (quest.Type == "Cruel" and 3 or 0) + 1 + local act = quest.Act + 1 if not self.acts[act] then self.acts[act] = { level = quest.AreaLevel, - questPoints = quest.questPoints + self.acts[act - 1].questPoints, + -- hack to fix missing act 5 for now + questPoints = quest.questPoints + self.acts[act - ((act == 7) and 2 or 1)].questPoints, } else self.acts[act].questPoints = self.acts[act].questPoints + quest.questPoints self.acts[act].level = m_max(self.acts[act].level, quest.AreaLevel) end - :: nextQuest :: end self.maxActs = #self.acts self.maxWeaponSets = self.acts[self.maxActs].questPoints diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index 46b609f173..932746edb1 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -57,14 +57,11 @@ local function addQuestModsRewardsConfigOptions(configSettings) table.insert(configSettings, { section = "Quest Rewards", col = 3 }) for i, quest in ipairs(data.questRewards) do - if quest.useConfig == false then - goto continue - end - local source = string.format("Quest:Act %d %s %s", quest.Act, quest.Type, quest.Area) + local source = string.format("Quest:Act %d %s", quest.Act, quest.Area) if quest.Stat then table.insert(configSettings,{ - var = "questAct".. quest.Act .. quest.Type .. quest.Area, - label = string.format("Act %d %s: %s", quest.Act, quest.Type, quest.Area), + var = "questAct".. quest.Act .. quest.Area, + label = string.format("Act %d: %s", quest.Act, quest.Area), type = "check", defaultState = true, tooltip = quest.Stat, @@ -78,8 +75,8 @@ local function addQuestModsRewardsConfigOptions(configSettings) table.insert(listOptions, { label = option, val = option }) end table.insert(configSettings,{ - var = "questAct".. quest.Act .. quest.Type .. quest.Area, - label = string.format("Act %d %s: %s", quest.Act, quest.Type, quest.Area), + var = "questAct".. quest.Act .. quest.Area, + label = string.format("Act %d: %s", quest.Act, quest.Area), type = "list", list = listOptions, defaultIndex = 1, @@ -92,7 +89,6 @@ local function addQuestModsRewardsConfigOptions(configSettings) end }) end - ::continue:: end end