public Character()
        {
            _EXP    = new SharableInt32();
            _Level  = new SharableInt32();
            BaseMEL = new SharableInt32();
            BaseRNG = new SharableInt32();
            BaseDEF = new SharableInt32();
            BaseSKL = new SharableInt32();
            BaseEVA = new SharableInt32();
            BaseHIT = new SharableInt32();

            _EXP.Value    = 0;
            _Level.Value  = 0;
            BaseMEL.Value = 0;
            BaseRNG.Value = 0;
            BaseDEF.Value = 0;
            BaseSKL.Value = 0;
            BaseEVA.Value = 0;
            BaseHIT.Value = 0;

            ArrayPilotSkill        = new BaseAutomaticSkill[0];
            ArrayRelationshipBonus = new BaseAutomaticSkill[0];
            ArrayPilotSpirit       = new ManualSkill[0];

            TerrainGrade = new TerrainGrades(0, 0, 0, 0);

            MaxWill                = 150;
            Will                   = 100;
            TeamTags               = new TagSystem();
            Effects                = new EffectHolder();
            DicCharacterLink       = new Dictionary <string, CharacterLinkTypes>();
            ListQuoteSetVersusName = new List <string>();
            DicAttackQuoteSet      = new Dictionary <string, QuoteSet>();
        }
        public Character(string CharacterPath, ContentManager Content, Dictionary <string, BaseSkillRequirement> DicRequirement, Dictionary <string, BaseEffect> DicEffect,
                         Dictionary <string, AutomaticSkillTargetType> DicAutomaticSkillTarget, Dictionary <string, ManualSkillTarget> DicManualSkillTarget)
            : this()
        {
            FileStream   FS = new FileStream("Content/Characters/" + CharacterPath + ".pec", FileMode.Open, FileAccess.Read);
            BinaryReader BR = new BinaryReader(FS, Encoding.UTF8);

            BR.BaseStream.Seek(0, SeekOrigin.Begin);

            //Init variables.
            Name         = BR.ReadString();
            PortraitPath = BR.ReadString();

            ArrayPortraitBustPath = new string[BR.ReadInt32()];
            for (int B = 0; B < ArrayPortraitBustPath.Length; ++B)
            {
                ArrayPortraitBustPath[B] = BR.ReadString();
            }

            ArrayPortraitBoxPath = new string[BR.ReadInt32()];
            for (int B = 0; B < ArrayPortraitBoxPath.Length; ++B)
            {
                ArrayPortraitBoxPath[B] = BR.ReadString();
            }

            Tags            = BR.ReadString();
            FullName        = CharacterPath;
            EXPValue        = BR.ReadInt32();
            CanPilot        = BR.ReadBoolean();
            BattleThemeName = BR.ReadString();
            string AceBonus        = BR.ReadString();
            string PersonalityName = BR.ReadString();
            string SlaveName       = BR.ReadString();

            Personality = new CharacterPersonality(PersonalityName);

            if (!string.IsNullOrWhiteSpace(SlaveName) && SlaveName != "None")
            {
                Slave = new Character(SlaveName, Content, DicRequirement, DicEffect, DicAutomaticSkillTarget, DicManualSkillTarget);
            }

            Int32 SpiritListCount = BR.ReadInt32();

            ArrayPilotSpirit = new ManualSkill[SpiritListCount];

            for (int S = 0; S < SpiritListCount; ++S)
            {
                ArrayPilotSpirit[S]                  = new ManualSkill("Content/Characters/Spirits/" + BR.ReadString() + ".pecs", DicRequirement, DicEffect, DicAutomaticSkillTarget, DicManualSkillTarget);
                ArrayPilotSpirit[S].SPCost           = BR.ReadInt32();
                ArrayPilotSpirit[S].LevelRequirement = BR.ReadInt32();
            }

            Int32 SkillListCount = BR.ReadInt32();

            ArrayPilotSkill       = new BaseAutomaticSkill[SkillListCount];
            ArrayPilotSkillLocked = new bool[SkillListCount];
            ArrayPilotSkillLevels = new SkillLevels[SkillListCount];

            for (int S = 0; S < SkillListCount; ++S)
            {
                string RelativePath = BR.ReadString();
                ArrayPilotSkill[S]       = new BaseAutomaticSkill("Content/Characters/Skills/" + RelativePath + ".pecs", RelativePath, DicRequirement, DicEffect, DicAutomaticSkillTarget);
                ArrayPilotSkillLocked[S] = BR.ReadBoolean();
                Int32 SkillLevelsCount = BR.ReadInt32();
                ArrayPilotSkillLevels[S] = new SkillLevels(BR, SkillLevelsCount);
            }

            Int32 RelationshipBonusCount = BR.ReadInt32();

            ArrayRelationshipBonus = new BaseAutomaticSkill[RelationshipBonusCount];

            for (int S = 0; S < RelationshipBonusCount; ++S)
            {
                string RelationshipBonusName = BR.ReadString();
                int    RelationshipLevel     = BR.ReadInt32();
                ArrayRelationshipBonus[S] = new BaseAutomaticSkill("Content/Characters/Relationships/" + RelationshipBonusName + ".pecr", RelationshipBonusName, DicRequirement, DicEffect, DicAutomaticSkillTarget);

                ArrayRelationshipBonus[S].CurrentLevel = RelationshipLevel;

                for (int L = 0; L < ArrayRelationshipBonus[S].ListSkillLevel.Count; ++L)
                {
                    BaseSkillRequirement NewSkillRequirement = BaseSkillRequirement.LoadCopy(BR, DicRequirement);
                    ArrayRelationshipBonus[S].ListSkillLevel[L].ListActivation[0].ListRequirement.Add(NewSkillRequirement);
                }
            }

            //If it's a pilot, read its stats.
            if (CanPilot)
            {
                MaxLevel        = BR.ReadInt32();
                ArrayLevelMEL   = new int[MaxLevel];
                ArrayLevelRNG   = new int[MaxLevel];
                ArrayLevelDEF   = new int[MaxLevel];
                ArrayLevelSKL   = new int[MaxLevel];
                ArrayLevelEVA   = new int[MaxLevel];
                ArrayLevelHIT   = new int[MaxLevel];
                ArrayLevelMaxSP = new int[MaxLevel];

                for (int L = 0; L < MaxLevel; ++L)
                {
                    ArrayLevelMEL[L]   = BR.ReadInt32();
                    ArrayLevelRNG[L]   = BR.ReadInt32();
                    ArrayLevelDEF[L]   = BR.ReadInt32();
                    ArrayLevelSKL[L]   = BR.ReadInt32();
                    ArrayLevelEVA[L]   = BR.ReadInt32();
                    ArrayLevelHIT[L]   = BR.ReadInt32();
                    ArrayLevelMaxSP[L] = BR.ReadInt32();
                }

                int TerrainGradeAir   = BR.ReadInt32();
                int TerrainGradeLand  = BR.ReadInt32();
                int TerrainGradeSea   = BR.ReadInt32();
                int TerrainGradeSpace = BR.ReadInt32();

                TerrainGrade = new TerrainGrades(TerrainGradeAir, TerrainGradeLand, TerrainGradeSea, TerrainGradeSpace);
            }

            int ListQuoteSetVersusNameCount = BR.ReadInt32();

            for (int Q = 0; Q < ListQuoteSetVersusNameCount; Q++)
            {
                ListQuoteSetVersusName.Add(BR.ReadString());
            }

            //Base quotes
            for (int I = 0; I < 6; I++)
            {
                ArrayBaseQuoteSet[I] = new QuoteSet();

                int ListQuoteCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteCount; Q++)
                {
                    ArrayBaseQuoteSet[I].ListQuote.Add(BR.ReadString());
                }

                //Versus quotes.
                int ListQuoteVersusCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteVersusCount; Q++)
                {
                    ArrayBaseQuoteSet[I].ListQuoteVersus.Add(BR.ReadString());
                }

                ArrayBaseQuoteSet[I].PortraitPath = BR.ReadString();
            }

            int DicAttackQuoteSetCount = BR.ReadInt32();

            for (int i = 0; i < DicAttackQuoteSetCount; i++)
            {
                QuoteSet NewQuoteSet = new QuoteSet();

                string QuoteSetName = BR.ReadString();

                int ListQuoteCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteCount; Q++)
                {
                    NewQuoteSet.ListQuote.Add(BR.ReadString());
                }

                int ListQuoteVersusCount = BR.ReadInt32();
                for (int Q = 0; Q < ListQuoteVersusCount; Q++)
                {
                    NewQuoteSet.ListQuoteVersus.Add(BR.ReadString());
                }

                NewQuoteSet.PortraitPath = BR.ReadString();

                DicAttackQuoteSet.Add(QuoteSetName, NewQuoteSet);
            }

            FS.Close();
            BR.Close();

            if (Content != null)
            {
                string SpritePath = Path.GetFileNameWithoutExtension(CharacterPath);
                if (!string.IsNullOrEmpty(PortraitPath))
                {
                    SpritePath = PortraitPath;
                }

                if (File.Exists("Content\\Visual Novels\\Portraits\\" + SpritePath + ".xnb"))
                {
                    this.sprPortrait = Content.Load <Texture2D>("Visual Novels\\Portraits\\" + SpritePath);
                }
                else
                {
                    this.sprPortrait = Content.Load <Texture2D>("Characters\\Portraits\\Default");
                }
            }
        }