public void Serialize(SaveStream output) { output.WriteStaticString("PLYR"); output.WriteValueU32(this.Version); output.WriteString(this.Character); output.WriteValueU32(this.Level); output.WriteValueU32(this.Experience); output.WriteValueU32(this.SkillPoints); output.WriteValueU32(this.Unknown03); output.WriteValueU32(this.Money); output.WriteValueU32(this.MaybePlaythroughUnlocked); // Skills { output.WriteValueS32(this.Skills.Count); foreach (Skill skill in this.Skills) { skill.Serialize(output); } } output.WriteValueU32(this.Unknown07); output.WriteValueU32(this.Unknown08); output.WriteValueU32(this.Unknown09); output.WriteValueU32(this.Unknown10); // Ammo Pools { output.WriteValueS32(this.AmmoPools.Count); foreach (AmmoPool pool in this.AmmoPools) { pool.Serialize(output); } } // Items { output.WriteValueS32(this.Items.Count); foreach (Item item in this.Items) { item.Serialize(output); } } output.WriteValueU32(this.BackpackSlots); output.WriteValueU32(this.WeaponSlots); // Weapons { output.WriteValueS32(this.Weapons.Count); foreach (Weapon weapon in this.Weapons) { weapon.Serialize(output); } } // Unknown16 { output.WriteBuffer(this.Stats); } // Visited Zones { output.WriteValueS32(this.VisitedStations.Count); foreach (string visitedZone in this.VisitedStations) { output.WriteString(visitedZone); } } output.WriteString(this.CurrentStation); // Unknown19 { // FIXME output.WriteValueS32(0); } // Unknown20 { // FIXME output.WriteValueS32(0); } output.WriteString(this.Unknown21); output.WriteValueU32(this.Unknown22); output.WriteValueU32(this.Unknown23); output.WriteValueU32(this.SaveSlot); output.WriteValueU32(this.ExtraDataVersion); if (this.ExtraDataVersion >= 27) { output.WriteValueU32(this.Unknown26); } if (this.ExtraDataVersion >= 28 && this.ExtraDataVersion <= 31) { // junk output.WriteString(""); output.WriteValueU32(0); } if (this.ExtraDataVersion >= 29) { // Mission Zones { output.WriteValueS32(this.MissionPlaythroughs.Count); foreach (MissionPlaythrough missionZone in this.MissionPlaythroughs) { missionZone.Serialize(output); } } } if (this.ExtraDataVersion >= 30) { output.WriteValueU32(this.PlayTime); output.WriteString(this.SaveTime); } if (this.ExtraDataVersion >= 31) { output.WriteString(this.Name); output.WriteValueU32(this.Color1); output.WriteValueU32(this.Color2); output.WriteValueU32(this.Color3); } if (this.ExtraDataVersion >= 32) { output.WriteValueU32(this.Unknown34); // Unknown35 { output.WriteValueS32(this.Unknown35.Count); foreach (UInt32 value in this.Unknown35) { output.WriteValueU32(value); } } } if (this.ExtraDataVersion >= 33) { // Unknown36 { output.WriteValueS32(this.Unknown36.Count); foreach (UInt32 value in this.Unknown36) { output.WriteValueU32(value); } } } if (this.ExtraDataVersion >= 34) { // Echo Zones { output.WriteValueS32(this.EchoPlaythroughs.Count); foreach (EchoPlaythrough echoZone in this.EchoPlaythroughs) { echoZone.Serialize(output); } } } if (this.ExtraDataVersion >= 35) { output.WriteBuffer(this.Unknown38); } }