local FreedomCorp = {
        "Freedom_Corp_Male_01",
        "Freedom_Corp_Male_02",
        "Freedom_Corp_Male_03",
        "Freedom_Corp_Male_04",
        "Freedom_Corp_Female_01",
        "Freedom_Corp_Female_02",
        "Freedom_Corp_Female_03",
}

local FreedomCorpStore = {
        "Model_Freedom_Corp_Store_NPC_05",
        "Model_Freedom_Corp_Store_NPC_07",
        "Model_Freedom_Corp_Store_NPC_03",
        "Model_Freedom_Corp_Store_NPC_04",
        "Model_Freedom_Corp_Store_NPC_01",
        "Model_Freedom_Corp_Store_NPC_02",
        "Model_Freedom_Corp_Store_NPC_07",
        "Model_Freedom_Corp_Store_NPC_08",        
}

local HeroCorp = {
        "Hero_Corp_Male_01",
        "Hero_Corp_Male_02",
        "Hero_Corp_Male_03",
        "Hero_Corp_Male_04",
        "Hero_Corp_Male_05",
        "Hero_Corp_Male_06",
        "Hero_Corp_Male_07",
        "Hero_Corp_Male_08",
        "Hero_Corp_Male_09",
        "Hero_Corp_Male_10",
        "Hero_Corp_Female_01",
        "Hero_Corp_Female_02",
        "Hero_Corp_Female_03",
        "Hero_Corp_Female_04",
        "Hero_Corp_Female_05",
        "Hero_Corp_Female_06",
        "Hero_Corp_Female_07",
        "Hero_Corp_Female_08",
        "Hero_Corp_Female_09",
        "Hero_Corp_Female_10",
}

local NaturalStore = {
        "Model_Natural_Store_NPC_01",
        "Model_Natural_Store_NPC_02",
        "Model_Natural_Store_NPC_03",
        "Model_Natural_Store_NPC_04",
        "Model_Natural_Store_NPC_05",
        "Model_Natural_Store_NPC_06",
        "Model_Natural_Store_NPC_07",
        "Model_Natural_Store_NPC_08",
}

local TechStore = {
        "Model_Tech_Store_NPC_01",
        "Model_Tech_Store_NPC_02",
        "Model_Tech_Store_NPC_03",
        "Model_Tech_Store_NPC_04",
        "Model_Tech_Store_NPC_05",
        "Model_Tech_Store_NPC_06",
        "Model_Tech_Store_NPC_07",
        "Model_Tech_Store_NPC_08",       
}

local ScienceStore = {
        "Model_Science_Store_NPC_01",
        "Model_Science_Store_NPC_02",
        "Model_Science_Store_NPC_03",
        "Model_Science_Store_NPC_04",
        "Model_Science_Store_NPC_05",
        "Model_Science_Store_NPC_06",
        "Model_Science_Store_NPC_07",
        "Model_Science_Store_NPC_08",        
}

local MutantStore = {
        "Model_Mutant_Store_NPC_01",
        "Model_Mutant_Store_NPC_02",
        "Model_Mutant_Store_NPC_03",
        "Model_Mutant_Store_NPC_04",
        "Model_Mutant_Store_NPC_05",
        "Model_Mutant_Store_NPC_06",
        "Model_Mutant_Store_NPC_07",
        "Model_Mutant_Store_NPC_08",  
}

local MagicStore = {
        "Model_Magic_Store_NPC_01",
        "Model_Magic_Store_NPC_02",
        "Model_Magic_Store_NPC_03",
        "Model_Magic_Store_NPC_04",
        "Model_Magic_Store_NPC_05",
        "Model_Magic_Store_NPC_06",
        "Model_Magic_Store_NPC_07",
        "Model_Magic_Store_NPC_08",       
}

local SecurityChiefs = {
        "MaleNPC_230",
        "MaleNPC_231",
}

local All_Persistents = {
        ["Sergeant_Hicks"] = "Model_SergeantHicks",
        ["Officer_Parks"] = "Model_OfficerParks",
        ["Doctor_Miller"] = "Model_DoctorMiller",
        ["Detective_Wright"] = "Model_DetectiveWright",
        ["Officer_Flint"] = "Model_OfficerFlint",
        ["Lt_MacReady"] = "CSE_01",
        ["Paragon_SWAT"] = SecurityChiefs,
        ["Professor_Hoffman"] = "Model_ProfessorHoffman",
        ["Laurence_Mansfield"] = "Model_LaurenceMansfield",
        ["Iris_Parker"] = "Model_IrisParker",
        ["Sarah_Juarez"] = "Model_SarahJuarez",
        ["Security_Chief_01"] =	SecurityChiefs,
        ["Security_Chief_04"] =	SecurityChiefs,
        ["City_Representative"] = "Model_CityRepresentative",
        ["SuperGroupRegistrar"] = "MaleNPC_01",
        ["Charlie"] = "Model_Charlie",
        ["Susan_Davies"] = "Model_SusanDavies",
        ["Antonio_Nash"] = "Model_AntonioNash",
        ["Rick_Davies"] = "Model_RickDavies",
        ["Jonathan_Smythe"] = "Model_JonathanSmythe",
        ["Azuria"] = "Model_Azuria",
        ["MsLiberty"] = "Model_MsLiberty",
        ["Tony_Kord"] = "Model_TonyKord",
        ["Jose_Brogan"] = "Model_JoseBrogan",
        ["Sarah_Peters"] = "Model_SarahPeters",
        ["FreedomCorp_City_01_01"] = FreedomCorp,
        ["FreedomCorp_City_01_03"] = FreedomCorp,
        ["FreedomCorp_City_01_01c"] = FreedomCorp,
        ["FreedomCorp_City_01_01b"] = FreedomCorp,
        ["Henry_Peter_Wong"] = "Model_HenryWong",
        ["Linda_Summers"] = "Model_LindaSummers",
        ["Vic_Johansson"] = "Model_VicJohansson",
        ["Security_Chief_03"] = SecurityChiefs,
        ["Genevieve_Sanders"] = "Model_GenevieveSanders",
        ["Juan_Jimenez"] = "Model_JuanJimenez",
        ["Ron_Hughes"] = "Model_RonHughes",
        ["Samuel_Pierce"] = "Model_SamuelPierce",
        ["Paula_Dempsey"] = "Model_PaulaDempsey",
        ["Blue_Steel"] = "Model_Blue_Steel",
        ["Security_Chief_02"] = SecurityChiefs,
        ["Kip_Cantorum"] = "Model_KipCantorum",
        ["Charlie_Sparks"] = "Model_CharlieSparks",
        ["Maurice_Feldon"] = "Model_MauriceFeldon",
        ["Rachel_Torres"] = "Model_RachelTorres",
        ["Clarence_Jackson"] = "Model_ClarenceJackson",
        ["Paco_Sanchez"] = "Model_PacoSanchez",
        ["Back_Alley_Brawler"] = "Model_Back_Alley_Brawler",
        ["Derek_Amberson"] = "Model_DerekAmberson",
        ["Kiros_Nandelu"] = "Model_KirosNandelu",
        ["Caitlin_Murray"] = "Model_CaitlinMurray",
        ["Rebecca_Brinell"] = "Model_RebeccaBrinell",
        ["Gregor_Richardson"] = "Model_GregorRichardson",
        ["FreedomCorp_City_01_03b"] = FreedomCorp,
        ["FreedomCorp_City_01_03c"] = FreedomCorp,
        ["FreedomCorp_City_01_03"] = FreedomCorp,
        ["Virginia_Hoffman"] = "Model_VirginiaHoffman",
        ["Fareed_Abdullah"] = "Model_FareedAbdullah",
        ["Carlos_Herrera"] = "Model_CarlosHerrera",
        ["Colleen_Saramago"] = "Model_ColleenSaramago",
        ["Guy_Denson"] = "Model_GuyDenson",
        ["Positron"] = "Model_Positron",
        ["Wyatt_Anderson"] = "Model_WyattAnderson",
        ["Tom_Bowden"] = "Model_TomBowden",
        ["Shelly_Knowles"] = "Model_ShellyKnowles",
        ["Olivia_Chung"] = "Model_OliviaChung",
        ["Valkyrie"] = "Model_Valkyrie",
        ["Security_Chief_05"] = SecurityChiefs,
        ["Security_Chief_17"] = SecurityChiefs,
        ["Security_Chief_06"] = SecurityChiefs,
        ["Hugo_Redding"] = "Model_HugoRedding",
        ["Dr_Trevor_Seaborn"] = "Model_TrevorSeaborn",
        ["Alfonse_Rubel"] = "Model_AlfonseRubel",
        ["Wilson_Zucco"] = "Model_WilsonZucco",
        ["Willy_Starbuck"] = "Model_WillyStarbuck",
        ["Wes_Schnabel"] = "Model_WesSchnabel",
        ["Kyle_Peck"] = "Model_KylePeck",
        ["Athena_Currie"] = "Model_AthenaCurrie",
        ["IconEmployee_City_02_01a"] = "Model_IconEmployeeA",
        ["IconEmployee_City_02_01b"] = "Model_IconEmployeeB",
        ["IconEmployee_City_02_01c"] = "Model_IconEmployeeC",
        ["IconEmployee1"] = "Model_IconEmployeeD",
        ["Mark_Freeman"] = "Model_MarkFreeman",
        ["Juliana_Nehring"] = "Model_JulianaNehring",
        ["The_Can_Man"] = "Model_TheCanMan",
        ["Yolanda_Baker"] = "Model_YolandaBaker",
        ["Hiro_Takashi"] = "Model_HiroTakashi",
        ["Synapse"] = "Model_Synapse",
        ["Jerry_Kazatsky"] = "Model_JerryKazatsky",
        ["Thao_Ku"] = "Model_ThaoKu",
        ["Kong_Bao"] = "Model_KongBao",
        ["Kira_Lange"] = "Model_KiraLange",
        ["Ann-Marie_Engles"] = "Model_Ann-MarieEngles",
        ["Pavel_Garnier"] = "Model_PavelGarnier",
        ["Yancy_Rhymes"] = "Model_YancyRhymes",
        ["Maggie_Greene"] = "Model_MaggieGreene",
        ["Cho_Ge"] = "Model_ChoGe",
        ["Andre_Jimenez"] = "Model_AndreJimenez",
        ["Vitaly_Cherenko"] = "Model_VitalyCherenko",
        ["Jake_Montoya"] = "Model_JakeMontoya",
        ["Corey_McCann"] = "Model_CoreyMcCann",
        ["Sgt_Suzanne_Bernhard"] = "Model_SuzanneBernhard",
        ["Karen_Parker"] = "Model_KarenParker",
        ["Warren_Trudeau"] = "Model_WarrenTrudeau",
        ["Security_Chief_17"] = SecurityChiefs,
        ["Security_Chief_07"] = SecurityChiefs,
        ["Security_Chief_08"] = SecurityChiefs,
        ["Mynx"] = "Model_Minx",
        ["FreedomCorp_City_02_02"] = FreedomCorp,
        ["FreedomCorp_City_02_02b"] = FreedomCorp,
        ["FreedomCorp_City_02_02c"] = FreedomCorp,
        ["FreedomCorp_City_03_01"] = FreedomCorp,
        ["FreedomCorp_City_03_01b"] = FreedomCorp,
        ["FreedomCorp_City_03_01c"] = FreedomCorp,
        ["Haley_Philips"] = "Model_HaleyPhilips",
        ["Sanjay_Chandra"] = "Model_SanjayChandra",
        ["Lorenzo_DiCosta"] = "Model_LorenzoDicosta",
        ["Tristan_Caine"] = "Model_TristanCaine",
        ["Jill_Pastor"] = "Model_JillPastor",
        ["Everett_Daniels"] = "Model_EverettDaniels",
        ["Carla_Brunelli"] = "Model_CarlaBrunelli",
        ["Bastion"] = "Model_Bastion",
        ["Cain_Royce"] = "Model_CainRoyce",
        ["Manuel_ruiz"] = "Model_ManuelRuiz",
        ["Barry_Gosford"] = "Model_BarryGosford",
        ["Lt_Col_Hugh_McDougal"] = "Model_LtColHughMcDougal",
        ["Polly_Cooper"] = "Model_PollyCooper",
        ["Joesef_Keller"] = "Model_JosefKeller",
        ["Tyler_French"] = "Model_TylerFrench",
        ["Hinckley_Rasmussen"] = "Model_HinckleyRasmussen",
        ["Wendy_Klein"] = "Model_WendyKlein",
        ["Claire_Childress"] = "Model_ClaireChildress",
        ["Oliver_Haak"] = "Model_OliverHaak",
        ["Evan_DiTomasso"] = "Model_EvanDitomasso",
        ["Joshua_Stutz"] = "Model_JoshuaStutz",
        ["Andrea_Mitchell"] = "Model_AndreaMitchell",
        ["Andrew_Fiore"] = "Model_AndrewFiore",
        ["Piper_Irving"] = "Model_PiperIrving",
        ["Jim_Bell"] = "Model_JimBell",
        ["John_Strobel"] = "Model_JohnStrobel",
        ["Annie_Coults"] = "Model_AnnieCoults",
        ["Vic_Garland"] = "Model_VicGarland",
        ["Jesse_Hobart"] = "Model_JesseHobart",
        ["Robert_Koslowski"] = "Model_RobertKoslowski",
        ["Betty_Abbot"] = "Model_BettyAbbot",
        ["Janelle_Irving"] = "Model_JanelleIrving",
        ["Marvin_Weintraub"] = "Model_MarvinWeintraub",
        ["Eliza_Thorpe"] = "Model_ElizaThorpe",
        ["Miriam_Bloechl"] = "Model_MiriamBloechl",
        ["Security_Chief_09"] = SecurityChiefs,
        ["Security_Chief_10"] = SecurityChiefs,
        ["Alexander"] = "Thug_Warrior_Boss_01",
        ["Luminary"] = "Model_Luminary",
        ["Sister_Psyche"] = "Model_Sister_Psyche",
        ["Rondel_Jackson"] = "Model_RondelJackson",
        ["Melanie_Peebles"] = "Model_MelaniePeebles",
        ["Wilson_Eziquerra"] = "Model_WilsonEziquerra",
        ["Georgia_Fields"] = "Model_GeorgiaFields",
        ["Justine_Kelly"] = "Model_JustineKelly",
        ["Wilma_Peterson"] = "Model_WilmaPeterson",
        ["Karl_Bolger"] = "Model_KarlBolger",
        ["Kirsten_Woods"] = "Model_KirstenWoods",
        ["Dr_Cheng"] = "Model_DoctorCheng",
        ["Dennis_Ewell"] = "Model_DennisEwell",
        ["Jake_Kim"] = "Model_JakeKim",
        ["Amanda_Loomis"] = "Model_AmandaLoomis",
        ["Justin_Greene"] = "Model_JustinGreene",
        ["Kevin_Cordell"] = "Model_KevinCordell",
        ["Oswald_Cuthbert"] = "Model_OswaldCuthbert",
        ["Wanda_Travis"] = "Model_WandaTravis",
        ["Laura_Brunetti"] = "Model_LauraBrunetti",
        ["Lorenzo_Tate"] = "Model_LorenzoTate",
        ["Laurie_Pennington"] = "Model_LauriePennington",
        ["Collin_Larson"] = "Model_CollinLarson",
        ["Christine_Lansdale"] = "Model_ChristineLansdale",
        ["Ashwin_Lannister"] = "Model_AshwinLannister",
        ["Security_Chief_11"] = SecurityChiefs,
        ["Security_Chief_12"] = SecurityChiefs,
        ["Malaise"] = "Model_Malaise",
        ["IconEmployee2"] = "Model_IconEmployeeB",
        ["IconEmployee_City_03_02d"] = "Model_IconEmployeeI",
        ["IconEmployee_City_03_02e"] = "Model_IconEmployeeH",
        ["IconEmployee_City_03_02f"] = "Model_IconEmployeeG",
        ["Numina"] = "Model_Numina",
        ["Security_Chief_15"] = SecurityChiefs,
        ["Security_Chief_16"] = SecurityChiefs,
        ["Phillipa_Meraux"] = "Model_PhillipaMeraux",
        ["Peter_Stemitz"] = "Model_PeterStemitz",
        ["Tina_Chung"] = "Model_TinaChung",
        ["Jenny_Firkins"] = "Model_JennyFirkins",
        ["Jose_Escalante"] = "Model_JoseEscalante",
        ["Infernal"] = "Model_Infernal",
        ["Penny_Preston"] = "Model_PennyPreston",
        ["Mark_IV"] = "Model_MarkIV",
        ["Cadao_Kestrel"] = "Model_CadaoKestrel",
        ["Anton_Sampson"] = "Model_AntonSampson",
        ["Ginger_Yates"] = "Model_GingerYates",
        ["Agent_Six"] = "Eidola_Female",                        --incorrect placeholder model
        ["IconEmployee3"] = "Model_IconEmployeeD",
        ["IconEmployee_City_04_01g"] = "Model_IconEmployeeE",
        ["IconEmployee_City_04_01h"] = "Model_IconEmployeeF",
        ["IconEmployee_City_04_01i"] = "Model_IconEmployeeG",
        ["Angus_McQueen"] = "Model_AngusMcQueen",
        ["Indigo"] = "Model_Indigo",
        ["Janet_Kellum"] = "Model_JanetKellum",
        ["Maxwell_Christopher"] = "Model_MaxwellChristopher",
        ["Madeleine_Casey"] = "Model_MadeleineCasey",
        ["Maren_MacGregor"] = "Model_MarenMacGregor",
        ["Manticore"] = "Model_Manticore",
        ["Security_Chief_13"] = SecurityChiefs,
        ["Security_Chief_14"] = SecurityChiefs,
        ["Allison_King"] = "Model_AllisonKing",
        ["Neal_Kendrick"] = "Model_NealKendrick",
        ["Lou_Pasterelli"] = "Model_LouPasterelli",
        ["Merisel_Valenzuela"] = "Model_MeriselValenzuela",
        ["Swan"] = "Model_Swan",
        ["Holsten_Armitage"] = "Model_HolstenArmitage",
        ["Serafina"] = "Model_Serafina",
        ["Gordon_Stacy"] = "Model_GordonStacy",
        ["Colleen_Nelson"] = "Model_ColleenNelson",
        ["Steven_Sheridan"] = "Model_StevenSheridan",
        ["Tina_Macintyre"] = "Model_TinaMacintyre",
        ["Unai_Kemen"] = "Model_UnaiKemen",
        ["Maria_Jenkins"] = "Model_MariaJenkins",
        ["Harvey_Maylor"] = "Model_HarveyMaylor",
        ["Crimson"] = "Model_Crimson",
        ["Ghost_Falcon"] = "Model_GhostFalcon",
        ["Computer"] = "Sewer_Access_Computer",       --found in the abandoned sewers
        ["Magic_City_02_01"] = MagicStore,
        ["Magic_City_02_01b"] = MagicStore,
        ["Magic_City_02_01c"] = MagicStore,
        ["Magic_City_03_01"] = MagicStore,
        ["Magic_City_03_01b"] = MagicStore,
        ["Magic_City_03_01c"] = MagicStore,
        ["Magic_City_03_02"] = MagicStore,
        ["Magic_City_03_02b"] = MagicStore,
        ["Magic_City_03_02c"] = MagicStore,
        ["Mannequin_Mage_Male"] = "Mannequin_Mage_Male",        
        ["Mannequin_Mage_Female"] = "Mannequin_Mage_Female",
        ["Science_City_02_01"] = ScienceStore,
        ["Science_City_02_01b"] = ScienceStore,
        ["Science_City_02_01c"] = ScienceStore,
        ["Science_City_03_01"] = ScienceStore,
        ["Science_City_03_01b"] = ScienceStore,
        ["Science_City_03_01c"] = ScienceStore,
        ["Science_City_03_02"] = ScienceStore,
        ["Science_City_03_02b"] = ScienceStore,
        ["Science_City_03_02c"] = ScienceStore,                 
        ["Mannequin_Sci_Male"] = "Mannequin_Sci_Male",        
        ["Mannequin_Sci_Female"] = "Mannequin_Sci_Female",                
        ["Natural_City_02_01"] = NaturalStore,
        ["Natural_City_02_01b"] = NaturalStore,
        ["Natural_City_02_01c"] = NaturalStore,
        ["Natural_City_03_01"] = NaturalStore,
        ["Natural_City_03_01b"] = NaturalStore,
        ["Natural_City_03_01c"] = NaturalStore,
        ["Natural_City_03_02"] = NaturalStore,
        ["Natural_City_03_02b"] = NaturalStore,
        ["Natural_City_03_02c"] = NaturalStore,
        ["Mannequin_Nat_Male"] = "Mannequin_Nat_Male",        
        ["Mannequin_Nat_Female"] = "Mannequin_Nat_Female",
        ["Tech_City_02_01"] = TechStore,
        ["Tech_City_02_01b"] = TechStore,
        ["Tech_City_02_01c"] = TechStore,
        ["Tech_City_03_01"] = TechStore,
        ["Tech_City_03_01b"] = TechStore,
        ["Tech_City_03_01c"] = TechStore,
        ["Tech_City_03_02"] = TechStore,
        ["Tech_City_03_02b"] = TechStore,
        ["Tech_City_03_02c"] = TechStore,        
        ["Mannequin_Tech_Male"] = "Mannequin_Tech_Male",        
        ["Mannequin_Tech_Female"] = "Mannequin_Tech_Female",          
        ["Mutant_City_02_01"] = MutantStore,
        ["Mutant_City_02_01b"] = MutantStore,
        ["Mutant_City_02_01c"] = MutantStore,
        ["Mutant_City_03_01"] = MutantStore,
        ["Mutant_City_03_01b"] = MutantStore,
        ["Mutant_City_03_01c"] = MutantStore, 
        ["Mutant_City_03_02"] = MutantStore,
        ["Mutant_City_03_02b"] = MutantStore,
        ["Mutant_City_03_02c"] = MutantStore,                
        ["Mannequin_Mut_Male"] = "Mannequin_Mut_Male",        
        ["Mannequin_Mut_Female"] = "Mannequin_Mut_Female",                         
}

function GetPersistentModel(npc)
        local Model = All_Persistents[npc]

        --handle variable model instances
        if type(Model) == "table" then
                Model = Model[math.random(1, #Model)]
        end

        --setup a default return in the case of a bad value
        if Model == nil or Model == "" then
                return "ChessPawn"
        end

        return Model
end
