Files
PathOfBuilding/Export/masters.lua
Openarl 9b5353c543 1.4.122 initial commit
- Updated crafting options
- Added new weapon restriction changes
2019-01-01 23:01:36 +13:00

66 lines
1.9 KiB
Lua

loadStatFile("stat_descriptions.txt")
local itemClassMap = {
[0] = "Flask",
[1] = "Flask",
[2] = "Flask",
[4] = "Amulet",
[5] = "Ring",
[6] = "Claw",
[7] = "Dagger",
[8] = "Wand",
[9] = "One Handed Sword",
[10] = "Thrusting One Handed Sword",
[11] = "One Handed Axe",
[12] = "One Handed Mace",
[13] = "Bow",
[14] = "Staff",
[15] = "Two Handed Sword",
[16] = "Two Handed Axe",
[17] = "Two Handed Mace",
[20] = "Quiver",
[21] = "Belt",
[22] = "Gloves",
[23] = "Boots",
[24] = "Body Armour",
[25] = "Helmet",
[26] = "Shield",
[32] = "Sceptre",
[33] = "Flask",
[34] = "Flask",
[35] = "Map",
[41] = "Jewel",
}
local out = io.open("../Data/3_0/ModMaster.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 _, craftKey in ipairs(CraftingBenchOptions.IsDisabled(false)) do
local craft = CraftingBenchOptions[craftKey]
if craft.ModsKey and itemClassMap[craft.CraftingItemClassCategoriesKeys[1]] then
local mod = Mods[craft.ModsKey]
out:write('\t{ ')
if mod.GenerationType == 1 then
out:write('type = "Prefix", ')
elseif mod.GenerationType == 2 then
out:write('type = "Suffix", ')
end
out:write('affix = "', mod.Name, '", ')
local stats, orders = describeMod(mod)
out:write('"', table.concat(stats, '", "'), '", ')
out:write('statOrder = { ', table.concat(orders, ', '), ' }, ')
out:write('level = ', mod.Level, ', group = "', mod.CorrectGroup, '", ')
out:write('types = { ')
for _, catagoryKey in ipairs(craft.CraftingItemClassCategoriesKeys) do
local catagory = CraftingItemClassCategories[catagoryKey]
for _, itemClassesKey in ipairs(catagory.ItemClassesKeys) do
out:write('["', itemClassMap[itemClassesKey], '"] = true, ')
end
end
out:write('}, ')
out:write('},\n')
end
end
out:write('}')
out:close()
print("Master mods exported.")