protected void SetCharacterInfo() { // Warning: DatabaseAPI.GetArchetypeByName looks up archetype info by display name, not by internal name. // Meaning underscores have to be replaced with spaces for VEATs... MidsContext.Character.Archetype = DatabaseAPI.GetArchetypeByName(CharacterInfo.Archetype.Replace("_", " ")); MidsContext.Character.Origin = DatabaseAPI.GetOriginByName(MidsContext.Character.Archetype, CharacterInfo.Origin); MidsContext.Character.Reset(MidsContext.Character.Archetype, MidsContext.Character.Origin); MidsContext.Character.Name = CharacterInfo.Name; MidsContext.Character.Alignment = CharacterInfo.Alignment switch { "Hero" => Enums.Alignment.Hero, "Vigilante" => Enums.Alignment.Vigilante, "Rogue" => Enums.Alignment.Rogue, "Villain" => Enums.Alignment.Villain, "Loyalist" => Enums.Alignment.Loyalist, "Resistance" => Enums.Alignment.Resistance, _ => MidsContext.Character.IsHero() ? Enums.Alignment.Hero : Enums.Alignment.Villain }; MidsContext.Character.SetLevelTo(CharacterInfo.Level - 1); }