Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Export/Classes/GGPKFile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function GGPKClass:ExtractFiles()
fileList = fileList .. '"' .. fname .. '" '
end

cmd = 'cd ' .. self.oozPath .. '&& bun_extract_file.exe "' .. self.path .. '" . ' .. fileList
cmd = 'cd ' .. self.oozPath .. ' && bun_extract_file.exe extract-files "' .. self.path .. '" . ' .. fileList
ConPrintf(cmd)
os.execute(cmd)
end
Expand Down Expand Up @@ -243,6 +243,9 @@ function GGPKClass:GetNeededFiles()
"Data/AlternatePassiveAdditions.dat",
"Data/AlternatePassiveSkills.dat",
"Data/AlternateTreeVersions.dat",
"Data/GrantedEffectQualityTypes.dat",
"Data/GrantedEffectQualityStats.dat",
"Data/GrantedEffectGroups.dat",
}
local txtFiles = {
"Metadata/StatDescriptions/passive_skill_aura_stat_descriptions.txt",
Expand Down
32 changes: 25 additions & 7 deletions Export/Scripts/skills.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ directiveTable.skill = function(state, args, out)
out:write('skills["', grantedId, '"] = {\n')
local granted = dat("GrantedEffects"):GetRow("Id", grantedId)
if not granted then
print('Unknown GE: "'..grantedId..'"')
ConPrintf('Unknown GE: "'..grantedId..'"')
return
end
local skillGem = dat("SkillGems"):GetRow("GrantedEffect", granted) or dat("SkillGems"):GetRow("SecondaryGrantedEffect", granted)
local skill = { }
Expand Down Expand Up @@ -297,10 +298,18 @@ directiveTable.skill = function(state, args, out)
table.insert(skill.stats, { id = stat.Id })
end
end
if not skill.qualityStats then
skill.qualityStats = { }
for i, stat in ipairs(levelRow.QualityStats) do
table.insert(skill.qualityStats, { stat.Id, levelRow.QualityStatValues[i] / 1000 })
end
if not skill.qualityStats then
skill.qualityStats = { }
local divisor = nil
for i, qualityStatsRow in ipairs(dat("GrantedEffectQualityStats"):GetRowList("GrantedEffect", granted)) do
skill.qualityStats[i] = { }
if not divisor then
divisor = qualityStatsRow.Divisor * 20
end
for j, stat in ipairs(qualityStatsRow.GrantedStats) do
table.insert(skill.qualityStats[i], { stat.Id, qualityStatsRow.StatValues[j] / divisor })
--ConPrintf("[%d] %s %s", i, granted.ActiveSkill.DisplayName, stat.Id)
end
end
end
Expand Down Expand Up @@ -339,8 +348,17 @@ directiveTable.mods = function(state, args, out)
end
out:write('\t},\n')
out:write('\tqualityStats = {\n')
for _, stat in ipairs(skill.qualityStats) do
out:write('\t\t{ "', stat[1], '", ', stat[2], ' },\n')
for i, alternates in ipairs(skill.qualityStats) do
for _, stat in ipairs(alternates) do
if i == 1 then
out:write('\t\tDefault = {\n')
else
local value = i - 1
out:write('\t\tAlternate' .. value .. ' = {\n')
end
out:write('\t\t\t{ "', stat[1], '", ', stat[2], ' },\n')
out:write('\t\t},\n')
end
end
out:write('\t},\n')
out:write('\tstats = {\n')
Expand Down
2 changes: 1 addition & 1 deletion Export/Skills/act_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ local skills, mod, flag, skill = ...
#baseMod skill("radius", 40)
#mods

#skill ProjectileWeakness
#skill SnipersMark
#flags spell curse area duration
statMap = {
["projectiles_always_pierce_you"] = {
Expand Down
135 changes: 94 additions & 41 deletions Export/spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ return {
name="Id",
refTo="",
type="String",
width=370
width=480
},
[2]={
list=false,
Expand Down Expand Up @@ -2436,6 +2436,73 @@ return {
},
GrantedEffectGroups={
},
GrantedEffectQualityStats={
[1]={
list=false,
name="GrantedEffect",
refTo="GrantedEffects",
type="Key",
width=150
},
[2]={
list=false,
name="AlternateID",
refTo="",
type="Int",
width=90
},
[3]={
list=true,
name="GrantedStats",
refTo="Stats",
type="Key",
width=460
},
[4]={
list=true,
name="StatValues",
refTo="",
type="Int",
width=150
},
[5]={
list=false,
name="Divisor",
refTo="",
type="Int",
width=90
}
},
GrantedEffectQualityTypes={
[1]={
list=false,
name="AlternateId",
refTo="",
type="Int",
width=150
},
[2]={
list=false,
name="",
refTo="",
type="String",
width=150
},
[3]={
list=false,
name="",
refTo="",
type="Int",
width=150
},
[4]={
list=false,
name="",
refTo="",
type="Int",
width=150
}
},
GrantedEffects={
[1]={
list=false,
Expand Down Expand Up @@ -2684,110 +2751,110 @@ return {
width=60
},
[12]={
list=false,
name="StatEff9",
refTo="",
type="Float",
width=60
},
[13]={
list=true,
name="EffectivenessCost",
refTo="EffectivenessCostConstants",
type="Key",
width=250
},
[13]={
[14]={
list=false,
name="Stat1",
refTo="",
type="Int",
width=60
},
[14]={
[15]={
list=false,
name="Stat2",
refTo="",
type="Int",
width=60
},
[15]={
[16]={
list=false,
name="Stat3",
refTo="",
type="Int",
width=60
},
[16]={
[17]={
list=false,
name="Stat4",
refTo="",
type="Int",
width=60
},
[17]={
[18]={
list=false,
name="Stat5",
refTo="",
type="Int",
width=60
},
[18]={
[19]={
list=false,
name="Stat6",
refTo="",
type="Int",
width=60
},
[19]={
[20]={
list=false,
name="Stat7",
refTo="",
type="Int",
width=60
},
[20]={
[21]={
list=false,
name="Stat8",
refTo="",
type="Int",
width=60
},
[21]={
[22]={
list=false,
name="Stat9",
refTo="",
type="Int",
width=60
},
[23]={
list=false,
name="PlayerLevel",
refTo="",
type="Int",
width=70
},
[22]={
[24]={
list=false,
name="ManaMultiplier",
refTo="",
type="Int",
width=80
},
[23]={
[25]={
list=false,
name="",
refTo="",
type="Int",
width=40
},
[24]={
[26]={
list=false,
name="",
refTo="",
type="Int",
width=40
},
[25]={
list=true,
name="QualityStats",
refTo="Stats",
type="Key",
width=150
},
[26]={
list=true,
name="QualityStatValues",
refTo="",
type="Int",
width=100
},
[27]={
list=false,
name="SpellCritChance",
Expand Down Expand Up @@ -2929,20 +2996,6 @@ return {
width=80
},
[47]={
list=false,
name="StatEff9",
refTo="",
type="Float",
width=150
},
[48]={
list=false,
name="Stat9",
refTo="",
type="Int",
width=150
},
[49]={
list=false,
name="AttackSpeedMultiplier",
refTo="",
Expand Down
15 changes: 8 additions & 7 deletions Export/statdesc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ function loadStatFile(fileName)
local desc = { text = text, limit = { } }
for statLimit in statLimits:gmatch("[%d%-#|]+") do
local limit = { }

if statLimit == "#" then
limit[1] = "#"
limit[2] = "#"
elseif statLimit:match("^%d+$") then
elseif statLimit:match("^%-?%d+$") then
limit[1] = tonumber(statLimit)
limit[2] = tonumber(statLimit)
else
Expand Down Expand Up @@ -85,7 +86,7 @@ for k, v in pairs(nk) do
print("'"..k.."' = '"..v.."'")
end

local function matchLimit(lang, val)
local function matchLimit(lang, val)
for _, desc in ipairs(lang) do
local match = true
for i, limit in ipairs(desc.limit) do
Expand Down Expand Up @@ -191,22 +192,22 @@ function describeStats(stats)
val[spec.v].max = 100 + val[spec.v].max
end
end
local statDesc = desc.text:gsub("%%(%d)%%", function(n)
local v = val[tonumber(n)]
local statDesc = desc.text:gsub("{(%d)}", function(n)
local v = val[tonumber(n)+1]
if v.min == v.max then
return string.format("%"..v.fmt, v.min)
else
return string.format("(%"..v.fmt.."-%"..v.fmt..")", v.min, v.max)
end
end):gsub("%%d", function()
end):gsub("{:%+?d}", function()
local v = val[1]
if v.min == v.max then
return string.format("%"..v.fmt, v.min)
else
return string.format("(%"..v.fmt.."-%"..v.fmt..")", v.min, v.max)
end
end):gsub("%%(%d)$(%+?)d", function(n, fmt)
local v = val[tonumber(n)]
end):gsub("{(%d):(%+?)d}", function(n, fmt)
local v = val[tonumber(n)+1]
if v.min == v.max then
return string.format("%"..fmt..v.fmt, v.min)
elseif fmt == "+" then
Expand Down