****Example code of how to load dungeons into KDF UI.****
**Main Addon Code**
gexampleLoadDungeons = {} --global
local lexampleLoadDungeons = {} --local
lexampleLoadDungeons.DungeonsToLoad = { --local
["dungeons"] = {
[1] = {
private = true,
name = "Tam-Tara Deepcroft",
level = 16,
enemylos = false,
creator = "Kitanoi",
advancedavoid = {
[1] = {type = "custom", customdetails = "function", functionname = "customfunction", functioncode = "function customfunction() KitanoiFuncs.LoadMesh('[Dungeon] Tamtara') end"},
},
notes = "",
expansion = 2,
dutyid = 1037,
requirements = "return KitanoiSettings.GamePatch()>=6.1",
type = "trust",
trustdata = {
mapid = 1037,
scenario = true,
forcescenario = true,
},
enemytargetdistance = 20,
interactdistance = 85,
bossids = {73},
forcemeleerange = {73},
objectivedestinations = {
[1] = {objective = 1, pos = {x= -52.68, y= 14.04, z= -12.54}},
[2] = {objective = 2, pos = {x= -176.10, y= 13.06, z= -5.44}},
[3] = {objective = 3, pos = {x= -52.68, y= 14.04, z= -12.54}},
[4] = {objective = 4, pos = {x= -52.68, y= 14.04, z= -12.54}},
},
queuetype = 3,
interacts = {
[1] = {contentid = 2000061, req = {}, priority = 1, type = "1st cultist orb"},
[2] = {contentid = 16, req = {}, priority = 2, type = "Loot"},
[3] = {contentid = 118, req = {}, priority = 3, type = "Loot"},
[4] = {contentid = 2000062, req = {}, priority = 4, type = "2nd cultist orb"},
[5] = {contentid = 17, req = {}, priority = 5, type = "Loot"},
[6] = {contentid = 119, req = {}, priority = 6, type = "Loot"},
[7] = {contentid = 2000057, req = {}, priority = 5, type = "cultist rosary"},
[8] = {contentid = 2000060, req = {objective = 2, complete = true}, priority = 1, type = "sealed barrier"},
[9] = {contentid = 2000067, req = {objective = 3, complete = true}, priority = 16, type = "3rd cultist orb"},
[10] = {contentid = 2000063, req = {objective = 3, complete = true}, priority = 15, type = "4th cultist orb"},
[11] = {contentid = 62, req = {}, priority = 11, type = "Loot"},
[12] = {contentid = 11, req = {}, priority = 12, type = "Loot"},
},
prioritytarget = {
[1] = {contentid = 456, priority = 1, type = "Imps"},
},
overheadmarkers = {
},
},
},
["title"] = "Fake Dungeons",
["icon"] = GetLuaModsPath().."\\gexampleLoadDungeons\\gexampleLoadDungeons.png",
["who"] = "Fake Kitanoi",
}
lexampleLoadDungeons.DungeonsToLoad2 = { --local
["dungeons"] = {
[1] = {
private = true,
name = "Sastasha",
level = 15,
creator = "Kitanoi",
notes = "",
advancedavoid = {
[1] = {type = "custom", customdetails = "function", functionname = "customfunction", functioncode = "function customfunction() KitanoiFuncs.LoadMesh('[Dungeon] Sastasha') end"},
},
requirements = "return KitanoiSettings.GamePatch()>=6.1",
expansion = 2,
dutyid = 1036,
type = "trust",
trustdata = {
mapid = 1036,
scenario = true,
forcescenario = true,
},
hacks = false,
mesh = "[Dungeon] Sastasha",
finaldestination = {x= -316, y= 5.6, z= 312},
enemytargetdistance = 20,
objectivedestinations = {
[1] = {objective = 1, pos = {x= 66.64, y= 31.67, z= -39.64}},
[2] = {objective = 2, pos = {x= 66.64, y= 31.67, z= -39.64}},
[3] = {objective = 3, pos = {x= -31.03, y= 23.68, z= 58.79}},
[4] = {objective = 4, pos = {x= -94.95, y= 20.01, z= 192.56}},
[5] = {objective = 5, pos = {x= -332, y= 5.57, z= 317}},
},
queuetype = 3,
interacts = {
[1] = {contentid = 2000214, priority = 1},
[2] = {contentid = 2000213, priority = 2},
[3] = {contentid = 2000215, priority = 3},
[4] = {contentid = 2000216, priority = 4},
[5] = {contentid = 2000250, priority = 5},
[6] = {contentid = 2000227, priority = 6},
[7] = {contentid = 2000255, priority = 7},
[8] = {contentid = 2000231, priority = 8, req = {objective = 4, complete = true}},
[9] = {contentid = 94, priority = 9, type = "loot"},
[10] = {contentid = 95, priority = 9, type = "loot"},
[11] = {contentid = 95, priority = 9, type = "loot"},
[12] = {contentid = 93, priority = 9, type = "loot"},
},
ignoretarget = {1208},--giant clam
prioritytarget = {},
overheadmarkers = {
},
},
},
["title"] = "Fake Trials",
["icon"] = GetLuaModsPath().."\\gexampleLoadDungeons\\gexampleLoadDungeons2.png",
["who"] = "Fake Kitanoi 2",
}
function lexampleLoadDungeons.ModuleInit()
KitanoiFuncs.API.DungeonFramework.Load3rdParty(lexampleLoadDungeons.DungeonsToLoad)
KitanoiFuncs.API.DungeonFramework.Load3rdParty(lexampleLoadDungeons.DungeonsToLoad2)
end
RegisterEventHandler("Module.Initalize",lexampleLoadDungeons.ModuleInit,"gexampleLoadDungeons ModuleInit")
**Module.def**
[Module]
Name=gexampleLoadDungeons
Version=1
Files=gexampleLoadDungeons.lua
Dependencies=KitanoiFuncs,Kitanois_Dungeon_Framework
ExportFiles=
Enabled=1
**File Structure**
{{:kitanoi:filestructure.png?nolink|}}