public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } if (Variations == null) { Variations = new HeadVariation[VariationCount]; for (int xb = 0; xb < VariationCount; xb++) { Variations[xb] = new HeadVariation(); } } io.WriteBits(Variations.Length, 0x10); for (int i = 0; i < VariationCount; i++) { Variations[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteInt16(SpawnerCreateCount); if (SpawnerCreates == null) { SpawnerCreates = new SpawnerCreate[SpawnerCreateCount]; for (int xb = 0; xb < SpawnerCreateCount; xb++) { SpawnerCreates[xb] = new SpawnerCreate(); } } for (int i = 0; i < SpawnerCreateCount; i++) { SpawnerCreates[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } BluePrint.Write(io); io.WriteInt32(IndexUsedByUniqueId); if (TransForm == null) { TransForm = new byte[4][]; } for (int i = 0; i < 4; i++) { if (TransForm[i] == null) { TransForm[i] = new byte[0xc]; } for (int j = 0; j < 0xc; j++) { io.WriteBits(TransForm[i][j], 0x8); } } return(true); } catch (Exception) { return(false); } }
public JournalManager Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Version = io.ReadInt16(); if (Version > 0) { ActiveJournalCount = io.ReadInt16(); ActiveJournals = new int[ActiveJournalCount]; for (int i = 0; i < ActiveJournalCount; i++) { ActiveJournals[i] = io.ReadInt32(); } ReadJournalCount = io.ReadInt16(); ReadJournals = new int[ReadJournalCount]; for (int i = 0; i < ReadJournalCount; i++) { ReadJournals[i] = io.ReadInt32(); } } if (Version > 1) { RewardedJournalCount = io.ReadInt16(); RewardedJournals = new int[RewardedJournalCount]; for (int i = 0; i < RewardedJournalCount; i++) { RewardedJournals[i] = io.ReadInt32(); } } return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } if (Handles == null) { Handles = new int[HandleCount]; } io.WriteBits(Handles.Length, 0x10); foreach (int t in Handles) { io.WriteBits(t, 0x20); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteInt32(storeEntitySaveUid); if (Items == null) { Items = new StoreItemEntry[ItemCount]; for (int xb = 0; xb < ItemCount; xb++) { Items[xb] = new StoreItemEntry(); } } io.WriteInt16((short)Items.Length); foreach (StoreItemEntry t in Items) { t.Write(io); } return(true); } catch (Exception) { return(false); } }
public CharacterCustomizationManager Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Version = io.ReadInt32(); ClassId = io.ReadInt32(); BackgroundId = io.ReadInt32(); GenderId = io.ReadInt32(); RaceId = io.ReadInt32(); var x = io.ReadInt16(); CharacterName = io.ReadString(x); VoiceVariationID = io.ReadInt32(); DifficultyModeID = io.ReadInt32(); if (Version > 9) { LowestDifficultyModeID = io.ReadInt32(); } CharacterSubclassID = io.ReadInt32(); if (Version >= 8) { CharacterID = new byte[0x10]; io.Read(CharacterID, 0, 0x10); } if (Version >= 0xD) { AgeInRealTimeSeconds = io.ReadSingle(); } return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteBits(BoneNameHash, 0x20); if (Value == null) { Value = new byte[0xC]; } for (int j = 0; j < 0xC; j++) { io.WriteBits(Value[j], 0x8); } return(true); } catch (Exception) { return(false); } }
public StoreItemEntry Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); NameHash = io.ReadInt32(); Quantity = io.ReadInt32(); return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } //if(6 (<-????) > 5) //{ io.WriteInt32(UserWaypoint_MapId); if (UserWaypoint_WorldPos == null) { UserWaypoint_WorldPos = new byte[8]; } for (int i = 0; i < 8; i++) { io.WriteBits(UserWaypoint_WorldPos[i], 0x8); } FogArchive.Write(io); DynamicPinsMaps.Write(io); DiscoveredPins.Write(io); ExploredPins.Write(io); //} return(true); } catch (Exception) { return(false); } }
public TextureShaderParam Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); TSParameterHandle = io.ReadBit2(0x20); TextureHandle = io.ReadBit2(0x20); return(this); }
public bool Write(DAIIO io, bool skiplength = false) { if (!skiplength) { io.WriteBits(Length, LengthBits); } if (LookupTables == null) { LookupTables = new LookupTable[LookupTableCount]; for (int xb = 0; xb < LookupTableCount; xb++) { LookupTables[xb] = new LookupTable(); } } LookupTableCount = (short)LookupTables.Length; io.WriteBits(LookupTableCount, 0x10); for (int i = 0; i < LookupTableCount; i++) { LookupTables[i].Write(io); } if (InternalReferences == null) { InternalReferences = new int[InternalReferenceCount]; } InternalReferenceCount = (short)InternalReferences.Length; io.WriteBits(InternalReferenceCount, 0x10); for (int i = 0; i < InternalReferenceCount; i++) { io.WriteBits(InternalReferences[i], 0x20); } if (ExternalReferences == null) { ExternalReferences = new ExternalReference[ExternalReferenceCount]; for (int xb = 0; xb < ExternalReferenceCount; xb++) { ExternalReferences[xb] = new ExternalReference(); } } ExternalReferenceCount = (short)ExternalReferences.Length; io.WriteBits(ExternalReferenceCount, 0x10); for (int i = 0; i < ExternalReferenceCount; i++) { ExternalReferences[i].Write(io); } if (DeletedEntities == null) { DeletedEntities = new int[DeletedEntityCount]; } DeletedEntityCount = (short)DeletedEntities.Length; io.WriteBits(DeletedEntityCount, 0x10); for (int i = 0; i < DeletedEntityCount; i++) { io.WriteBits(DeletedEntities[i], 0x20); } return(true); }
public EntityMeta Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); LookupTableCount = (short)io.ReadBit2(0x10); LookupTables = new LookupTable[LookupTableCount]; for (int i = 0; i < LookupTableCount; i++) { LookupTables[i] = new LookupTable().Read(io); } InternalReferenceCount = (short)io.ReadBit2(0x10); InternalReferences = new int[InternalReferenceCount]; for (int i = 0; i < InternalReferenceCount; i++) { InternalReferences[i] = io.ReadBit2(0x20); } ExternalReferenceCount = (short)io.ReadBit2(0x10); ExternalReferences = new ExternalReference[ExternalReferenceCount]; for (int i = 0; i < ExternalReferenceCount; i++) { ExternalReferences[i] = new ExternalReference().Read(io); } DeletedEntityCount = (short)io.ReadBit2(0x10); DeletedEntities = new int[DeletedEntityCount]; for (int i = 0; i < DeletedEntityCount; i++) { DeletedEntities[i] = io.ReadBit2(0x20); } return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteInt32(Id); io.WriteInt16(CallbackCount); if (Callbacks == null) { Callbacks = new CallBackData[CallbackCount]; for (int xb = 0; xb < CallbackCount; xb++) { Callbacks[xb] = new CallBackData(); } } for (int i = 0; i < CallbackCount; i++) { Callbacks[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (Stats == null) { Stats = new CraftedStatInstance[StatsCount]; for (int xb = 0; xb < StatsCount; xb++) { Stats[xb] = new CraftedStatInstance(); } } io.WriteInt16((short)Stats.Length); foreach (CraftedStatInstance t in Stats) { t.Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteInt32(MapID); io.WriteBoolean(IsPersistent); io.WriteInt32(UncompressedSize); io.WriteBoolean(IsCompressed); if (Blob == null) { Blob = new byte[Size]; } io.WriteInt32(Blob.Length); foreach (byte t in Blob) { io.WriteBits(t, 0x8); } return(true); } catch (Exception) { return(false); } }
public ItemStatsData Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); StatsData = new ItemAsset().Read(io); Value = io.ReadSingle(); return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteBits(ParamCount, 0x10); if (TextureShaderParams == null) { TextureShaderParams = new TextureShaderParam[ParamCount]; for (int xb = 0; xb < ParamCount; xb++) { TextureShaderParams[xb] = new TextureShaderParam(); } } for (int i = 0; i < ParamCount; i++) { TextureShaderParams[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public PlotFlagValueMap Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Version = io.ReadInt16(); if ((Version & 0xFFFF) >= 2) { MarkerDataLength = io.ReadInt16(); MarkerData = io.ReadString(MarkerDataLength); } if ((Version & 0xFFFF) >= 1) { BooleanFlagsThatAreTrue = new BooleanFlags(); BooleanFlagsThatAreTrue.Read(io); BooleanFlagsThatAreFalse = new BooleanFlags(); BooleanFlagsThatAreFalse.Read(io); IntegerFlagsCount = io.ReadInt16(); IntegerFlags = new ValueFlag[IntegerFlagsCount]; for (int i = 0; i < IntegerFlagsCount; i++) { IntegerFlags[i] = new ValueFlag(); IntegerFlags[i].Read(io); } FloatFlagsCount = io.ReadInt16(); FloatFlags = new ValueFlag[FloatFlagsCount]; for (int i = 0; i < FloatFlagsCount; i++) { FloatFlags[i] = new ValueFlag(); FloatFlags[i].Read(io); } } return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (Guids == null) { Guids = new byte[Count][]; } Count = (short)Guids.Length; io.WriteInt16(Count); for (int i = 0; i < Count; i++) { if (Guids[i] == null) { Guids[i] = new byte[0x10]; } for (int j = 0; j < 0x10; j++) { io.WriteBits(Guids[i][j], 0x8); } } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteBits(WorldStateManager.Length + 0x18, 0x18); WorldStateManager.Write(io); io.WriteBits(PartyManager.Length + 0x18, 0x18); PartyManager.Write(io); io.WriteBits(PlotSaveGameAgent.Length + 0x18, 0x18); PlotSaveGameAgent.Write(io); LootManager.Write(io); SpawnerCreateManager.Write(io); io.WriteBits(MapManager.Length + 0x18, 0x18); MapManager.Write(io); io.WriteBits(MissionManager.Length + 0x18, 0x18); MissionManager.Write(io); SpawnerInits.Write(io); Terrain.Write(io); StoreInventoryManager.Write(io); io.WriteBits(PartyInventory.Length + 0x18, 0x18); PartyInventory.Write(io); JournalManager.Write(io); return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteInt32(Id); io.WriteInt32(DestroyedPartsCount); io.WriteBoolean(KeepInfoOnUnregister); if (PartIds == null) { PartIds = new int[PartIdsCount]; } io.WriteInt16((short)PartIds.Length); foreach (int t in PartIds) { io.WriteInt32(t); } io.WriteInt32(BitCount); if (BitArray == null) { BitArray = new byte[BitCount.NumberOfSetBits() << 2]; } io.Write(BitArray, 0, BitArray.Length); return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } if (Maps == null) { Maps = new Map[MapCount]; for (int xb = 0; xb < MapCount; xb++) { Maps[xb] = new Map(); } } io.WriteInt16((short)Maps.Length); for (int i = 0; i < MapCount; i++) { Maps[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (Pins == null) { Pins = new DynamicPinsMap[Count]; for (int xb = 0; xb < Count; xb++) { Pins[xb] = new DynamicPinsMap(); } } io.WriteInt16((short)Pins.Length); foreach (DynamicPinsMap t in Pins) { t.Write(io); } return(true); } catch (Exception) { return(false); } }
public AgentEntry Read(DAIIO io) { NameHash = io.ReadInt32(); Index = (short)io.ReadBit2(0x8); Entry = (short)io.ReadBit2(0x10); return(this); }
public bool Write(DAIIO io, bool skiplength = false) { try { if (Materials == null) { Materials = new ItemMaterial[Count]; for (int xb = 0; xb < Count; xb++) { Materials[xb] = new ItemMaterial(); } } io.WriteInt16((short)Materials.Length); foreach (ItemMaterial t in Materials) { t.Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { io.WriteBoolean(IsNull); if (!IsNull) { io.WriteInt32(Value1); io.WriteInt32(Value2); io.WriteBoolean(DataIsNull); if (!DataIsNull) { if (DataBytes == null) { DataBytes = new byte[0x10]; } for (int i = 0; i < 0x10; i++) { io.WriteBits(DataBytes[i], 0x8); } } } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } StatData.Write(io); Script.Write(io); if (DelArgs == null) { DelArgs = new ItemAsset[ArgsCount]; for (int xb = 0; xb < ArgsCount; xb++) { DelArgs[xb] = new ItemAsset(); } } io.WriteInt16((short)DelArgs.Length); foreach (ItemAsset t in DelArgs) { t.Write(io); } io.WriteSingle(DefaultValue); return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } io.WriteInt16(OwnerInfoCount); if (OwnerInfos == null) { OwnerInfos = new OwnerInfo[OwnerInfoCount]; for (int xb = 0; xb < OwnerInfoCount; xb++) { OwnerInfos[xb] = new OwnerInfo(SStructure); } } for (int i = 0; i < OwnerInfoCount; i++) { OwnerInfos[i].Write(io); } return(true); } catch (Exception) { return(false); } }
public bool Write(DAIIO io, bool skiplength = false) { try { if (!skiplength) { io.WriteBits(Length, LengthBits); } if (BoneOffsetEntries == null) { BoneOffsetEntries = new BoneOffsetEntryV1[BoneOffsetsCount]; for (int xb = 0; xb < BoneOffsetsCount; xb++) { BoneOffsetEntries[xb] = new BoneOffsetEntryV1(); } } io.WriteBits(BoneOffsetEntries.Length, 0x10); foreach (BoneOffsetEntryV1 t in BoneOffsetEntries) { t.Write(io); } return(true); } catch (Exception) { return(false); } }