public void LoadVanilla(int endDate) { var files = ModManager.instance.GetFileKeys("history\\characters"); foreach (var file in files) { Script s = ScriptLoader.instance.LoadKey(file); foreach (var rootChild in s.Root.Children) { var scope = rootChild as ScriptScope; CharacterParser chr = new CharacterParser(scope); chr.ID = Convert.ToInt32(scope.Name); chr.ChrName = scope.GetString("name"); if (chr.ID == 144999) { } if (chr.CalculateAgeFromScope(endDate)) { if (chr.YearOfDeath >= SimulationManager.instance.Year) { AliveCharacters.Add(chr); } Characters.Add(chr); CharacterMap[chr.ID] = chr; } } } foreach (var characterParser in Characters) { characterParser.FixupFromScope(endDate); } }