From f5a637588f486d43e24477688151afd35cb84149 Mon Sep 17 00:00:00 2001 From: dexy Date: Wed, 17 Jul 2024 18:00:55 +1000 Subject: [PATCH] PR #230 and #248 with extra audio editing improvements --- .../GameFiles/FileTypes/RelFile.cs | 17377 ++++++++-------- CodeWalker.Core/World/AudioZones.cs | 140 +- ... => EditAudioAmbientRulePanel.Designer.cs} | 295 +- ...rPanel.cs => EditAudioAmbientRulePanel.cs} | 279 +- ...el.resx => EditAudioAmbientRulePanel.resx} | 0 ...EditAudioAmbientZoneListPanel.Designer.cs} | 34 +- ...el.cs => EditAudioAmbientZoneListPanel.cs} | 6 +- ...esx => EditAudioAmbientZoneListPanel.resx} | 0 .../EditAudioAmbientZonePanel.Designer.cs | 768 + .../Panels/EditAudioAmbientZonePanel.cs | 675 + ...el.resx => EditAudioAmbientZonePanel.resx} | 6 + .../Project/Panels/EditAudioInteriorPanel.cs | 16 +- .../Panels/EditAudioInteriorRoomPanel.cs | 96 +- ...itAudioStaticEmitterListPanel.Designer.cs} | 36 +- ....cs => EditAudioStaticEmitterListPanel.cs} | 6 +- ...x => EditAudioStaticEmitterListPanel.resx} | 0 .../EditAudioStaticEmitterPanel.Designer.cs | 883 + .../Panels/EditAudioStaticEmitterPanel.cs | 613 + .../Panels/EditAudioStaticEmitterPanel.resx | 409 + .../Panels/EditAudioZonePanel.Designer.cs | 757 - .../Project/Panels/EditAudioZonePanel.cs | 624 - .../Project/Panels/ProjectExplorerPanel.cs | 244 +- CodeWalker/Project/ProjectForm.Designer.cs | 47 +- CodeWalker/Project/ProjectForm.cs | 582 +- CodeWalker/World/MapSelection.cs | 10 +- CodeWalker/WorldForm.cs | 36 +- 26 files changed, 12667 insertions(+), 11272 deletions(-) rename CodeWalker/Project/Panels/{EditAudioEmitterPanel.Designer.cs => EditAudioAmbientRulePanel.Designer.cs} (82%) rename CodeWalker/Project/Panels/{EditAudioEmitterPanel.cs => EditAudioAmbientRulePanel.cs} (56%) rename CodeWalker/Project/Panels/{EditAudioEmitterListPanel.resx => EditAudioAmbientRulePanel.resx} (100%) rename CodeWalker/Project/Panels/{EditAudioZoneListPanel.Designer.cs => EditAudioAmbientZoneListPanel.Designer.cs} (96%) rename CodeWalker/Project/Panels/{EditAudioZoneListPanel.cs => EditAudioAmbientZoneListPanel.cs} (95%) rename CodeWalker/Project/Panels/{EditAudioEmitterPanel.resx => EditAudioAmbientZoneListPanel.resx} (100%) create mode 100644 CodeWalker/Project/Panels/EditAudioAmbientZonePanel.Designer.cs create mode 100644 CodeWalker/Project/Panels/EditAudioAmbientZonePanel.cs rename CodeWalker/Project/Panels/{EditAudioZonePanel.resx => EditAudioAmbientZonePanel.resx} (98%) rename CodeWalker/Project/Panels/{EditAudioEmitterListPanel.Designer.cs => EditAudioStaticEmitterListPanel.Designer.cs} (95%) rename CodeWalker/Project/Panels/{EditAudioEmitterListPanel.cs => EditAudioStaticEmitterListPanel.cs} (95%) rename CodeWalker/Project/Panels/{EditAudioZoneListPanel.resx => EditAudioStaticEmitterListPanel.resx} (100%) create mode 100644 CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.Designer.cs create mode 100644 CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.cs create mode 100644 CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.resx delete mode 100644 CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs delete mode 100644 CodeWalker/Project/Panels/EditAudioZonePanel.cs diff --git a/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs b/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs index 54c3823..3950d4d 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs @@ -1,15 +1,12 @@ -using System; +using SharpDX; +using System; using System.Collections.Generic; -using System.ComponentModel; using System.IO; using System.Linq; using System.Text; -using System.Threading.Tasks; -using TC = System.ComponentModel.TypeConverterAttribute; -using EXP = System.ComponentModel.ExpandableObjectConverter; -using SharpDX; using System.Xml; -using System.Text.RegularExpressions; +using EXP = System.ComponentModel.ExpandableObjectConverter; +using TC = System.ComponentModel.TypeConverterAttribute; @@ -63,7 +60,8 @@ namespace CodeWalker.GameFiles Dat151 = 151 } - [TC(typeof(EXP))] public class RelFile : GameFile, PackedFile + [TC(typeof(EXP))] + public class RelFile : GameFile, PackedFile { public byte[] RawFileData { get; set; } public RelDatFileType RelType { get; set; } @@ -123,16 +121,19 @@ namespace CodeWalker.GameFiles DataLength = br.ReadUInt32(); //length of data block DataBlock = br.ReadBytes((int)DataLength); //main data block... - NameTableLength = br.ReadUInt32(); //length of this nametable block + + NameTableLength = br.ReadUInt32(); NameTableCount = br.ReadUInt32(); if (NameTableCount > 0) { - uint[] ntoffsets = new uint[NameTableCount]; //string offsets + uint[] ntoffsets = new uint[NameTableCount]; for (uint i = 0; i < NameTableCount; i++) { ntoffsets[i] = br.ReadUInt32(); } NameTableOffsets = ntoffsets; + + string[] names = new string[NameTableCount]; for (uint i = 0; i < NameTableCount; i++) { @@ -145,7 +146,6 @@ namespace CodeWalker.GameFiles } names[i] = sb.ToString(); - //JenkIndex.Ensure(names[i]); //really need both here..? JenkIndex.Ensure(names[i].ToLowerInvariant()); } NameTable = names; @@ -638,113 +638,113 @@ namespace CodeWalker.GameFiles case Dat151RelType.AmbientZone: return new Dat151AmbientZone(d, br); case Dat151RelType.AmbientRule: return new Dat151AmbientRule(d, br); case Dat151RelType.AmbientZoneList: return new Dat151AmbientZoneList(d, br); - case Dat151RelType.VehicleCollision: return new Dat151VehicleCollision(d, br); - case Dat151RelType.WeaponAudioItem: return new Dat151WeaponAudioItem(d, br); + case Dat151RelType.VehicleCollisionSettings: return new Dat151VehicleCollisionSettings(d, br); + case Dat151RelType.ItemAudioSettings: return new Dat151ItemAudioSettings(d, br); case Dat151RelType.StartTrackAction: return new Dat151StartTrackAction(d, br); case Dat151RelType.StopTrackAction: return new Dat151StopTrackAction(d, br); - case Dat151RelType.Mood: return new Dat151Mood(d, br); + case Dat151RelType.InteractiveMusicMood: return new Dat151InteractiveMusicMood(d, br); case Dat151RelType.SetMoodAction: return new Dat151SetMoodAction(d, br); - case Dat151RelType.PlayerAction: return new Dat151PlayerAction(d, br); + case Dat151RelType.MusicEvent: return new Dat151MusicEvent(d, br); case Dat151RelType.StartOneShotAction: return new Dat151StartOneShotAction(d, br); case Dat151RelType.StopOneShotAction: return new Dat151StopOneShotAction(d, br); case Dat151RelType.FadeOutRadioAction: return new Dat151FadeOutRadioAction(d, br); case Dat151RelType.FadeInRadioAction: return new Dat151FadeInRadioAction(d, br); - case Dat151RelType.ModelAudioCollisionSettings: return new Dat151ModelAudioCollisionSettings (d, br); - case Dat151RelType.Interior: return new Dat151Interior(d, br); + case Dat151RelType.ModelAudioCollisionSettings: return new Dat151ModelAudioCollisionSettings(d, br); + case Dat151RelType.InteriorSettings: return new Dat151InteriorSettings(d, br); case Dat151RelType.InteriorRoom: return new Dat151InteriorRoom(d, br); - case Dat151RelType.DoorModel: return new Dat151DoorModel(d, br); - case Dat151RelType.AudioMaterial: return new Dat151AudioMaterial(d, br); - case Dat151RelType.Door: return new Dat151Door(d, br); - case Dat151RelType.AnimalFootstepsList: return new Dat151AnimalFootstepsList(d, br); + case Dat151RelType.DoorAudioSettingsLink: return new Dat151DoorAudioSettingsLink(d, br); + case Dat151RelType.CollisionMaterialSettings: return new Dat151CollisionMaterialSettings(d, br); + case Dat151RelType.DoorAudioSettings: return new Dat151DoorAudioSettings(d, br); + case Dat151RelType.AnimalFootstepReference: return new Dat151AnimalFootstepReference(d, br); case Dat151RelType.RadioDJSpeechAction: return new Dat151RadioDjSpeechAction(d, br); case Dat151RelType.ForceRadioTrackAction: return new Dat151ForceRadioTrackAction(d, br); - case Dat151RelType.MicrophoneList: return new Dat151MicrophoneList(d, br); + case Dat151RelType.MicrophoneSettingsReference: return new Dat151MicrophoneSettingsReference(d, br); case Dat151RelType.RadioStationList: return new Dat151RadioStationList(d, br); - case Dat151RelType.RadioStation: return new Dat151RadioStation(d, br); - case Dat151RelType.RadioTrack: return new Dat151RadioTrack(d, br); - case Dat151RelType.TrackList: return new Dat151TrackList(d, br); + case Dat151RelType.RadioStationSettings: return new Dat151RadioStationSettings(d, br); + case Dat151RelType.RadioStationTrackList: return new Dat151RadioStationTrackList(d, br); + case Dat151RelType.ReplayRadioStationTrackList: return new Dat151ReplayRadioStationTrackList(d, br); case Dat151RelType.DoorList: return new Dat151DoorList(d, br); case Dat151RelType.ShoeList: return new Dat151ShoeList(d, br); case Dat151RelType.ClothList: return new Dat151ClothList(d, br); - case Dat151RelType.VehicleRecordingList: return new Dat151VehicleRecordingList(d, br); - case Dat151RelType.WeatherTypeList: return new Dat151WeatherTypeList(d, br); - case Dat151RelType.ShoreLinePool: return new Dat151ShoreLinePool(d, br); - case Dat151RelType.ShoreLineLake: return new Dat151ShoreLineLake(d, br); - case Dat151RelType.ShoreLineRiver: return new Dat151ShoreLineRiver(d, br); - case Dat151RelType.ShoreLineOcean: return new Dat151ShoreLineOcean(d, br); + case Dat151RelType.CarRecordingList: return new Dat151CarRecordingList(d, br); + case Dat151RelType.WeatherTypeAudioReference: return new Dat151WeatherTypeAudioSettingsAudioReference(d, br); + case Dat151RelType.ShoreLinePoolAudioSettings: return new Dat151ShoreLinePoolAudioSettings(d, br); + case Dat151RelType.ShoreLineLakeAudioSettings: return new Dat151ShoreLineLakeAudioSettings(d, br); + case Dat151RelType.ShoreLineRiverAudioSettings: return new Dat151ShoreLineRiverAudioSettings(d, br); + case Dat151RelType.ShoreLineOceanAudioSettings: return new Dat151ShoreLineOceanAudioSettings(d, br); case Dat151RelType.ShoreLineList: return new Dat151ShoreLineList(d, br); - case Dat151RelType.RadioTrackEvents: return new Dat151RadioTrackEvents(d, br); - case Dat151RelType.VehicleEngineGranular: return new Dat151VehicleEngineGranular(d, br); - case Dat151RelType.Vehicle: return new Dat151Vehicle(d, br); - case Dat151RelType.VehicleEngine: return new Dat151VehicleEngine(d, br); - case Dat151RelType.VehicleScannerParams: return new Dat151VehicleScannerParams(d, br); + case Dat151RelType.RadioTrackTextIDs: return new Dat151RadioTrackTextIDs(d, br); + case Dat151RelType.GranularEngineAudioSettings: return new Dat151GranularEngineAudioSettings(d, br); + case Dat151RelType.CarAudioSettings: return new Dat151CarAudioSettings(d, br); + case Dat151RelType.VehicleEngineAudioSettings: return new Dat151VehicleEngineAudioSettings(d, br); + case Dat151RelType.ScannerVehicleParams: return new Dat151ScannerVehicleParams(d, br); case Dat151RelType.StaticEmitter: return new Dat151StaticEmitter(d, br); - case Dat151RelType.Weapon: return new Dat151Weapon(d, br); - case Dat151RelType.Explosion: return new Dat151Explosion(d, br); - case Dat151RelType.PedVoiceGroup: return new Dat151PedVoiceGroup(d, br); + case Dat151RelType.WeaponAudioSettings: return new Dat151WeaponAudioSettings(d, br); + case Dat151RelType.ExplosionAudioSettings: return new Dat151ExplosionAudioSettings(d, br); + case Dat151RelType.PedVoiceGroups: return new Dat151PedVoiceGroups(d, br); case Dat151RelType.EntityEmitter: return new Dat151EntityEmitter(d, br); - case Dat151RelType.Boat: return new Dat151Boat(d, br); - case Dat151RelType.Bicycle: return new Dat151Bicycle(d, br); - case Dat151RelType.Aeroplane: return new Dat151Aeroplane(d, br); - case Dat151RelType.Helicopter: return new Dat151Helicopter(d, br); - case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(d, br); - case Dat151RelType.Train: return new Dat151Train(d, br); + case Dat151RelType.BoatAudioSettings: return new Dat151BoatAudioSettings(d, br); + case Dat151RelType.BicycleAudioSettings: return new Dat151BicycleAudioSettings(d, br); + case Dat151RelType.PlaneAudioSettings: return new Dat151PlaneAudioSettings(d, br); + case Dat151RelType.HeliAudioSettings: return new Dat151HeliAudioSettings(d, br); + case Dat151RelType.TrailerAudioSettings: return new Dat151TrailerAudioSettings(d, br); + case Dat151RelType.TrainAudioSettings: return new Dat151TrainAudioSettings(d, br); case Dat151RelType.AnimalParams: return new Dat151AnimalParams(d, br); case Dat151RelType.SpeechParams: return new Dat151SpeechParams(d, br); - case Dat151RelType.MeleeCombat: return new Dat151MeleeCombat(d, br); + case Dat151RelType.MeleeCombatSettings: return new Dat151MeleeCombatSettings(d, br); + case Dat151RelType.TriggeredSpeechContext: return new Dat151TriggeredSpeechContext(d, br); case Dat151RelType.SpeechContext: return new Dat151SpeechContext(d, br); - case Dat151RelType.SpeechChoice: return new Dat151SpeechChoice(d, br); - case Dat151RelType.VirtualSpeechChoice: return new Dat151VirtualSpeechChoice(d, br); + case Dat151RelType.SpeechContextVirtual: return new Dat151SpeechContextVirtual(d, br); case Dat151RelType.SpeechContextList: return new Dat151SpeechContextList(d, br); - case Dat151RelType.Shoe: return new Dat151Shoe(d, br); - case Dat151RelType.Unk22: return new Dat151Unk22(d, br); - case Dat151RelType.Skis: return new Dat151Skis(d, br); - case Dat151RelType.RadioTrackCategory: return new Dat151RadioTrackCategory(d, br); - case Dat151RelType.PoliceScannerCrime: return new Dat151PoliceScannerCrime(d, br); - case Dat151RelType.RaceToPedVoiceGroup: return new Dat151RaceToPedVoiceGroup(d, br); - case Dat151RelType.PedType: return new Dat151PedType(d, br); - case Dat151RelType.PoliceScannerReport: return new Dat151PoliceScannerReport(d, br); - case Dat151RelType.PoliceScannerLocation: return new Dat151PoliceScannerLocation(d, br); - case Dat151RelType.PoliceScannerLocationList: return new Dat151PoliceScannerLocationList(d, br); - case Dat151RelType.AmbienceSlotMap: return new Dat151AmbienceSlotMap(d, br); - case Dat151RelType.AmbienceBankMap: return new Dat151AmbienceBankMap(d, br); - case Dat151RelType.AmbientZoneParams: return new Dat151AmbientZoneParams(d, br); - case Dat151RelType.InteriorRoomParams: return new Dat151InteriorRoomParams(d, br); - case Dat151RelType.DoorParams: return new Dat151DoorParams(d, br); - case Dat151RelType.Climbing: return new Dat151Climbing(d, br); - case Dat151RelType.WeatherType: return new Dat151WeatherType(d, br); + case Dat151RelType.ShoeAudioSettings: return new Dat151ShoeAudioSettings(d, br); + case Dat151RelType.ModelPhysicsParams: return new Dat151ModelPhysicsParams(d, br); + case Dat151RelType.SkiAudioSettings: return new Dat151SkiAudioSettings(d, br); + case Dat151RelType.RadioTrackCategoryData: return new Dat151RadioTrackCategoryData(d, br); + case Dat151RelType.ScannerCrimeReport: return new Dat151ScannerCrimeReport(d, br); + case Dat151RelType.PedRaceToPedVoiceGroup: return new Dat151PedRaceToPedVoiceGroup(d, br); + case Dat151RelType.FriendGroup: return new Dat151FriendGroup(d, br); + case Dat151RelType.ScriptedScannerLine: return new Dat151ScriptedScannerLine(d, br); + case Dat151RelType.ScannerSpecificLocation: return new Dat151ScannerSpecificLocation(d, br); + case Dat151RelType.ScannerSpecificLocationList: return new Dat151ScannerSpecificLocationList(d, br); + case Dat151RelType.AmbientSlotMap: return new Dat151AmbientSlotMap(d, br); + case Dat151RelType.AmbientBankMap: return new Dat151AmbientBankMap(d, br); + case Dat151RelType.EnvironmentRule: return new Dat151EnvironmentRule(d, br); + case Dat151RelType.InteriorWeaponMetrics: return new Dat151InteriorWeaponMetrics(d, br); + case Dat151RelType.DoorTuningParams: return new Dat151DoorTuningParams(d, br); + case Dat151RelType.ClimbingAudioSettings: return new Dat151ClimbingAudioSettings(d, br); + case Dat151RelType.WeatherAudioSettings: return new Dat151WeatherAudioSettings(d, br); case Dat151RelType.StemMix: return new Dat151StemMix(d, br); - case Dat151RelType.MusicBeat: return new Dat151MusicBeat(d, br); - case Dat151RelType.MusicBar: return new Dat151MusicBar(d, br); - case Dat151RelType.DependentAmbience: return new Dat151DependentAmbience(d, br); - case Dat151RelType.ConductorState: return new Dat151ConductorState(d, br); - case Dat151RelType.AnimalSounds: return new Dat151AnimalSounds(d, br); - case Dat151RelType.VehicleScannerColourList: return new Dat151VehicleScannerColourList(d, br); - case Dat151RelType.Unk77: return new Dat151Unk77(d, br); - case Dat151RelType.Microphone: return new Dat151Microphone(d, br); - case Dat151RelType.VehicleRecording: return new Dat151VehicleRecording(d, br); - case Dat151RelType.AnimalFootsteps: return new Dat151AnimalFootsteps(d, br); - case Dat151RelType.Cloth: return new Dat151Cloth(d, br); + case Dat151RelType.BeatConstraint: return new Dat151BeatConstraint(d, br); + case Dat151RelType.BarConstraint: return new Dat151BarConstraint(d, br); + case Dat151RelType.DirectionalAmbience: return new Dat151DirectionalAmbience(d, br); + case Dat151RelType.GunfightConductorIntensitySettings: return new Dat151GunfightConductorIntensitySettings(d, br); + case Dat151RelType.AnimalVocalAnimTrigger: return new Dat151AnimalVocalAnimTrigger(d, br); + case Dat151RelType.ScannerVoiceParams: return new Dat151ScannerVoiceParams(d, br); + case Dat151RelType.AudioRoadInfo: return new Dat151AudioRoadInfo(d, br); + case Dat151RelType.MicrophoneSettings: return new Dat151MicrophoneSettings(d, br); + case Dat151RelType.CarRecordingAudioSettings: return new Dat151CarRecordingAudioSettings(d, br); + case Dat151RelType.AnimalFootstepSettings: return new Dat151AnimalFootstepSettings(d, br); + case Dat151RelType.ClothAudioSettings: return new Dat151ClothAudioSettings(d, br); case Dat151RelType.RadioTrackSettings: return new Dat151RadioTrackSettings(d, br); - case Dat151RelType.StealthSettings: return new Dat151StealthSettings(d, br); - case Dat151RelType.Unk99: return new Dat151Unk99(d, br); - case Dat151RelType.Tunnel: return new Dat151Tunnel(d, br); - case Dat151RelType.Alarm: return new Dat151Alarm(d, br); + case Dat151RelType.ModelFootStepTuning: return new Dat151ModelFootStepTuning(d, br); + case Dat151RelType.SilenceConstraint: return new Dat151SilenceConstraint(d, br); + case Dat151RelType.ReflectionsSettings: return new Dat151ReflectionsSettings(d, br); + case Dat151RelType.AlarmSettings: return new Dat151AlarmSettings(d, br); case Dat151RelType.SlowMoSettings: return new Dat151SlowMoSettings(d, br); - case Dat151RelType.Scenario: return new Dat151Scenario(d, br); + case Dat151RelType.PedScenarioAudioSettings: return new Dat151PedScenarioAudioSettings(d, br); case Dat151RelType.PortalSettings: return new Dat151PortalSettings(d, br); - case Dat151RelType.ElectricEngine: return new Dat151ElectricEngine(d, br); - case Dat151RelType.BreathSettings: return new Dat151BreathSettings(d, br); - case Dat151RelType.WallaSpeech: return new Dat151WallaSpeech(d, br); + case Dat151RelType.ElectricEngineAudioSettings: return new Dat151ElectricEngineAudioSettings(d, br); + case Dat151RelType.PlayerBreathingSettings: return new Dat151PlayerBreathingSettings(d, br); + case Dat151RelType.PedWallaSpeechSettings: return new Dat151PedWallaSpeechSettings(d, br); case Dat151RelType.AircraftWarningSettings: return new Dat151AircraftWarningSettings(d, br); - case Dat151RelType.WallaSpeechList: return new Dat151WallaSpeechList(d, br); + case Dat151RelType.PedWallaSpeechSettingsList: return new Dat151PedWallaSpeechSettingsList(d, br); case Dat151RelType.CopDispatchInteractionSettings: return new Dat151CopDispatchInteractionSettings(d, br); - case Dat151RelType.Unk115: return new Dat151Unk115(d, br); - case Dat151RelType.TennisVFXSettings: return new Dat151TennisVFXSettings(d, br); - case Dat151RelType.Unk118: return new Dat151Unk118(d, br); - case Dat151RelType.Foliage: return new Dat151Foliage(d, br); - case Dat151RelType.ModelAudioCollisionSettingsOverride: return new Dat151ModelAudioCollisionSettingsOverride(d, br); - case Dat151RelType.RadioStationList2: return new Dat151RadioStationList2(d, br); + case Dat151RelType.RandomisedRadioEmitterSettings: return new Dat151RandomisedRadioEmitterSettings(d, br); + case Dat151RelType.TennisVocalizationSettings: return new Dat151TennisVocalizationSettings(d, br); + case Dat151RelType.SportsCarRevsSettings: return new Dat151SportsCarRevsSettings(d, br); + case Dat151RelType.FoliageSettings: return new Dat151FoliageSettings(d, br); + case Dat151RelType.ModelAudioCollisionSettingsOverrideList: return new Dat151ModelAudioCollisionSettingsOverrideList(d, br); + case Dat151RelType.GameObjectHashList: return new Dat151GameObjectHashList(d, br); default: return new Dat151RelData(d, br); //shouldn't get here } @@ -806,120 +806,120 @@ namespace CodeWalker.GameFiles case Dat151RelType.AmbientZone: return new Dat151AmbientZone(this); case Dat151RelType.AmbientRule: return new Dat151AmbientRule(this); case Dat151RelType.AmbientZoneList: return new Dat151AmbientZoneList(this); - case Dat151RelType.VehicleCollision: return new Dat151VehicleCollision(this); - case Dat151RelType.WeaponAudioItem: return new Dat151WeaponAudioItem(this); + case Dat151RelType.VehicleCollisionSettings: return new Dat151VehicleCollisionSettings(this); + case Dat151RelType.ItemAudioSettings: return new Dat151ItemAudioSettings(this); case Dat151RelType.StartTrackAction: return new Dat151StartTrackAction(this); case Dat151RelType.StopTrackAction: return new Dat151StopTrackAction(this); - case Dat151RelType.Mood: return new Dat151Mood(this); + case Dat151RelType.InteractiveMusicMood: return new Dat151InteractiveMusicMood(this); case Dat151RelType.SetMoodAction: return new Dat151SetMoodAction(this); - case Dat151RelType.PlayerAction: return new Dat151PlayerAction(this); + case Dat151RelType.MusicEvent: return new Dat151MusicEvent(this); case Dat151RelType.StartOneShotAction: return new Dat151StartOneShotAction(this); case Dat151RelType.StopOneShotAction: return new Dat151StopOneShotAction(this); case Dat151RelType.FadeOutRadioAction: return new Dat151FadeOutRadioAction(this); case Dat151RelType.FadeInRadioAction: return new Dat151FadeInRadioAction(this); case Dat151RelType.ModelAudioCollisionSettings: return new Dat151ModelAudioCollisionSettings(this); - case Dat151RelType.Interior: return new Dat151Interior(this); + case Dat151RelType.InteriorSettings: return new Dat151InteriorSettings(this); case Dat151RelType.InteriorRoom: return new Dat151InteriorRoom(this); - case Dat151RelType.DoorModel: return new Dat151DoorModel(this); - case Dat151RelType.AudioMaterial: return new Dat151AudioMaterial(this); - case Dat151RelType.Door: return new Dat151Door(this); - case Dat151RelType.AnimalFootstepsList: return new Dat151AnimalFootstepsList(this); + case Dat151RelType.DoorAudioSettingsLink: return new Dat151DoorAudioSettingsLink(this); + case Dat151RelType.CollisionMaterialSettings: return new Dat151CollisionMaterialSettings(this); + case Dat151RelType.DoorAudioSettings: return new Dat151DoorAudioSettings(this); + case Dat151RelType.AnimalFootstepReference: return new Dat151AnimalFootstepReference(this); case Dat151RelType.RadioDJSpeechAction: return new Dat151RadioDjSpeechAction(this); case Dat151RelType.ForceRadioTrackAction: return new Dat151ForceRadioTrackAction(this); - case Dat151RelType.MicrophoneList: return new Dat151MicrophoneList(this); + case Dat151RelType.MicrophoneSettingsReference: return new Dat151MicrophoneSettingsReference(this); case Dat151RelType.RadioStationList: return new Dat151RadioStationList(this); - case Dat151RelType.RadioStation: return new Dat151RadioStation(this); - case Dat151RelType.RadioTrack: return new Dat151RadioTrack(this); - case Dat151RelType.TrackList: return new Dat151TrackList(this); + case Dat151RelType.RadioStationSettings: return new Dat151RadioStationSettings(this); + case Dat151RelType.RadioStationTrackList: return new Dat151RadioStationTrackList(this); + case Dat151RelType.ReplayRadioStationTrackList: return new Dat151ReplayRadioStationTrackList(this); case Dat151RelType.DoorList: return new Dat151DoorList(this); case Dat151RelType.ShoeList: return new Dat151ShoeList(this); case Dat151RelType.ClothList: return new Dat151ClothList(this); - case Dat151RelType.VehicleRecordingList: return new Dat151VehicleRecordingList(this); - case Dat151RelType.WeatherTypeList: return new Dat151WeatherTypeList(this); - case Dat151RelType.ShoreLinePool: return new Dat151ShoreLinePool(this); - case Dat151RelType.ShoreLineLake: return new Dat151ShoreLineLake(this); - case Dat151RelType.ShoreLineRiver: return new Dat151ShoreLineRiver(this); - case Dat151RelType.ShoreLineOcean: return new Dat151ShoreLineOcean(this); + case Dat151RelType.CarRecordingList: return new Dat151CarRecordingList(this); + case Dat151RelType.WeatherTypeAudioReference: return new Dat151WeatherTypeAudioSettingsAudioReference(this); + case Dat151RelType.ShoreLinePoolAudioSettings: return new Dat151ShoreLinePoolAudioSettings(this); + case Dat151RelType.ShoreLineLakeAudioSettings: return new Dat151ShoreLineLakeAudioSettings(this); + case Dat151RelType.ShoreLineRiverAudioSettings: return new Dat151ShoreLineRiverAudioSettings(this); + case Dat151RelType.ShoreLineOceanAudioSettings: return new Dat151ShoreLineOceanAudioSettings(this); case Dat151RelType.ShoreLineList: return new Dat151ShoreLineList(this); - case Dat151RelType.RadioTrackEvents: return new Dat151RadioTrackEvents(this); - case Dat151RelType.VehicleEngineGranular: return new Dat151VehicleEngineGranular(this); - case Dat151RelType.Vehicle: return new Dat151Vehicle(this); - case Dat151RelType.VehicleEngine: return new Dat151VehicleEngine(this); - case Dat151RelType.VehicleScannerParams: return new Dat151VehicleScannerParams(this); + case Dat151RelType.RadioTrackTextIDs: return new Dat151RadioTrackTextIDs(this); + case Dat151RelType.GranularEngineAudioSettings: return new Dat151GranularEngineAudioSettings(this); + case Dat151RelType.CarAudioSettings: return new Dat151CarAudioSettings(this); + case Dat151RelType.VehicleEngineAudioSettings: return new Dat151VehicleEngineAudioSettings(this); + case Dat151RelType.ScannerVehicleParams: return new Dat151ScannerVehicleParams(this); case Dat151RelType.StaticEmitter: return new Dat151StaticEmitter(this); - case Dat151RelType.Weapon: return new Dat151Weapon(this); - case Dat151RelType.Explosion: return new Dat151Explosion(this); - case Dat151RelType.PedVoiceGroup: return new Dat151PedVoiceGroup(this); + case Dat151RelType.WeaponAudioSettings: return new Dat151WeaponAudioSettings(this); + case Dat151RelType.ExplosionAudioSettings: return new Dat151ExplosionAudioSettings(this); + case Dat151RelType.PedVoiceGroups: return new Dat151PedVoiceGroups(this); case Dat151RelType.EntityEmitter: return new Dat151EntityEmitter(this); - case Dat151RelType.Boat: return new Dat151Boat(this); - case Dat151RelType.Bicycle: return new Dat151Bicycle(this); - case Dat151RelType.Aeroplane: return new Dat151Aeroplane(this); - case Dat151RelType.Helicopter: return new Dat151Helicopter(this); - case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(this); - case Dat151RelType.Train: return new Dat151Train(this); + case Dat151RelType.BoatAudioSettings: return new Dat151BoatAudioSettings(this); + case Dat151RelType.BicycleAudioSettings: return new Dat151BicycleAudioSettings(this); + case Dat151RelType.PlaneAudioSettings: return new Dat151PlaneAudioSettings(this); + case Dat151RelType.HeliAudioSettings: return new Dat151HeliAudioSettings(this); + case Dat151RelType.TrailerAudioSettings: return new Dat151TrailerAudioSettings(this); + case Dat151RelType.TrainAudioSettings: return new Dat151TrainAudioSettings(this); case Dat151RelType.AnimalParams: return new Dat151AnimalParams(this); case Dat151RelType.SpeechParams: return new Dat151SpeechParams(this); - case Dat151RelType.MeleeCombat: return new Dat151MeleeCombat(this); + case Dat151RelType.MeleeCombatSettings: return new Dat151MeleeCombatSettings(this); + case Dat151RelType.TriggeredSpeechContext: return new Dat151TriggeredSpeechContext(this); case Dat151RelType.SpeechContext: return new Dat151SpeechContext(this); - case Dat151RelType.SpeechChoice: return new Dat151SpeechChoice(this); - case Dat151RelType.VirtualSpeechChoice: return new Dat151VirtualSpeechChoice(this); + case Dat151RelType.SpeechContextVirtual: return new Dat151SpeechContextVirtual(this); case Dat151RelType.SpeechContextList: return new Dat151SpeechContextList(this); - case Dat151RelType.Shoe: return new Dat151Shoe(this); - case Dat151RelType.Unk22: return new Dat151Unk22(this); - case Dat151RelType.Skis: return new Dat151Skis(this); - case Dat151RelType.RadioTrackCategory: return new Dat151RadioTrackCategory(this); - case Dat151RelType.PoliceScannerCrime: return new Dat151PoliceScannerCrime(this); - case Dat151RelType.RaceToPedVoiceGroup: return new Dat151RaceToPedVoiceGroup(this); - case Dat151RelType.PedType: return new Dat151PedType(this); - case Dat151RelType.PoliceScannerReport: return new Dat151PoliceScannerReport(this); - case Dat151RelType.PoliceScannerLocation: return new Dat151PoliceScannerLocation(this); - case Dat151RelType.PoliceScannerLocationList: return new Dat151PoliceScannerLocationList(this); - case Dat151RelType.AmbienceSlotMap: return new Dat151AmbienceSlotMap(this); - case Dat151RelType.AmbienceBankMap: return new Dat151AmbienceBankMap(this); - case Dat151RelType.AmbientZoneParams: return new Dat151AmbientZoneParams(this); - case Dat151RelType.InteriorRoomParams: return new Dat151InteriorRoomParams(this); - case Dat151RelType.DoorParams: return new Dat151DoorParams(this); - case Dat151RelType.Climbing: return new Dat151Climbing(this); - case Dat151RelType.WeatherType: return new Dat151WeatherType(this); + case Dat151RelType.ShoeAudioSettings: return new Dat151ShoeAudioSettings(this); + case Dat151RelType.ModelPhysicsParams: return new Dat151ModelPhysicsParams(this); + case Dat151RelType.SkiAudioSettings: return new Dat151SkiAudioSettings(this); + case Dat151RelType.RadioTrackCategoryData: return new Dat151RadioTrackCategoryData(this); + case Dat151RelType.ScannerCrimeReport: return new Dat151ScannerCrimeReport(this); + case Dat151RelType.PedRaceToPedVoiceGroup: return new Dat151PedRaceToPedVoiceGroup(this); + case Dat151RelType.FriendGroup: return new Dat151FriendGroup(this); + case Dat151RelType.ScriptedScannerLine: return new Dat151ScriptedScannerLine(this); + case Dat151RelType.ScannerSpecificLocation: return new Dat151ScannerSpecificLocation(this); + case Dat151RelType.ScannerSpecificLocationList: return new Dat151ScannerSpecificLocationList(this); + case Dat151RelType.AmbientSlotMap: return new Dat151AmbientSlotMap(this); + case Dat151RelType.AmbientBankMap: return new Dat151AmbientBankMap(this); + case Dat151RelType.EnvironmentRule: return new Dat151EnvironmentRule(this); + case Dat151RelType.InteriorWeaponMetrics: return new Dat151InteriorWeaponMetrics(this); + case Dat151RelType.DoorTuningParams: return new Dat151DoorTuningParams(this); + case Dat151RelType.ClimbingAudioSettings: return new Dat151ClimbingAudioSettings(this); + case Dat151RelType.WeatherAudioSettings: return new Dat151WeatherAudioSettings(this); case Dat151RelType.StemMix: return new Dat151StemMix(this); - case Dat151RelType.MusicBeat: return new Dat151MusicBeat(this); - case Dat151RelType.MusicBar: return new Dat151MusicBar(this); - case Dat151RelType.DependentAmbience: return new Dat151DependentAmbience(this); - case Dat151RelType.ConductorState: return new Dat151ConductorState(this); - case Dat151RelType.AnimalSounds: return new Dat151AnimalSounds(this); - case Dat151RelType.VehicleScannerColourList: return new Dat151VehicleScannerColourList(this); - case Dat151RelType.Unk77: return new Dat151Unk77(this); - case Dat151RelType.Microphone: return new Dat151Microphone(this); - case Dat151RelType.VehicleRecording: return new Dat151VehicleRecording(this); - case Dat151RelType.AnimalFootsteps: return new Dat151AnimalFootsteps(this); - case Dat151RelType.Cloth: return new Dat151Cloth(this); + case Dat151RelType.BeatConstraint: return new Dat151BeatConstraint(this); + case Dat151RelType.BarConstraint: return new Dat151BarConstraint(this); + case Dat151RelType.DirectionalAmbience: return new Dat151DirectionalAmbience(this); + case Dat151RelType.GunfightConductorIntensitySettings: return new Dat151GunfightConductorIntensitySettings(this); + case Dat151RelType.AnimalVocalAnimTrigger: return new Dat151AnimalVocalAnimTrigger(this); + case Dat151RelType.ScannerVoiceParams: return new Dat151ScannerVoiceParams(this); + case Dat151RelType.AudioRoadInfo: return new Dat151AudioRoadInfo(this); + case Dat151RelType.MicrophoneSettings: return new Dat151MicrophoneSettings(this); + case Dat151RelType.CarRecordingAudioSettings: return new Dat151CarRecordingAudioSettings(this); + case Dat151RelType.AnimalFootstepSettings: return new Dat151AnimalFootstepSettings(this); + case Dat151RelType.ClothAudioSettings: return new Dat151ClothAudioSettings(this); case Dat151RelType.RadioTrackSettings: return new Dat151RadioTrackSettings(this); - case Dat151RelType.StealthSettings: return new Dat151StealthSettings(this); - case Dat151RelType.Unk99: return new Dat151Unk99(this); - case Dat151RelType.Tunnel: return new Dat151Tunnel(this); - case Dat151RelType.Alarm: return new Dat151Alarm(this); + case Dat151RelType.ModelFootStepTuning: return new Dat151ModelFootStepTuning(this); + case Dat151RelType.SilenceConstraint: return new Dat151SilenceConstraint(this); + case Dat151RelType.ReflectionsSettings: return new Dat151ReflectionsSettings(this); + case Dat151RelType.AlarmSettings: return new Dat151AlarmSettings(this); case Dat151RelType.SlowMoSettings: return new Dat151SlowMoSettings(this); - case Dat151RelType.Scenario: return new Dat151Scenario(this); + case Dat151RelType.PedScenarioAudioSettings: return new Dat151PedScenarioAudioSettings(this); case Dat151RelType.PortalSettings: return new Dat151PortalSettings(this); - case Dat151RelType.ElectricEngine: return new Dat151ElectricEngine(this); - case Dat151RelType.BreathSettings: return new Dat151BreathSettings(this); - case Dat151RelType.WallaSpeech: return new Dat151WallaSpeech(this); + case Dat151RelType.ElectricEngineAudioSettings: return new Dat151ElectricEngineAudioSettings(this); + case Dat151RelType.PlayerBreathingSettings: return new Dat151PlayerBreathingSettings(this); + case Dat151RelType.PedWallaSpeechSettings: return new Dat151PedWallaSpeechSettings(this); case Dat151RelType.AircraftWarningSettings: return new Dat151AircraftWarningSettings(this); - case Dat151RelType.WallaSpeechList: return new Dat151WallaSpeechList(this); + case Dat151RelType.PedWallaSpeechSettingsList: return new Dat151PedWallaSpeechSettingsList(this); case Dat151RelType.CopDispatchInteractionSettings: return new Dat151CopDispatchInteractionSettings(this); - case Dat151RelType.Unk115: return new Dat151Unk115(this); - case Dat151RelType.TennisVFXSettings: return new Dat151TennisVFXSettings(this); - case Dat151RelType.Unk118: return new Dat151Unk118(this); - case Dat151RelType.Foliage: return new Dat151Foliage(this); - case Dat151RelType.ModelAudioCollisionSettingsOverride: return new Dat151ModelAudioCollisionSettingsOverride(this); - case Dat151RelType.RadioStationList2: return new Dat151RadioStationList2(this); + case Dat151RelType.RandomisedRadioEmitterSettings: return new Dat151RandomisedRadioEmitterSettings(this); + case Dat151RelType.TennisVocalizationSettings: return new Dat151TennisVocalizationSettings(this); + case Dat151RelType.SportsCarRevsSettings: return new Dat151SportsCarRevsSettings(this); + case Dat151RelType.FoliageSettings: return new Dat151FoliageSettings(this); + case Dat151RelType.ModelAudioCollisionSettingsOverrideList: return new Dat151ModelAudioCollisionSettingsOverrideList(this); + case Dat151RelType.GameObjectHashList: return new Dat151GameObjectHashList(this); default: return new Dat151RelData(this, (Dat151RelType)dataType); //shouldn't get here } case RelDatFileType.Dat4: if (IsAudioConfig) { - switch((Dat4ConfigType)dataType) + switch ((Dat4ConfigType)dataType) { case Dat4ConfigType.Int: return new Dat4ConfigInt(this); case Dat4ConfigType.UnsignedInt: return new Dat4ConfigUnsignedInt(this); @@ -1020,13 +1020,13 @@ namespace CodeWalker.GameFiles { ntlength += (uint)name.Length + 1; } - if ((NameTableLength != ntlength)&&(NameTableLength!=0)) + if ((NameTableLength != ntlength) && (NameTableLength != 0)) { } NameTableLength = ntlength; } else { - if ((NameTableLength != 4)&& (NameTableLength != 0)) + if ((NameTableLength != 4) && (NameTableLength != 0)) { } NameTableCount = 0; NameTableLength = 4; @@ -1080,20 +1080,20 @@ namespace CodeWalker.GameFiles { case Dat151RelType.AmbientRule: case Dat151RelType.AmbientZone: - case Dat151RelType.Alarm: - case Dat151RelType.PoliceScannerLocation: + case Dat151RelType.AlarmSettings: + case Dat151RelType.ScannerSpecificLocation: while ((ms.Position & 0xF) != 0) bw.Write((byte)0); //align to nearest 16 bytes break; - case Dat151RelType.Mood: - case Dat151RelType.MusicBar: - case Dat151RelType.RaceToPedVoiceGroup: + case Dat151RelType.InteractiveMusicMood: + case Dat151RelType.BarConstraint: + case Dat151RelType.PedRaceToPedVoiceGroup: case Dat151RelType.SpeechParams: - case Dat151RelType.SpeechContext: - case Dat151RelType.AmbienceBankMap: - case Dat151RelType.VehicleTrailer: + case Dat151RelType.TriggeredSpeechContext: + case Dat151RelType.AmbientBankMap: + case Dat151RelType.TrailerAudioSettings: case Dat151RelType.StaticEmitterList: - case Dat151RelType.Weapon: - case Dat151RelType.Vehicle: + case Dat151RelType.WeaponAudioSettings: + case Dat151RelType.CarAudioSettings: case Dat151RelType.StopTrackAction: while ((ms.Position & 3) != 0) bw.Write((byte)0); //align these to nearest 4 bytes break; @@ -1130,7 +1130,7 @@ namespace CodeWalker.GameFiles ms.Position = 0; ms.Read(buf, 0, buf.Length); - if ((DataBlock!=null)&&(DataBlock.Length != buf.Length)) + if ((DataBlock != null) && (DataBlock.Length != buf.Length)) { } DataBlock = buf; @@ -1156,7 +1156,7 @@ namespace CodeWalker.GameFiles case RelDatFileType.Dat22Categories: case RelDatFileType.Dat16Curves: case RelDatFileType.Dat54DataEntries: - sorted.Sort((a, b) => + sorted.Sort((a, b) => { var ah = (uint)a.NameHash; var bh = (uint)b.NameHash; @@ -1468,7 +1468,7 @@ namespace CodeWalker.GameFiles public byte[] Save() { - + BuildNameTable(); BuildDataBlock(); BuildIndex(); @@ -1634,7 +1634,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct RelIndexHash + [TC(typeof(EXP))] + public struct RelIndexHash { public MetaHash Name { get; set; } public uint Offset { get; set; } @@ -1647,7 +1648,8 @@ namespace CodeWalker.GameFiles } - [TC(typeof(EXP))] public struct RelIndexString + [TC(typeof(EXP))] + public struct RelIndexString { public string Name { get; set; } public uint Offset { get; set; } @@ -1660,7 +1662,8 @@ namespace CodeWalker.GameFiles } - [TC(typeof(EXP))] public class RelData + [TC(typeof(EXP))] + public class RelData { public MetaHash NameHash { get; set; } public string Name { get; set; } @@ -1781,12 +1784,13 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public class RelSoundHeader + [TC(typeof(EXP))] + public class RelSoundHeader { public FlagsUint Flags { get; set; } public FlagsUint Flags2 { get; set; } - public ushort Unk01 { get; set; } + public ushort MaxHeaderSize { get; set; } public short Volume { get; set; } public ushort VolumeVariance { get; set; } //0xD-0xF public short Pitch { get; set; } //0xF-0x11 @@ -1808,13 +1812,13 @@ namespace CodeWalker.GameFiles public MetaHash VolumeCurve { get; set; } //0x35-0x39 public short VolumeCurveScale { get; set; } //0x39-0x3B public byte VolumeCurvePlateau { get; set; } //0x3B-0x3C - public byte Unk20 { get; set; } //0x3C-0x3D - public byte Unk21 { get; set; } //0x3D-0x3E + public byte SpeakerMask { get; set; } //0x3C-0x3D + public byte EffectRoute { get; set; } //0x3D-0x3E public MetaHash PreDelayVariable { get; set; } //0x3E-0x42 public MetaHash StartOffsetVariable { get; set; } //0x42-0x46 - public ushort Unk22 { get; set; } //0x46-0x48 - public ushort Unk23 { get; set; } //0x48-0x4A - public ushort Unk24 { get; set; } //0x4A-0x4C + public ushort SmallReverbSend { get; set; } //0x46-0x48 + public ushort MediumReverbSend { get; set; } //0x48-0x4A + public ushort LargeReverbSend { get; set; } //0x4A-0x4C public ushort Unk25 { get; set; } //0x4A-0x4C public ushort Unk26 { get; set; } //0x4A-0x4C @@ -1836,7 +1840,7 @@ namespace CodeWalker.GameFiles if ((Flags & 0xFF) != 0xAA) { if (Bit(0)) Flags2 = br.ReadUInt32(); - if (Bit(1)) Unk01 = br.ReadUInt16(); + if (Bit(1)) MaxHeaderSize = br.ReadUInt16(); if (Bit(2)) Volume = br.ReadInt16(); if (Bit(3)) VolumeVariance = br.ReadUInt16(); if (Bit(4)) Pitch = br.ReadInt16(); @@ -1864,16 +1868,16 @@ namespace CodeWalker.GameFiles if (Bit(20)) VolumeCurve = br.ReadUInt32(); if (Bit(21)) VolumeCurveScale = br.ReadInt16(); if (Bit(22)) VolumeCurvePlateau = br.ReadByte(); - if (Bit(23)) Unk20 = br.ReadByte(); + if (Bit(23)) SpeakerMask = br.ReadByte(); } if ((Flags & 0xFF000000) != 0xAA000000) { - if (Bit(24)) Unk21 = br.ReadByte(); + if (Bit(24)) EffectRoute = br.ReadByte(); if (Bit(25)) PreDelayVariable = br.ReadUInt32(); if (Bit(26)) StartOffsetVariable = br.ReadUInt32(); - if (Bit(27)) Unk22 = br.ReadUInt16(); - if (Bit(28)) Unk23 = br.ReadUInt16(); - if (Bit(29)) Unk24 = br.ReadUInt16(); + if (Bit(27)) SmallReverbSend = br.ReadUInt16(); + if (Bit(28)) MediumReverbSend = br.ReadUInt16(); + if (Bit(29)) LargeReverbSend = br.ReadUInt16(); if (Bit(30)) Unk25 = br.ReadUInt16(); //maybe not if (Bit(31)) Unk26 = br.ReadUInt16(); //maybe not } @@ -1890,7 +1894,7 @@ namespace CodeWalker.GameFiles if ((Flags & 0xFF) != 0xAA) { if (Bit(0)) bw.Write(Flags2); - if (Bit(1)) bw.Write(Unk01); + if (Bit(1)) bw.Write(MaxHeaderSize); if (Bit(2)) bw.Write(Volume); if (Bit(3)) bw.Write(VolumeVariance); if (Bit(4)) bw.Write(Pitch); @@ -1918,16 +1922,16 @@ namespace CodeWalker.GameFiles if (Bit(20)) bw.Write(VolumeCurve); if (Bit(21)) bw.Write(VolumeCurveScale); if (Bit(22)) bw.Write(VolumeCurvePlateau); - if (Bit(23)) bw.Write(Unk20); + if (Bit(23)) bw.Write(SpeakerMask); } if ((Flags & 0xFF000000) != 0xAA000000) { - if (Bit(24)) bw.Write(Unk21); + if (Bit(24)) bw.Write(EffectRoute); if (Bit(25)) bw.Write(PreDelayVariable); if (Bit(26)) bw.Write(StartOffsetVariable); - if (Bit(27)) bw.Write(Unk22); - if (Bit(28)) bw.Write(Unk23); - if (Bit(29)) bw.Write(Unk24); + if (Bit(27)) bw.Write(SmallReverbSend); + if (Bit(28)) bw.Write(MediumReverbSend); + if (Bit(29)) bw.Write(LargeReverbSend); if (Bit(30)) bw.Write(Unk25); //maybe not if (Bit(31)) bw.Write(Unk26); //maybe not } @@ -1941,7 +1945,7 @@ namespace CodeWalker.GameFiles if ((Flags & 0xFF) != 0xAA) { if (Bit(0)) RelXml.ValueTag(sb, indent, "Flags2", "0x" + Flags2.Hex); - if (Bit(1)) RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); + if (Bit(1)) RelXml.ValueTag(sb, indent, "MaxHeaderSize", MaxHeaderSize.ToString()); if (Bit(2)) RelXml.ValueTag(sb, indent, "Volume", Volume.ToString()); if (Bit(3)) RelXml.ValueTag(sb, indent, "VolumeVariance", VolumeVariance.ToString()); if (Bit(4)) RelXml.ValueTag(sb, indent, "Pitch", Pitch.ToString()); @@ -1969,16 +1973,16 @@ namespace CodeWalker.GameFiles if (Bit(20)) RelXml.StringTag(sb, indent, "VolumeCurve", RelXml.HashString(VolumeCurve)); if (Bit(21)) RelXml.ValueTag(sb, indent, "VolumeCurveScale", VolumeCurveScale.ToString()); if (Bit(22)) RelXml.ValueTag(sb, indent, "VolumeCurvePlateau", VolumeCurvePlateau.ToString()); - if (Bit(23)) RelXml.ValueTag(sb, indent, "Unk20", Unk20.ToString()); + if (Bit(23)) RelXml.ValueTag(sb, indent, "SpeakerMask", SpeakerMask.ToString()); } if ((Flags & 0xFF000000) != 0xAA000000) { - if (Bit(24)) RelXml.ValueTag(sb, indent, "Unk21", Unk21.ToString()); + if (Bit(24)) RelXml.ValueTag(sb, indent, "EffectRoute", EffectRoute.ToString()); if (Bit(25)) RelXml.StringTag(sb, indent, "PreDelayVariable", RelXml.HashString(PreDelayVariable)); if (Bit(26)) RelXml.StringTag(sb, indent, "StartOffsetVariable", RelXml.HashString(StartOffsetVariable)); - if (Bit(27)) RelXml.ValueTag(sb, indent, "Unk22", Unk22.ToString()); - if (Bit(28)) RelXml.ValueTag(sb, indent, "Unk23", Unk23.ToString()); - if (Bit(29)) RelXml.ValueTag(sb, indent, "Unk24", Unk24.ToString()); + if (Bit(27)) RelXml.ValueTag(sb, indent, "SmallReverbSend", SmallReverbSend.ToString()); + if (Bit(28)) RelXml.ValueTag(sb, indent, "MediumReverbSend", MediumReverbSend.ToString()); + if (Bit(29)) RelXml.ValueTag(sb, indent, "LargeReverbSend", LargeReverbSend.ToString()); if (Bit(30)) RelXml.ValueTag(sb, indent, "Unk25", Unk25.ToString()); //maybe not if (Bit(31)) RelXml.ValueTag(sb, indent, "Unk26", Unk26.ToString()); //maybe not } @@ -1991,7 +1995,7 @@ namespace CodeWalker.GameFiles if ((Flags & 0xFF) != 0xAA) { if (Bit(0)) Flags2 = Xml.GetChildUIntAttribute(node, "Flags2", "value"); - if (Bit(1)) Unk01 = (ushort)Xml.GetChildUIntAttribute(node, "Unk01", "value"); + if (Bit(1)) MaxHeaderSize = (ushort)Xml.GetChildUIntAttribute(node, "MaxHeaderSize", "value"); if (Bit(2)) Volume = (short)Xml.GetChildIntAttribute(node, "Volume", "value"); if (Bit(3)) VolumeVariance = (ushort)Xml.GetChildUIntAttribute(node, "VolumeVariance", "value"); if (Bit(4)) Pitch = (short)Xml.GetChildIntAttribute(node, "Pitch", "value"); @@ -2019,16 +2023,16 @@ namespace CodeWalker.GameFiles if (Bit(20)) VolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "VolumeCurve")); if (Bit(21)) VolumeCurveScale = (short)Xml.GetChildIntAttribute(node, "VolumeCurveScale", "value"); if (Bit(22)) VolumeCurvePlateau = (byte)Xml.GetChildUIntAttribute(node, "VolumeCurvePlateau", "value"); - if (Bit(23)) Unk20 = (byte)Xml.GetChildUIntAttribute(node, "Unk20", "value"); + if (Bit(23)) SpeakerMask = (byte)Xml.GetChildUIntAttribute(node, "SpeakerMask", "value"); } if ((Flags & 0xFF000000) != 0xAA000000) { - if (Bit(24)) Unk21 = (byte)Xml.GetChildUIntAttribute(node, "Unk21", "value"); + if (Bit(24)) EffectRoute = (byte)Xml.GetChildUIntAttribute(node, "EffectRoute", "value"); if (Bit(25)) PreDelayVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "PreDelayVariable")); if (Bit(26)) StartOffsetVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartOffsetVariable")); - if (Bit(27)) Unk22 = (ushort)Xml.GetChildUIntAttribute(node, "Unk22", "value"); - if (Bit(28)) Unk23 = (ushort)Xml.GetChildUIntAttribute(node, "Unk23", "value"); - if (Bit(29)) Unk24 = (ushort)Xml.GetChildUIntAttribute(node, "Unk24", "value"); + if (Bit(27)) SmallReverbSend = (ushort)Xml.GetChildUIntAttribute(node, "SmallReverbSend", "value"); + if (Bit(28)) MediumReverbSend = (ushort)Xml.GetChildUIntAttribute(node, "MediumReverbSend", "value"); + if (Bit(29)) LargeReverbSend = (ushort)Xml.GetChildUIntAttribute(node, "LargeReverbSend", "value"); if (Bit(30)) Unk25 = (ushort)Xml.GetChildUIntAttribute(node, "Unk25", "value"); if (Bit(31)) Unk26 = (ushort)Xml.GetChildUIntAttribute(node, "Unk26", "value"); } @@ -2042,7 +2046,7 @@ namespace CodeWalker.GameFiles if ((Flags & 0xFF) != 0xAA) { if (Bit(0)) length += 4;// Flags2 = br.ReadUInt32(); - if (Bit(1)) length += 2;// Unk01 = br.ReadUInt16(); + if (Bit(1)) length += 2;// MaxHeaderSize = br.ReadUInt16(); if (Bit(2)) length += 2;// Volume = br.ReadUInt16(); if (Bit(3)) length += 2;// VolumeVariance = br.ReadUInt16(); if (Bit(4)) length += 2;// Pitch = br.ReadUInt16(); @@ -2070,16 +2074,16 @@ namespace CodeWalker.GameFiles if (Bit(20)) length += 4;// VolumeCurve = br.ReadUInt32(); if (Bit(21)) length += 2;// VolumeCurveScale = br.ReadUInt16(); if (Bit(22)) length += 1;// VolumeCurvePlateau = br.ReadByte(); - if (Bit(23)) length += 1;// Unk20 = br.ReadByte(); + if (Bit(23)) length += 1;// SpeakerMask = br.ReadByte(); } if ((Flags & 0xFF000000) != 0xAA000000) { - if (Bit(24)) length += 1;// Unk21 = br.ReadByte(); + if (Bit(24)) length += 1;// EffectRoute = br.ReadByte(); if (Bit(25)) length += 4;// PreDelayVariable = br.ReadUInt32(); if (Bit(26)) length += 4;// StartOffsetVariable = br.ReadUInt32(); - if (Bit(27)) length += 2;// Unk22 = br.ReadUInt16(); - if (Bit(28)) length += 2;// Unk23 = br.ReadUInt16(); - if (Bit(29)) length += 2;// Unk24 = br.ReadUInt16(); + if (Bit(27)) length += 2;// SmallReverbSend = br.ReadUInt16(); + if (Bit(28)) length += 2;// MediumReverbSend = br.ReadUInt16(); + if (Bit(29)) length += 2;// LargeReverbSend = br.ReadUInt16(); if (Bit(30)) length += 2;// Unk25 = br.ReadUInt16(); //maybe not if (Bit(31)) length += 2;// Unk26 = br.ReadUInt16(); //maybe not } @@ -2098,7 +2102,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class RelSound : RelData + [TC(typeof(EXP))] + public class RelSound : RelData { public RelSoundHeader Header { get; set; } public byte ChildSoundsCount { get; set; } @@ -2262,7 +2267,8 @@ namespace CodeWalker.GameFiles SoundHashList = 35 } - [TC(typeof(EXP))] public class Dat54Sound : RelSound + [TC(typeof(EXP))] + public class Dat54Sound : RelSound { public Dat54SoundType Type { get; set; } @@ -2295,7 +2301,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat54LoopingSound : Dat54Sound + [TC(typeof(EXP))] + public class Dat54LoopingSound : Dat54Sound { public short LoopCount { get; set; } //0x0-0x2 number of times looped public short LoopCountVariance { get; set; } //0x2-0x4 loop variance; + or - LoopCount @@ -2346,7 +2353,8 @@ namespace CodeWalker.GameFiles return new uint[] { 6 }; } } - [TC(typeof(EXP))] public class Dat54EnvelopeSound : Dat54Sound + [TC(typeof(EXP))] + public class Dat54EnvelopeSound : Dat54Sound { public ushort Attack { get; set; } //0x0-0x2 ADSHR attack in ms. used by PTS or other types. public ushort AttackVariance { get; set; } //0x2-0x4 variance of attack in ms. @@ -2491,7 +2499,8 @@ namespace CodeWalker.GameFiles return new[] { AttackCurve, DecayCurve, ReleaseCurve }; } } - [TC(typeof(EXP))] public class Dat54TwinLoopSound : Dat54Sound + [TC(typeof(EXP))] + class Dat54TwinLoopSound : Dat54Sound { public ushort MinSwapTime { get; set; } //0x0-0x2 //minimum duration in ms of the two samples, if they are longer they are shortened to this value. public ushort MaxSwapTime { get; set; } //0x2-0x4 //maximum duration in ms of the two samples, if they are longer they are shortened to this value. @@ -2571,10 +2580,11 @@ namespace CodeWalker.GameFiles return new[] { CrossfadeCurve }; } } - [TC(typeof(EXP))] public class Dat54SpeechSound : Dat54Sound + [TC(typeof(EXP))] + class Dat54SpeechSound : Dat54Sound { - public int LastVariation { get; set; } //maybe file index? - public int SpeechUnkInt1 { get; set; } //0x4-0x8 + public int LastVariation { get; set; } + public MetaHash DynamicFieldName { get; set; } //0x4-0x8 public MetaHash VoiceName { get; set; } //0x8-0xC public string ContextName { get; set; } //0xD-... @@ -2583,7 +2593,7 @@ namespace CodeWalker.GameFiles public Dat54SpeechSound(RelData d, BinaryReader br) : base(d, br) { LastVariation = br.ReadInt32(); - SpeechUnkInt1 = br.ReadInt32(); + DynamicFieldName = br.ReadUInt32(); VoiceName = br.ReadUInt32(); ContextName = br.ReadString(); } @@ -2591,7 +2601,7 @@ namespace CodeWalker.GameFiles { base.ReadXml(node); LastVariation = Xml.GetChildIntAttribute(node, "LastVariation", "value"); - SpeechUnkInt1 = Xml.GetChildIntAttribute(node, "SpeechUnkInt1", "value"); + DynamicFieldName = XmlRel.GetHash(Xml.GetChildInnerText(node, "DynamicFieldName")); VoiceName = XmlRel.GetHash(Xml.GetChildInnerText(node, "VoiceName")); ContextName = Xml.GetChildInnerText(node, "ContextName"); } @@ -2599,7 +2609,7 @@ namespace CodeWalker.GameFiles { base.WriteXml(sb, indent); RelXml.ValueTag(sb, indent, "LastVariation", LastVariation.ToString()); - RelXml.ValueTag(sb, indent, "SpeechUnkInt1", SpeechUnkInt1.ToString()); + RelXml.StringTag(sb, indent, "DynamicFieldName", RelXml.HashString(DynamicFieldName)); RelXml.StringTag(sb, indent, "VoiceName", RelXml.HashString(VoiceName)); RelXml.StringTag(sb, indent, "ContextName", ContextName); } @@ -2607,12 +2617,14 @@ namespace CodeWalker.GameFiles { base.Write(bw); bw.Write(LastVariation); - bw.Write(SpeechUnkInt1); + bw.Write(DynamicFieldName); bw.Write(VoiceName); bw.Write(ContextName); } } - [TC(typeof(EXP))] public class Dat54OnStopSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54OnStopSound : Dat54Sound { public MetaHash ChildSound { get; set; } public MetaHash StopSound { get; set; } //plays once childsound is finished playing (enveloped or single sample, no loops) @@ -2653,7 +2665,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0, 4, 8 }; } } - [TC(typeof(EXP))] public class Dat54WrapperSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54WrapperSound : Dat54Sound { public MetaHash ChildSound { get; set; } //0x0-0x4 public int LastPlayTime { get; set; } //0x4-0x8 // maybe start delay? @@ -2752,7 +2766,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0, 8 }; } } - [TC(typeof(EXP))] public class Dat54SequentialSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SequentialSound : Dat54Sound { public Dat54SequentialSound(RelFile rel) : base(rel, Dat54SoundType.SequentialSound) { } @@ -2780,7 +2796,9 @@ namespace CodeWalker.GameFiles return GetChildSoundsHashTableOffsets(); } } - [TC(typeof(EXP))] public class Dat54StreamingSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54StreamingSound : Dat54Sound { public int Duration { get; set; } //0x0-0x4 @@ -2815,7 +2833,9 @@ namespace CodeWalker.GameFiles return GetChildSoundsHashTableOffsets(4); } } - [TC(typeof(EXP))] public class Dat54RetriggeredOverlappedSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54RetriggeredOverlappedSound : Dat54Sound { public short LoopCount { get; set; } //0x0-0x2 number of times to repeat. includes start and tail sounds if defined public ushort LoopCountVariance { get; set; } //0x2-0x4 variance of retrigger count @@ -2886,7 +2906,9 @@ namespace CodeWalker.GameFiles return new uint[] { 16, 20, 24 }; } } - [TC(typeof(EXP))] public class Dat54CrossfadeSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54CrossfadeSound : Dat54Sound { public MetaHash NearSound { get; set; } public MetaHash FarSound { get; set; } @@ -2976,7 +2998,9 @@ namespace CodeWalker.GameFiles return new[] { CrossfadeCurve }; } } - [TC(typeof(EXP))] public class Dat54CollapsingStereoSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54CollapsingStereoSound : Dat54Sound { public MetaHash LeftSound { get; set; } public MetaHash RightSound { get; set; } @@ -2985,10 +3009,10 @@ namespace CodeWalker.GameFiles public MetaHash MinDistanceVariable { get; set; } //0x10-0x14 public MetaHash MaxDistanceVariable { get; set; } //0x14-0x18 public MetaHash CrossfadeOverrideVariable { get; set; } //0x18-0x1C - public MetaHash ParameterHash3 { get; set; } //0x1C-0x20 - public MetaHash ParameterHash4 { get; set; } //0x20-0x24 - public float UnkFloat { get; set; } //0x24-0x28 - public MetaHash ParameterHash5 { get; set; } //0x28-0x2C + public MetaHash FrontendLeftPanVariable { get; set; } //0x1C-0x20 + public MetaHash FrontendRightPanVariable { get; set; } //0x20-0x24 + public float PositionRelativePanDamping { get; set; } //0x24-0x28 + public MetaHash PositionRelativePanDampingVariable { get; set; } //0x28-0x2C public byte Mode { get; set; } //0x2c-0x2D public Dat54CollapsingStereoSound(RelFile rel) : base(rel, Dat54SoundType.CollapsingStereoSound) @@ -3003,10 +3027,10 @@ namespace CodeWalker.GameFiles MinDistanceVariable = br.ReadUInt32(); //0x10 MaxDistanceVariable = br.ReadUInt32(); //0x14 CrossfadeOverrideVariable = br.ReadUInt32(); //0x18 - ParameterHash3 = br.ReadUInt32(); //0x1C - ParameterHash4 = br.ReadUInt32(); //0x20 - UnkFloat = br.ReadSingle(); //0x24-0x28 - ParameterHash5 = br.ReadUInt32(); //0x28-0x2C + FrontendLeftPanVariable = br.ReadUInt32(); //0x1C + FrontendRightPanVariable = br.ReadUInt32(); //0x20 + PositionRelativePanDamping = br.ReadSingle(); //0x24-0x28 + PositionRelativePanDampingVariable = br.ReadUInt32(); //0x28-0x2C Mode = br.ReadByte(); //0x2C-0x2D } public override void ReadXml(XmlNode node) @@ -3019,10 +3043,10 @@ namespace CodeWalker.GameFiles MinDistanceVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "MinDistanceVariable")); MaxDistanceVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "MaxDistanceVariable")); CrossfadeOverrideVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "CrossfadeOverrideVariable")); - ParameterHash3 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParameterHash3")); - ParameterHash4 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParameterHash4")); - UnkFloat = Xml.GetChildFloatAttribute(node, "UnkFloat", "value"); - ParameterHash5 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParameterHash5")); + FrontendLeftPanVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "FrontendLeftPanVariable")); + FrontendRightPanVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "FrontendRightPanVariable")); + PositionRelativePanDamping = Xml.GetChildFloatAttribute(node, "PositionRelativePanDamping", "value"); + PositionRelativePanDampingVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "PositionRelativePanDampingVariable")); Mode = (byte)Xml.GetChildUIntAttribute(node, "Mode", "value"); } public override void WriteXml(StringBuilder sb, int indent) @@ -3035,10 +3059,10 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "MinDistanceVariable", RelXml.HashString(MinDistanceVariable)); RelXml.StringTag(sb, indent, "MaxDistanceVariable", RelXml.HashString(MaxDistanceVariable)); RelXml.StringTag(sb, indent, "CrossfadeOverrideVariable", RelXml.HashString(CrossfadeOverrideVariable)); - RelXml.StringTag(sb, indent, "ParameterHash3", RelXml.HashString(ParameterHash3)); - RelXml.StringTag(sb, indent, "ParameterHash4", RelXml.HashString(ParameterHash4)); - RelXml.ValueTag(sb, indent, "UnkFloat", FloatUtil.ToString(UnkFloat)); - RelXml.StringTag(sb, indent, "ParameterHash5", RelXml.HashString(ParameterHash5)); + RelXml.StringTag(sb, indent, "FrontendLeftPanVariable", RelXml.HashString(FrontendLeftPanVariable)); + RelXml.StringTag(sb, indent, "FrontendRightPanVariable", RelXml.HashString(FrontendRightPanVariable)); + RelXml.ValueTag(sb, indent, "PositionRelativePanDamping", FloatUtil.ToString(PositionRelativePanDamping)); + RelXml.StringTag(sb, indent, "PositionRelativePanDampingVariable", RelXml.HashString(PositionRelativePanDampingVariable)); RelXml.ValueTag(sb, indent, "Mode", Mode.ToString()); } public override void Write(BinaryWriter bw) @@ -3051,10 +3075,10 @@ namespace CodeWalker.GameFiles bw.Write(MinDistanceVariable); //0x10 bw.Write(MaxDistanceVariable); //0x14 bw.Write(CrossfadeOverrideVariable); //0x18 - bw.Write(ParameterHash3); //0x1C - bw.Write(ParameterHash4); //0x20 - bw.Write(UnkFloat); //0x24-0x28 - bw.Write(ParameterHash5); //0x28-0x2C + bw.Write(FrontendLeftPanVariable); //0x1C + bw.Write(FrontendRightPanVariable); //0x20 + bw.Write(PositionRelativePanDamping); //0x24-0x28 + bw.Write(PositionRelativePanDampingVariable); //0x28-0x2C bw.Write(Mode); //0x2C-0x2D } public override uint[] GetHashTableOffsets() @@ -3062,7 +3086,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0, 4 }; } } - [TC(typeof(EXP))] public class Dat54SimpleSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SimpleSound : Dat54Sound { public MetaHash ContainerName { get; set; } //Relative path to parent wave container (i.e. "RESIDENT/animals") public MetaHash FileName { get; set; } //Name of the .wav file @@ -3105,7 +3131,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54MultitrackSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54MultitrackSound : Dat54Sound { public Dat54MultitrackSound(RelFile rel) : base(rel, Dat54SoundType.MultitrackSound) { } @@ -3133,7 +3161,9 @@ namespace CodeWalker.GameFiles return GetChildSoundsHashTableOffsets(); } } - [TC(typeof(EXP))] public class Dat54RandomizedSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54RandomizedSound : Dat54Sound { public byte HistoryIndex { get; set; } //0x0-0x1 retricts the randomization range? public byte HistorySpaceCount { get; set; } //0x1-0x2 @@ -3229,7 +3259,9 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat54EnvironmentSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54EnvironmentSound : Dat54Sound { public byte ChannelID { get; set; } @@ -3257,7 +3289,9 @@ namespace CodeWalker.GameFiles bw.Write(ChannelID); } } - [TC(typeof(EXP))] public class Dat54DynamicEntitySound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54DynamicEntitySound : Dat54Sound { public byte EntitiesCount { get; set; } public MetaHash[] Entities { get; set; } @@ -3294,7 +3328,9 @@ namespace CodeWalker.GameFiles } } } - [TC(typeof(EXP))] public class Dat54SequentialOverlapSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SequentialOverlapSound : Dat54Sound { public ushort DelayTime { get; set; } public MetaHash DelayTimeVariable { get; set; } //0x2-0x6 @@ -3341,12 +3377,14 @@ namespace CodeWalker.GameFiles return GetChildSoundsHashTableOffsets(10); } } - [TC(typeof(EXP))] public class Dat54ModularSynthSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54ModularSynthSound : Dat54Sound { public MetaHash SynthSound { get; set; } //0x0-0x4 public MetaHash SynthPreset { get; set; } //0x4-0x8 public float PlaybackTimeLimit { get; set; } //0x8-0xC - public int UnkInt { get; set; } //0xC-0x10 + public int VirtualisationMode { get; set; } //0xC-0x10 public int TrackCount { get; set; } public int ExposedVariablesCount { get; set; } public Dat54ModularSynthSoundVariable[] ExposedVariables { get; set; } //0x28-.. @@ -3358,7 +3396,7 @@ namespace CodeWalker.GameFiles SynthSound = br.ReadUInt32(); //0x0-0x4 SynthPreset = br.ReadUInt32(); //0x4-0x8 PlaybackTimeLimit = br.ReadSingle(); //0x8-0xC - UnkInt = br.ReadInt32(); //0xC-0x10 + VirtualisationMode = br.ReadInt32(); //0xC-0x10 TrackCount = br.ReadInt32(); //0x10-0x14 ChildSoundsHashes = new MetaHash[4]; for (int i = 0; i < 4; i++) @@ -3378,7 +3416,7 @@ namespace CodeWalker.GameFiles SynthSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SynthSound")); SynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "SynthPreset")); PlaybackTimeLimit = Xml.GetChildFloatAttribute(node, "PlaybackTimeLimit", "value"); - UnkInt = Xml.GetChildIntAttribute(node, "UnkInt", "value"); + VirtualisationMode = Xml.GetChildIntAttribute(node, "VirtualisationMode", "value"); TrackCount = Xml.GetChildIntAttribute(node, "TrackCount", "value"); ReadChildSoundsXml(node, "EnvironmentSounds"); ExposedVariables = XmlRel.ReadItemArray(node, "ExposedVariables"); @@ -3390,7 +3428,7 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "SynthSound", RelXml.HashString(SynthSound)); RelXml.StringTag(sb, indent, "SynthPreset", RelXml.HashString(SynthPreset)); RelXml.ValueTag(sb, indent, "PlaybackTimeLimit", FloatUtil.ToString(PlaybackTimeLimit)); - RelXml.ValueTag(sb, indent, "UnkInt", UnkInt.ToString()); + RelXml.ValueTag(sb, indent, "VirtualisationMode", VirtualisationMode.ToString()); RelXml.ValueTag(sb, indent, "TrackCount", TrackCount.ToString()); WriteChildSoundsXml(sb, indent, "EnvironmentSounds"); RelXml.WriteItemArray(sb, ExposedVariables, indent, "ExposedVariables"); @@ -3401,7 +3439,7 @@ namespace CodeWalker.GameFiles bw.Write(SynthSound); //0x0-0x4 bw.Write(SynthPreset); //0x4-0x8 bw.Write(PlaybackTimeLimit); //0x8-0xC - bw.Write(UnkInt); //0xC-0x10 + bw.Write(VirtualisationMode); //0xC-0x10 bw.Write(TrackCount); //0x10-0x14 for (int i = 0; i < 4; i++) { @@ -3427,7 +3465,8 @@ namespace CodeWalker.GameFiles return new[] { SynthSound, SynthPreset }; } } - [TC(typeof(EXP))] public class Dat54ModularSynthSoundVariable : IMetaXmlItem + [TC(typeof(EXP))] + public class Dat54ModularSynthSoundVariable : IMetaXmlItem { public MetaHash VariableName { get; set; } public MetaHash ParameterName { get; set; } @@ -3464,7 +3503,9 @@ namespace CodeWalker.GameFiles return VariableName.ToString() + ": " + ParameterName.ToString() + ": " + FloatUtil.ToString(Value); } } - [TC(typeof(EXP))] public class Dat54GranularSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54GranularSound : Dat54Sound { public int WaveSlotIndex { get; set; } //0x0-0x4 public Dat54GranularSoundFile Channel0 { get; set; } @@ -3479,8 +3520,8 @@ namespace CodeWalker.GameFiles public Dat54GranularSoundData ChannelSettings3 { get; set; } //0x4C-0x54 public Dat54GranularSoundData ChannelSettings4 { get; set; } //0x54-0x5C public Dat54GranularSoundData ChannelSettings5 { get; set; } //0x5C-0x64 - public float UnkFloat0 { get; set; } //0x64-0x68 - public float UnkFloat1 { get; set; } //0x68-0x6C + public float LoopRandomisationChangeRate { get; set; } //0x64-0x68 + public float LoopRandomisationPitchFraction { get; set; } //0x68-0x6C public short ChannelVolume0 { get; set; } //0x6C-0x6E public short ChannelVolume1 { get; set; } //0x6E-0x70 public short ChannelVolume2 { get; set; } //0x70-0x72 @@ -3520,8 +3561,8 @@ namespace CodeWalker.GameFiles ChannelSettings4 = new Dat54GranularSoundData(br); ChannelSettings5 = new Dat54GranularSoundData(br); - UnkFloat0 = br.ReadSingle(); - UnkFloat1 = br.ReadSingle(); + LoopRandomisationChangeRate = br.ReadSingle(); + LoopRandomisationPitchFraction = br.ReadSingle(); ChannelVolume0 = br.ReadInt16(); ChannelVolume1 = br.ReadInt16(); ChannelVolume2 = br.ReadInt16(); @@ -3556,8 +3597,8 @@ namespace CodeWalker.GameFiles ChannelSettings3 = new Dat54GranularSoundData(node, "ChannelSettings3"); ChannelSettings4 = new Dat54GranularSoundData(node, "ChannelSettings4"); ChannelSettings5 = new Dat54GranularSoundData(node, "ChannelSettings5"); - UnkFloat0 = Xml.GetChildFloatAttribute(node, "UnkFloat0", "value"); - UnkFloat1 = Xml.GetChildFloatAttribute(node, "UnkFloat1", "value"); + LoopRandomisationChangeRate = Xml.GetChildFloatAttribute(node, "LoopRandomisationChangeRate", "value"); + LoopRandomisationPitchFraction = Xml.GetChildFloatAttribute(node, "LoopRandomisationPitchFraction", "value"); ChannelVolume0 = (short)Xml.GetChildIntAttribute(node, "ChannelVolume0", "value"); ChannelVolume1 = (short)Xml.GetChildIntAttribute(node, "ChannelVolume1", "value"); ChannelVolume2 = (short)Xml.GetChildIntAttribute(node, "ChannelVolume2", "value"); @@ -3584,8 +3625,8 @@ namespace CodeWalker.GameFiles ChannelSettings3.WriteXml(sb, indent, "ChannelSettings3"); ChannelSettings4.WriteXml(sb, indent, "ChannelSettings4"); ChannelSettings5.WriteXml(sb, indent, "ChannelSettings5"); - RelXml.ValueTag(sb, indent, "UnkFloat0", FloatUtil.ToString(UnkFloat0)); - RelXml.ValueTag(sb, indent, "UnkFloat1", FloatUtil.ToString(UnkFloat1)); + RelXml.ValueTag(sb, indent, "LoopRandomisationChangeRate", FloatUtil.ToString(LoopRandomisationChangeRate)); + RelXml.ValueTag(sb, indent, "LoopRandomisationPitchFraction", FloatUtil.ToString(LoopRandomisationPitchFraction)); RelXml.ValueTag(sb, indent, "ChannelVolume0", ChannelVolume0.ToString()); RelXml.ValueTag(sb, indent, "ChannelVolume1", ChannelVolume1.ToString()); RelXml.ValueTag(sb, indent, "ChannelVolume2", ChannelVolume2.ToString()); @@ -3615,8 +3656,8 @@ namespace CodeWalker.GameFiles ChannelSettings4.Write(bw); ChannelSettings5.Write(bw); - bw.Write(UnkFloat0); - bw.Write(UnkFloat1); + bw.Write(LoopRandomisationChangeRate); + bw.Write(LoopRandomisationPitchFraction); bw.Write(ChannelVolume0); bw.Write(ChannelVolume1); bw.Write(ChannelVolume2); @@ -3642,7 +3683,9 @@ namespace CodeWalker.GameFiles return new uint[] { 4, 12, 20, 28, 36, 44 }; } } - [TC(typeof(EXP))] public class Dat54GranularSoundFile + + [TC(typeof(EXP))] + public class Dat54GranularSoundFile { public MetaHash ContainerName { get; set; } //0x0-0x4 public MetaHash FileName { get; set; } //0x4-0x8 @@ -3680,13 +3723,15 @@ namespace CodeWalker.GameFiles return ContainerName.ToString() + ": " + FileName.ToString(); } } - [TC(typeof(EXP))] public class Dat54GranularSoundData + + [TC(typeof(EXP))] + public class Dat54GranularSoundData { - public byte UnkFlags0 { get; set; } //0x0-0x1 - public byte UnkFlags1 { get; set; } //0x1-0x2 - public byte UnkByte0 { get; set; } //0x2-0x3 - public byte UnkByte1 { get; set; } //0x3-0x4 - public float UnkFloat { get; set; } //0x4-0x8 + public byte OutputBuffer { get; set; } //0x0-0x1 + public byte GranularClockIndex { get; set; } //0x1-0x2 + public byte StretchToMinPitch { get; set; } //0x2-0x3 + public byte StretchToMaxPitch { get; set; } //0x3-0x4 + public float MaxLoopProportion { get; set; } //0x4-0x8 public Dat54GranularSoundData(XmlNode node, string varName) { @@ -3694,46 +3739,48 @@ namespace CodeWalker.GameFiles } public Dat54GranularSoundData(BinaryReader br) { - UnkFlags0 = br.ReadByte(); - UnkFlags1 = br.ReadByte(); - UnkByte0 = br.ReadByte(); - UnkByte1 = br.ReadByte(); - UnkFloat = br.ReadSingle(); + OutputBuffer = br.ReadByte(); + GranularClockIndex = br.ReadByte(); + StretchToMinPitch = br.ReadByte(); + StretchToMaxPitch = br.ReadByte(); + MaxLoopProportion = br.ReadSingle(); } public void ReadXml(XmlNode node, string varName) { var cnode = node.SelectSingleNode(varName); - UnkFlags0 = (byte)Xml.GetChildIntAttribute(cnode, "UnkFlags0", "value"); - UnkFlags1 = (byte)Xml.GetChildIntAttribute(cnode, "UnkFlags1", "value"); - UnkByte0 = (byte)Xml.GetChildIntAttribute(cnode, "UnkByte0", "value"); - UnkByte1 = (byte)Xml.GetChildIntAttribute(cnode, "UnkByte1", "value"); - UnkFloat = Xml.GetChildFloatAttribute(cnode, "UnkFloat", "value"); + OutputBuffer = (byte)Xml.GetChildIntAttribute(cnode, "OutputBuffer", "value"); + GranularClockIndex = (byte)Xml.GetChildIntAttribute(cnode, "GranularClockIndex", "value"); + StretchToMinPitch = (byte)Xml.GetChildIntAttribute(cnode, "StretchToMinPitch", "value"); + StretchToMaxPitch = (byte)Xml.GetChildIntAttribute(cnode, "StretchToMaxPitch", "value"); + MaxLoopProportion = Xml.GetChildFloatAttribute(cnode, "MaxLoopProportion", "value"); } public void WriteXml(StringBuilder sb, int indent, string varName) { var cind = indent + 1; RelXml.OpenTag(sb, indent, varName); - RelXml.ValueTag(sb, cind, "UnkFlags0", UnkFlags0.ToString()); - RelXml.ValueTag(sb, cind, "UnkFlags1", UnkFlags1.ToString()); - RelXml.ValueTag(sb, cind, "UnkByte0", UnkByte0.ToString()); - RelXml.ValueTag(sb, cind, "UnkByte1", UnkByte1.ToString()); - RelXml.ValueTag(sb, cind, "UnkFloat", FloatUtil.ToString(UnkFloat)); + RelXml.ValueTag(sb, cind, "OutputBuffer", OutputBuffer.ToString()); + RelXml.ValueTag(sb, cind, "GranularClockIndex", GranularClockIndex.ToString()); + RelXml.ValueTag(sb, cind, "StretchToMinPitch", StretchToMinPitch.ToString()); + RelXml.ValueTag(sb, cind, "StretchToMaxPitch", StretchToMaxPitch.ToString()); + RelXml.ValueTag(sb, cind, "MaxLoopProportion", FloatUtil.ToString(MaxLoopProportion)); RelXml.CloseTag(sb, indent, varName); } public void Write(BinaryWriter bw) { - bw.Write(UnkFlags0); - bw.Write(UnkFlags1); - bw.Write(UnkByte0); - bw.Write(UnkByte1); - bw.Write(UnkFloat); + bw.Write(OutputBuffer); + bw.Write(GranularClockIndex); + bw.Write(StretchToMinPitch); + bw.Write(StretchToMaxPitch); + bw.Write(MaxLoopProportion); } public override string ToString() { - return UnkFlags0.ToString() + ": " + UnkFlags1.ToString() + ": " + UnkByte0.ToString() + ": " + UnkByte1.ToString() + ": " + FloatUtil.ToString(UnkFloat); + return OutputBuffer.ToString() + ": " + GranularClockIndex.ToString() + ": " + StretchToMinPitch.ToString() + ": " + StretchToMaxPitch.ToString() + ": " + FloatUtil.ToString(MaxLoopProportion); } } - [TC(typeof(EXP))] public class Dat54DirectionalSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54DirectionalSound : Dat54Sound { public MetaHash ChildSound { get; set; } public float InnerAngle { get; set; } //0x4-0x8 @@ -3789,7 +3836,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54KineticSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54KineticSound : Dat54Sound { public MetaHash ChildSound { get; set; } public float Mass { get; set; } //according to GDC presentation @@ -3835,7 +3884,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54SwitchSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SwitchSound : Dat54Sound { public MetaHash Variable { get; set; } //0x0-0x4 @@ -3870,7 +3921,9 @@ namespace CodeWalker.GameFiles return GetChildSoundsHashTableOffsets(4); } } - [TC(typeof(EXP))] public class Dat54VariableCurveSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54VariableCurveSound : Dat54Sound { public MetaHash ChildSound { get; set; } public MetaHash InputVariable { get; set; } //0x4-0x8 @@ -3920,7 +3973,9 @@ namespace CodeWalker.GameFiles return new[] { Curve }; } } - [TC(typeof(EXP))] public class Dat54VariablePrintValueSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54VariablePrintValueSound : Dat54Sound { public MetaHash Variable { get; set; } //0x0-0x4 public string Value { get; set; } @@ -3951,7 +4006,9 @@ namespace CodeWalker.GameFiles bw.Write(Value); } } - [TC(typeof(EXP))] public class Dat54VariableBlockSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54VariableBlockSound : Dat54Sound { public MetaHash ChildSound { get; set; } public byte VariableCount { get; set; } @@ -3998,7 +4055,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54VariableData : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54VariableData : IMetaXmlItem { public MetaHash Name { get; set; } public float Value { get; set; } //the value this variable is set to. @@ -4040,14 +4099,16 @@ namespace CodeWalker.GameFiles return Name + ": " + FloatUtil.ToString(Value) + ": " + FloatUtil.ToString(ValueVariance) + ": " + VariableType.ToString(); } } - [TC(typeof(EXP))] public class Dat54IfSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54IfSound : Dat54Sound { public MetaHash TrueSound { get; set; } //sound played if the condition is true public MetaHash FalseSound { get; set; } //sound played if the condition is false/invalid public MetaHash ConditionVariable { get; set; } //the parameter used to make the choise public byte ConditionType { get; set; } //equal to, less than, greater than, etc... public float ConditionValue { get; set; } //the value its comparing the parameter to. - public MetaHash IfParameterHash1 { get; set; } //? + public MetaHash RHS { get; set; } //right hand side, fallback public Dat54IfSound(RelFile rel) : base(rel, Dat54SoundType.IfSound) { } @@ -4059,7 +4120,7 @@ namespace CodeWalker.GameFiles ConditionVariable = br.ReadUInt32(); ConditionType = br.ReadByte(); ConditionValue = br.ReadSingle(); - IfParameterHash1 = br.ReadUInt32(); + RHS = br.ReadUInt32(); } public override void ReadXml(XmlNode node) { @@ -4069,7 +4130,7 @@ namespace CodeWalker.GameFiles ConditionVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "ConditionVariable")); ConditionType = (byte)Xml.GetChildIntAttribute(node, "ConditionType", "value"); ConditionValue = Xml.GetChildFloatAttribute(node, "ConditionValue", "value"); - IfParameterHash1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "IfParameterHash1")); + RHS = XmlRel.GetHash(Xml.GetChildInnerText(node, "RHS")); } public override void WriteXml(StringBuilder sb, int indent) { @@ -4079,7 +4140,7 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "ConditionVariable", RelXml.HashString(ConditionVariable)); RelXml.ValueTag(sb, indent, "ConditionType", ConditionType.ToString()); RelXml.ValueTag(sb, indent, "ConditionValue", FloatUtil.ToString(ConditionValue)); - RelXml.StringTag(sb, indent, "IfParameterHash1", RelXml.HashString(IfParameterHash1)); + RelXml.StringTag(sb, indent, "RHS", RelXml.HashString(RHS)); } public override void Write(BinaryWriter bw) { @@ -4089,14 +4150,16 @@ namespace CodeWalker.GameFiles bw.Write(ConditionVariable); bw.Write(ConditionType); bw.Write(ConditionValue); - bw.Write(IfParameterHash1); + bw.Write(RHS); } public override uint[] GetHashTableOffsets() { return new uint[] { 0, 4 }; } } - [TC(typeof(EXP))] public class Dat54MathOperationSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54MathOperationSound : Dat54Sound { public MetaHash ChildSound { get; set; } public byte OperationsCount { get; set; } @@ -4143,7 +4206,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54MathOperationSoundData : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54MathOperationSoundData : IMetaXmlItem { public byte OperationType { get; set; } //0x0-0x1 public float InputImmediate1 { get; set; } //0x1-0x5 @@ -4205,7 +4270,9 @@ namespace CodeWalker.GameFiles return InputParameter3.ToString() + ", " + OutputParameter.ToString(); } } - [TC(typeof(EXP))] public class Dat54ParameterTransformSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54ParameterTransformSound : Dat54Sound { public MetaHash ChildSound { get; set; } public int ParameterTransformsCount { get; set; } @@ -4252,7 +4319,9 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } - [TC(typeof(EXP))] public class Dat54ParameterTransformSoundData : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54ParameterTransformSoundData : IMetaXmlItem { public MetaHash InputParameter { get; set; } //0x0-0x4 public float InputRangeMin { get; set; } //0x4-0x8 @@ -4305,7 +4374,9 @@ namespace CodeWalker.GameFiles return InputParameter.ToString() + ", " + TransformsCount.ToString(); } } - [TC(typeof(EXP))] public class Dat54ParameterTransformSoundData2 : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54ParameterTransformSoundData2 : IMetaXmlItem { public float SmoothRate { get; set; } //0x0-0x4 public int TransformType { get; set; } //0x4 //type of transform; volume, pitch, etc @@ -4369,7 +4440,9 @@ namespace CodeWalker.GameFiles return TransformTypeParameter.ToString() + ", " + VectorCount.ToString(); } } - [TC(typeof(EXP))] public class Dat54FluctuatorSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54FluctuatorSound : Dat54Sound { public MetaHash ChildSound { get; set; } public int FluctuatorsCount { get; set; } @@ -4416,99 +4489,102 @@ namespace CodeWalker.GameFiles return new uint[] { 0 }; } } + [TC(typeof(EXP))] public class Dat54FluctuatorSoundData : IMetaXmlItem { - public byte FluctuatorType { get; set; } //0x0-0x1 //type of fluctuator; probability-based, time-based - public byte UnkByte1 { get; set; } //0x1-0x2 - public MetaHash ParameterHash { get; set; } //0x2-0x6 - public float UnkFloat00 { get; set; } //0x6-0xA - public float UnkFloat01 { get; set; } //0xA-0xE - public float UnkFloat02 { get; set; } //0xE-0x12 - public float UnkFloat03 { get; set; } //0x12-0x16 - public float UnkFloat04 { get; set; } //0x16-0x1A - public float UnkFloat05 { get; set; } //0x1A-0x1E - public float UnkFloat06 { get; set; } //0x1E-0x22 - public float UnkFloat07 { get; set; } //0x22-0x26 - public float UnkFloat08 { get; set; } //0x26-0x2A - public float UnkFloat09 { get; set; } //0x2A-0x2E - public float UnkFloat10 { get; set; } //0x2E-0x32 + public byte Mode { get; set; } //0x0-0x1 //type of fluctuator; probability-based, time-based + public byte Destination { get; set; } //0x1-0x2 + public MetaHash OutputVariable { get; set; } //0x2-0x6 + public float IncreaseRate { get; set; } //0x6-0xA + public float DecreaseRate { get; set; } //0xA-0xE + public float BandOneMinimum { get; set; } //0xE-0x12 + public float BandOneMaximum { get; set; } //0x12-0x16 + public float BandTwoMinimum { get; set; } //0x16-0x1A + public float BandTwoMaximum { get; set; } //0x1A-0x1E + public float IntraBandFlipProbabilty { get; set; } //0x1E-0x22 + public float InterBandFlipProbabilty { get; set; } //0x22-0x26 + public float MinSwitchTime { get; set; } //0x26-0x2A + public float MaxSwitchTime { get; set; } //0x2A-0x2E + public float InitialValue { get; set; } //0x2E-0x32 public Dat54FluctuatorSoundData() { } public Dat54FluctuatorSoundData(BinaryReader br) { - FluctuatorType = br.ReadByte(); - UnkByte1 = br.ReadByte(); - ParameterHash = br.ReadUInt32(); - UnkFloat00 = br.ReadSingle(); - UnkFloat01 = br.ReadSingle(); - UnkFloat02 = br.ReadSingle(); - UnkFloat03 = br.ReadSingle(); - UnkFloat04 = br.ReadSingle(); - UnkFloat05 = br.ReadSingle(); - UnkFloat06 = br.ReadSingle(); - UnkFloat07 = br.ReadSingle(); - UnkFloat08 = br.ReadSingle(); - UnkFloat09 = br.ReadSingle(); - UnkFloat10 = br.ReadSingle(); + Mode = br.ReadByte(); + Destination = br.ReadByte(); + OutputVariable = br.ReadUInt32(); + IncreaseRate = br.ReadSingle(); + DecreaseRate = br.ReadSingle(); + BandOneMinimum = br.ReadSingle(); + BandOneMaximum = br.ReadSingle(); + BandTwoMinimum = br.ReadSingle(); + BandTwoMaximum = br.ReadSingle(); + IntraBandFlipProbabilty = br.ReadSingle(); + InterBandFlipProbabilty = br.ReadSingle(); + MinSwitchTime = br.ReadSingle(); + MaxSwitchTime = br.ReadSingle(); + InitialValue = br.ReadSingle(); } public void ReadXml(XmlNode node) { - FluctuatorType = (byte)Xml.GetChildIntAttribute(node, "FluctuatorType", "value"); - UnkByte1 = (byte)Xml.GetChildIntAttribute(node, "UnkByte1", "value"); - ParameterHash = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParameterHash")); - UnkFloat00 = Xml.GetChildFloatAttribute(node, "UnkFloat00", "value"); - UnkFloat01 = Xml.GetChildFloatAttribute(node, "UnkFloat01", "value"); - UnkFloat02 = Xml.GetChildFloatAttribute(node, "UnkFloat02", "value"); - UnkFloat03 = Xml.GetChildFloatAttribute(node, "UnkFloat03", "value"); - UnkFloat04 = Xml.GetChildFloatAttribute(node, "UnkFloat04", "value"); - UnkFloat05 = Xml.GetChildFloatAttribute(node, "UnkFloat05", "value"); - UnkFloat06 = Xml.GetChildFloatAttribute(node, "UnkFloat06", "value"); - UnkFloat07 = Xml.GetChildFloatAttribute(node, "UnkFloat07", "value"); - UnkFloat08 = Xml.GetChildFloatAttribute(node, "UnkFloat08", "value"); - UnkFloat09 = Xml.GetChildFloatAttribute(node, "UnkFloat09", "value"); - UnkFloat10 = Xml.GetChildFloatAttribute(node, "UnkFloat10", "value"); + Mode = (byte)Xml.GetChildIntAttribute(node, "Mode", "value"); + Destination = (byte)Xml.GetChildIntAttribute(node, "Destination", "value"); + OutputVariable = XmlRel.GetHash(Xml.GetChildInnerText(node, "OutputVariable")); + IncreaseRate = Xml.GetChildFloatAttribute(node, "IncreaseRate", "value"); + DecreaseRate = Xml.GetChildFloatAttribute(node, "DecreaseRate", "value"); + BandOneMinimum = Xml.GetChildFloatAttribute(node, "BandOneMinimum", "value"); + BandOneMaximum = Xml.GetChildFloatAttribute(node, "BandOneMaximum", "value"); + BandTwoMinimum = Xml.GetChildFloatAttribute(node, "BandTwoMinimum", "value"); + BandTwoMaximum = Xml.GetChildFloatAttribute(node, "BandTwoMaximum", "value"); + IntraBandFlipProbabilty = Xml.GetChildFloatAttribute(node, "IntraBandFlipProbabilty", "value"); + InterBandFlipProbabilty = Xml.GetChildFloatAttribute(node, "InterBandFlipProbabilty", "value"); + MinSwitchTime = Xml.GetChildFloatAttribute(node, "MinSwitchTime", "value"); + MaxSwitchTime = Xml.GetChildFloatAttribute(node, "MaxSwitchTime", "value"); + InitialValue = Xml.GetChildFloatAttribute(node, "InitialValue", "value"); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "FluctuatorType", FluctuatorType.ToString()); - RelXml.ValueTag(sb, indent, "UnkByte1", UnkByte1.ToString()); - RelXml.StringTag(sb, indent, "ParameterHash", RelXml.HashString(ParameterHash)); - RelXml.ValueTag(sb, indent, "UnkFloat00", FloatUtil.ToString(UnkFloat00)); - RelXml.ValueTag(sb, indent, "UnkFloat01", FloatUtil.ToString(UnkFloat01)); - RelXml.ValueTag(sb, indent, "UnkFloat02", FloatUtil.ToString(UnkFloat02)); - RelXml.ValueTag(sb, indent, "UnkFloat03", FloatUtil.ToString(UnkFloat03)); - RelXml.ValueTag(sb, indent, "UnkFloat04", FloatUtil.ToString(UnkFloat04)); - RelXml.ValueTag(sb, indent, "UnkFloat05", FloatUtil.ToString(UnkFloat05)); - RelXml.ValueTag(sb, indent, "UnkFloat06", FloatUtil.ToString(UnkFloat06)); - RelXml.ValueTag(sb, indent, "UnkFloat07", FloatUtil.ToString(UnkFloat07)); - RelXml.ValueTag(sb, indent, "UnkFloat08", FloatUtil.ToString(UnkFloat08)); - RelXml.ValueTag(sb, indent, "UnkFloat09", FloatUtil.ToString(UnkFloat09)); - RelXml.ValueTag(sb, indent, "UnkFloat10", FloatUtil.ToString(UnkFloat10)); + RelXml.ValueTag(sb, indent, "Mode", Mode.ToString()); + RelXml.ValueTag(sb, indent, "Destination", Destination.ToString()); + RelXml.StringTag(sb, indent, "OutputVariable", RelXml.HashString(OutputVariable)); + RelXml.ValueTag(sb, indent, "IncreaseRate", FloatUtil.ToString(IncreaseRate)); + RelXml.ValueTag(sb, indent, "DecreaseRate", FloatUtil.ToString(DecreaseRate)); + RelXml.ValueTag(sb, indent, "BandOneMinimum", FloatUtil.ToString(BandOneMinimum)); + RelXml.ValueTag(sb, indent, "BandOneMaximum", FloatUtil.ToString(BandOneMaximum)); + RelXml.ValueTag(sb, indent, "BandTwoMinimum", FloatUtil.ToString(BandTwoMinimum)); + RelXml.ValueTag(sb, indent, "BandTwoMaximum", FloatUtil.ToString(BandTwoMaximum)); + RelXml.ValueTag(sb, indent, "IntraBandFlipProbabilty", FloatUtil.ToString(IntraBandFlipProbabilty)); + RelXml.ValueTag(sb, indent, "InterBandFlipProbabilty", FloatUtil.ToString(InterBandFlipProbabilty)); + RelXml.ValueTag(sb, indent, "MinSwitchTime", FloatUtil.ToString(MinSwitchTime)); + RelXml.ValueTag(sb, indent, "MaxSwitchTime", FloatUtil.ToString(MaxSwitchTime)); + RelXml.ValueTag(sb, indent, "InitialValue", FloatUtil.ToString(InitialValue)); } public void Write(BinaryWriter bw) { - bw.Write(FluctuatorType); - bw.Write(UnkByte1); - bw.Write(ParameterHash); - bw.Write(UnkFloat00); - bw.Write(UnkFloat01); - bw.Write(UnkFloat02); - bw.Write(UnkFloat03); - bw.Write(UnkFloat04); - bw.Write(UnkFloat05); - bw.Write(UnkFloat06); - bw.Write(UnkFloat07); - bw.Write(UnkFloat08); - bw.Write(UnkFloat09); - bw.Write(UnkFloat10); + bw.Write(Mode); + bw.Write(Destination); + bw.Write(OutputVariable); + bw.Write(IncreaseRate); + bw.Write(DecreaseRate); + bw.Write(BandOneMinimum); + bw.Write(BandOneMaximum); + bw.Write(BandTwoMinimum); + bw.Write(BandTwoMaximum); + bw.Write(IntraBandFlipProbabilty); + bw.Write(InterBandFlipProbabilty); + bw.Write(MinSwitchTime); + bw.Write(MaxSwitchTime); + bw.Write(InitialValue); } public override string ToString() { - return ParameterHash.ToString(); + return OutputVariable.ToString(); } } - [TC(typeof(EXP))] public class Dat54AutomationSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54AutomationSound : Dat54Sound { public MetaHash FallBackSound { get; set; } //fallback sound public float PlaybackRate { get; set; } //0x4-0x8 //rate at which the midi is played back, 1.0 default @@ -4589,7 +4665,9 @@ namespace CodeWalker.GameFiles return new uint[] { 20 }; } } - [TC(typeof(EXP))] public class Dat54AutomationSoundVariableOutput : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54AutomationSoundVariableOutput : IMetaXmlItem { public int Channel { get; set; } //0x0-0x1 public MetaHash Variable { get; set; } //0x2-0x6 @@ -4600,9 +4678,6 @@ namespace CodeWalker.GameFiles { Channel = br.ReadInt32(); Variable = br.ReadUInt32(); - - if (Channel != 0)//should be pack hash? - { } } public void ReadXml(XmlNode node) { @@ -4624,12 +4699,14 @@ namespace CodeWalker.GameFiles return Channel.ToString() + ", " + Variable.ToString(); } } - [TC(typeof(EXP))] public class Dat54ExternalStreamSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54ExternalStreamSound : Dat54Sound { - public MetaHash Unk0 { get; set; } - public MetaHash Unk1 { get; set; } - public MetaHash Unk2 { get; set; } - public MetaHash Unk3 { get; set; } + public MetaHash EnvironmentSound1 { get; set; } + public MetaHash EnvironmentSound2 { get; set; } + public MetaHash EnvironmentSound3 { get; set; } + public MetaHash EnvironmentSound4 { get; set; } public Dat54ExternalStreamSound(RelFile rel) : base(rel, Dat54SoundType.ExternalStreamSound) { } @@ -4637,66 +4714,37 @@ namespace CodeWalker.GameFiles { ReadChildSoundsHashes(br); - Unk0 = br.ReadUInt32(); - Unk1 = br.ReadUInt32(); + EnvironmentSound1 = br.ReadUInt32(); + EnvironmentSound2 = br.ReadUInt32(); if (ChildSoundsCount == 0) { - Unk2 = br.ReadUInt32(); - Unk3 = br.ReadUInt32(); - } - - if (br.BaseStream.Position != br.BaseStream.Length) - { - - //var bytes = new List(); - //while (br.BaseStream.Position < br.BaseStream.Length) - //{ - // byte b = br.ReadByte(); - // bytes.Add(b); - // if (b != 0) - // { }//no hits here - //} - ////var bytearr = bytes.ToArray(); - + EnvironmentSound3 = br.ReadUInt32(); + EnvironmentSound4 = br.ReadUInt32(); } } public override void ReadXml(XmlNode node) { base.ReadXml(node); ReadChildSoundsXml(node, "EnvironmentSounds"); - Unk0 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk0")); - Unk1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk1")); - if (ChildSoundsCount == 0) - { - Unk2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk2")); - Unk3 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk3")); - } } public override void WriteXml(StringBuilder sb, int indent) { base.WriteXml(sb, indent); WriteChildSoundsXml(sb, indent, "EnvironmentSounds"); - RelXml.StringTag(sb, indent, "Unk0", RelXml.HashString(Unk0)); - RelXml.StringTag(sb, indent, "Unk1", RelXml.HashString(Unk1)); - if (ChildSoundsCount == 0) - { - RelXml.StringTag(sb, indent, "Unk2", RelXml.HashString(Unk2)); - RelXml.StringTag(sb, indent, "Unk3", RelXml.HashString(Unk3)); - } } public override void Write(BinaryWriter bw) { base.Write(bw); WriteChildSoundsHashes(bw); - bw.Write(Unk0); - bw.Write(Unk1); + bw.Write(EnvironmentSound1); + bw.Write(EnvironmentSound2); if (ChildSoundsCount == 0) { - bw.Write(Unk2); - bw.Write(Unk3); + bw.Write(EnvironmentSound3); + bw.Write(EnvironmentSound4); } } @@ -4704,18 +4752,19 @@ namespace CodeWalker.GameFiles { var list = GetChildSoundsHashTableOffsets().ToList(); uint offs = (uint)list.Count * 4 + 1; - list.Add(offs);// Unk0 - list.Add(offs + 4);// Unk1 + list.Add(offs);// EnvironmentSound1 + list.Add(offs + 4);// EnvironmentSound2 if (ChildSoundsCount == 0) { - list.Add(offs + 8);// Unk2 - list.Add(offs + 12);// Unk3 + list.Add(offs + 8);// EnvironmentSound3 + list.Add(offs + 12);// EnvironmentSound4 } return list.ToArray(); - //return GetAudioTracksHashTableOffsets(); } } - [TC(typeof(EXP))] public class Dat54SoundSet : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SoundSet : Dat54Sound { public int SoundSetsCount { get; set; } public Dat54SoundSetItem[] SoundSets { get; set; } @@ -4768,7 +4817,9 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat54SoundSetItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54SoundSetItem : IMetaXmlItem { public MetaHash ScriptName { get; set; } public MetaHash ChildSound { get; set; } @@ -4800,97 +4851,103 @@ namespace CodeWalker.GameFiles return ScriptName.ToString() + ": " + ChildSound.ToString(); } } - [TC(typeof(EXP))] public class Dat54AutomationNoteMapSound : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54AutomationNoteMapSound : Dat54Sound { - public byte MapsCount { get; set; } - public Dat54AutomationNoteMapSoundData[] Maps { get; set; } + public byte RangesCount { get; set; } + public Dat54AutomationNoteMapSoundData[] Ranges { get; set; } public Dat54AutomationNoteMapSound(RelFile rel) : base(rel, Dat54SoundType.AutomationNoteMapSound) { } public Dat54AutomationNoteMapSound(RelData d, BinaryReader br) : base(d, br) { - MapsCount = br.ReadByte(); - Maps = new Dat54AutomationNoteMapSoundData[MapsCount]; - ChildSoundsHashes = new MetaHash[MapsCount]; - for (int i = 0; i < MapsCount; i++) + RangesCount = br.ReadByte(); + Ranges = new Dat54AutomationNoteMapSoundData[RangesCount]; + ChildSoundsHashes = new MetaHash[RangesCount]; + for (int i = 0; i < RangesCount; i++) { - Maps[i] = new Dat54AutomationNoteMapSoundData(br); - ChildSoundsHashes[i] = Maps[i].ChildSound;// br.ReadUInt32(); + Ranges[i] = new Dat54AutomationNoteMapSoundData(br); + ChildSoundsHashes[i] = Ranges[i].ChildSound;// br.ReadUInt32(); } } public override void ReadXml(XmlNode node) { base.ReadXml(node); - Maps = XmlRel.ReadItemArray(node, "Maps"); - MapsCount = (byte)(Maps?.Length ?? 0); + Ranges = XmlRel.ReadItemArray(node, "Ranges"); + RangesCount = (byte)(Ranges?.Length ?? 0); } public override void WriteXml(StringBuilder sb, int indent) { base.WriteXml(sb, indent); - RelXml.WriteItemArray(sb, Maps, indent, "Maps"); + RelXml.WriteItemArray(sb, Ranges, indent, "Ranges"); } public override void Write(BinaryWriter bw) { base.Write(bw); - bw.Write(MapsCount); - for (int i = 0; i < MapsCount; i++) + bw.Write(RangesCount); + for (int i = 0; i < RangesCount; i++) { - Maps[i].Write(bw); + Ranges[i].Write(bw); } } public override uint[] GetHashTableOffsets() { var offsets = new List(); - for (uint i = 0; i < MapsCount; i++) + for (uint i = 0; i < RangesCount; i++) { offsets.Add(4 + i * 7); } return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat54AutomationNoteMapSoundData : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat54AutomationNoteMapSoundData : IMetaXmlItem { - public byte NoteRangeMin { get; set; } - public byte NoteRangeMax { get; set; } - public byte NoteRangeType { get; set; } + public byte FirstNoteID { get; set; } + public byte LastNoteID { get; set; } + public byte Mode { get; set; } public MetaHash ChildSound { get; set; } public Dat54AutomationNoteMapSoundData() { } public Dat54AutomationNoteMapSoundData(BinaryReader br) { - NoteRangeMin = br.ReadByte(); - NoteRangeMax = br.ReadByte(); - NoteRangeType = br.ReadByte(); + FirstNoteID = br.ReadByte(); + LastNoteID = br.ReadByte(); + Mode = br.ReadByte(); ChildSound = br.ReadUInt32(); } public void ReadXml(XmlNode node) { - NoteRangeMin = (byte)Xml.GetChildIntAttribute(node, "NoteRangeMin", "value"); - NoteRangeMax = (byte)Xml.GetChildIntAttribute(node, "NoteRangeMax", "value"); - NoteRangeType = (byte)Xml.GetChildIntAttribute(node, "NoteRangeType", "value"); + FirstNoteID = (byte)Xml.GetChildIntAttribute(node, "FirstNoteID", "value"); + LastNoteID = (byte)Xml.GetChildIntAttribute(node, "LastNoteID", "value"); + Mode = (byte)Xml.GetChildIntAttribute(node, "Mode", "value"); ChildSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound")); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "NoteRangeMin", NoteRangeMin.ToString()); - RelXml.ValueTag(sb, indent, "NoteRangeMax", NoteRangeMax.ToString()); - RelXml.ValueTag(sb, indent, "NoteRangeType", NoteRangeType.ToString()); + RelXml.ValueTag(sb, indent, "FirstNoteID", FirstNoteID.ToString()); + RelXml.ValueTag(sb, indent, "LastNoteID", LastNoteID.ToString()); + RelXml.ValueTag(sb, indent, "Mode", Mode.ToString()); RelXml.StringTag(sb, indent, "ChildSound", RelXml.HashString(ChildSound)); } public void Write(BinaryWriter bw) { - bw.Write(NoteRangeMin); - bw.Write(NoteRangeMax); - bw.Write(NoteRangeType); + bw.Write(FirstNoteID); + bw.Write(LastNoteID); + bw.Write(Mode); bw.Write(ChildSound); } public override string ToString() { - return NoteRangeMin.ToString() + ": " + NoteRangeMax.ToString() + ": " + NoteRangeType.ToString(); + return FirstNoteID.ToString() + ": " + LastNoteID.ToString() + ": " + Mode.ToString(); } } - [TC(typeof(EXP))] public class Dat54SoundSetList : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SoundSetList : Dat54Sound { public uint SoundSetsCount { get; set; } public MetaHash[] SoundSets { get; set; } @@ -4940,7 +4997,9 @@ namespace CodeWalker.GameFiles return SoundSets; } } - [TC(typeof(EXP))] public class Dat54SoundHashList : Dat54Sound + + [TC(typeof(EXP))] + public class Dat54SoundHashList : Dat54Sound { public ushort UnkShort { get; set; } public uint SoundHashesCount { get; set; } @@ -4990,6 +5049,7 @@ namespace CodeWalker.GameFiles } + #endregion @@ -5000,120 +5060,121 @@ namespace CodeWalker.GameFiles public enum Dat151RelType : byte //not sure how correct these are? { - VehicleCollision = 1, //only for vehicles, vehicle_collision - VehicleTrailer = 2, - Vehicle = 3, - VehicleEngine = 4, //_vehicle_engine - AudioMaterial = 5, //am_base + VehicleCollisionSettings = 1, //only for vehicles, vehicle_collision + TrailerAudioSettings = 2, + CarAudioSettings = 3, + VehicleEngineAudioSettings = 4, //_vehicle_engine + CollisionMaterialSettings = 5, //am_base StaticEmitter = 6, //radio emitters only, se_ EntityEmitter = 7, //ee_, entity emitters for props such as fans, radars, etc - Helicopter = 8, - MeleeCombat = 9, //MeleeCombat melee_combat - SpeechContext = 11, //eg. default_speech_context, provoke, apologise, run, etc. contains reference to SpeechChoice - SpeechChoice = 12, //eg. default_speech_context_sc, SpeechChat? SpeechController..? child of SpeechContext, Unk13 - VirtualSpeechChoice = 13, //eg. greet_virtual_sc (has SpeechContext children eg. greeting_evening, morning) - VirtualSpeechChoice..? also can have SpeechChoice children instead + HeliAudioSettings = 8, + MeleeCombatSettings = 9, //melee_combat + TriggeredSpeechContext = 11, //eg. default_speech_context, provoke, apologise, run, etc. contains reference to SpeechContext + SpeechContext = 12, //eg. default_speech_context_sc, SpeechChat? SpeechController..? child of TriggeredSpeechContext, Unk13 + SpeechContextVirtual = 13, //eg. greet_virtual_sc (has TriggeredSpeechContext children eg. greeting_evening, morning) - TriggeredSpeechContextVirtual..? also can have SpeechContext children instead SpeechParams = 14, //speech_params - SpeechContextList = 15, //contains a list of SpeechContext objects. greetings, insults, reactions, provoke, etc. dlc_btl_nightclub_scl, dlc_btl_nightclub_queue_scl - Boat = 16, //and submarines - Weapon = 17,//individual weapons (and _npc weapons) - Shoe = 18, //footsteps_generic, shoe_, etc. - Unk22 = 22, //player/creature foosteps volumes? player_one, player_two, etc, as well as animals a_c_, etc, run, walk, stairs, vaulk, stealth, etc. - Skis = 23, //skis_generic, listed under some AudioMaterials but obviously unused :( + SpeechContextList = 15, //contains a list of TriggeredSpeechContext objects. greetings, insults, reactions, provoke, etc. dlc_btl_nightclub_scl, dlc_btl_nightclub_queue_scl + BoatAudioSettings = 16, //and submarines + WeaponAudioSettings = 17,//individual weapons (and _npc weapons) + ShoeAudioSettings = 18, //footsteps_generic, shoe_, etc. + ModelPhysicsParams = 22, //player/creature foostep tuning stuff + SkiAudioSettings = 23, //skis_generic, listed under some CollisionMaterialSettings but obviously unused :( RadioStationList = 24, //RadioStationList? repl_music_station_list_03 - RadioStation = 25,//radio_station - RadioTrack = 26,//music, ads, idents, etc - RadioTrackCategory = 27, //radio_track_category_ back-to-back timings, sets pre-delay of each radio track. - PoliceScannerCrime = 28, //crime_throw_grenade_b - RaceToPedVoiceGroup = 29, // Ped Race Ped Voice Group - PedVoiceGroup = 30, //maybe Ped Ped Voice Group? - PedType = 31,//ped category? jewish, street, airport, etc + RadioStationSettings = 25,//radio_station + RadioStationTrackList = 26,//exclusively for radio stations, music, ads, idents, etc + RadioTrackCategoryData = 27, //radio_track_category_ back-to-back timings, sets pre-delay of each radio track. + ScannerCrimeReport = 28, //crime_throw_grenade_b + PedRaceToPedVoiceGroup = 29, // Ped Race Ped Voice Group + PedVoiceGroups = 30, //maybe Ped Ped Voice Group? + FriendGroup = 31,//ped category? jewish, street, airport, etc StaticEmitterList = 32, //contains a list of StaticEmitters used in the world. - PoliceScannerReport = 33, // scripted_scanner_report_ etc - PoliceScannerLocation = 35, - PoliceScannerLocationList = 36, + ScriptedScannerLine = 33, // scripted_scanner_report_ etc + ScannerSpecificLocation = 35, + ScannerSpecificLocationList = 36, AmbientZone = 37, //zones for ambient rules. AmbientRule = 38, //ar_, according to GDC conference, an ambient rule contains information on a sound's position relative to the zone. AmbientZoneList = 39, //contains a list of AmbientZones used in the world. - AmbienceSlotMap = 40, // ambience_slot_map - AmbienceBankMap = 41, //assigns audio bank containers to the ambience system, ambience_bank_map_autogenerated - AmbientZoneParams = 42, //connected to AmbientZones, something related to nearby props? - Interior = 44, - InteriorRoomParams = 45, //connected to InteriorRooms. + AmbientSlotMap = 40, // ambience_slot_map + AmbientBankMap = 41, //assigns audio bank containers to the ambience system, ambience_bank_map_autogenerated + EnvironmentRule = 42, //connected to AmbientZones, something related to nearby props? + InteriorSettings = 44, + InteriorWeaponMetrics = 45, //connected to InteriorRooms. InteriorRoom = 46, - Door = 47, - DoorParams = 48, //DoorType? relations to Door. dlc_h4_dtp_vertical_slide_door + DoorAudioSettings = 47, + DoorTuningParams = 48, //configures door movement settings, _dtp, dlc_h4_dtp_vertical_slide_door DoorList = 49, //doors/gates - WeaponAudioItem = 50,//assigns weapon entries (player, npc, etc) to an audio item entry - Climbing = 51, //Climbing lists of climbing, wood, chainlink, etc. + ItemAudioSettings = 50,//assigns weapon entries (player, npc, etc) to an audio item entry + ClimbingAudioSettings = 51, //climbing materials such as wood, chainlink, etc. ModelAudioCollisionSettings = 52, //macs_models_override + AudioCollisionSettings archetype extension - Train = 53, - WeatherType = 54, //connected to WeatherTypeList - WeatherTypeList = 55, //only one in the entire game.dat, named weathertypelist. (most child names found in weather.xml) - Bicycle = 56, - Aeroplane = 57, + TrainAudioSettings = 53, + WeatherAudioSettings = 54, //connected to WeatherTypeAudioReference + WeatherTypeAudioReference = 55, //only one in the entire game.dat, named weathertypelist. (most child names found in weather.xml) + BicycleAudioSettings = 56, + PlaneAudioSettings = 57, StemMix = 59, //StemMix, defines the 8-stem stereo mix used for the score, prefixed sm_. child of moods. - Mood = 62,//_md, moods define transitions and stem behavior of scores. + InteractiveMusicMood = 62,//_md, moods define transitions and stem behavior of scores. StartTrackAction = 63, StopTrackAction = 64, SetMoodAction = 65, - PlayerAction = 66, + MusicEvent = 66, // me_ StartOneShotAction = 67, StopOneShotAction = 68, - MusicBeat = 69, // SetMoodBeat? suffixed _beat. - MusicBar = 70, // something about bars. - DependentAmbience = 71, //prefixed da_, connected to AmbientZone's external parameters (usually crickets/other animals, day/night?) - ConductorState = 72,//collision/bullet impacts? + BeatConstraint = 69, // SetMoodBeat? suffixed _beat. + BarConstraint = 70, // something about bars. + DirectionalAmbience = 71, //prefixed da_, connected to AmbientZone's external parameters (usually crickets/other animals, day/night?) + GunfightConductorIntensitySettings = 72,//collision/bullet impacts? AnimalParams = 73, - AnimalSounds = 74,//animal sounds - links to speech.dat somehow? - VehicleScannerColourList = 75, //VehicleScannerColourList ? contains all police scanner colours and prefixes for vehicles - VehicleScannerParams = 76, // _scanner_params - Unk77 = 77, // "default" possibly connected to StealthSettings - MicrophoneList = 78, - Microphone = 79, //Microphone? _mic - VehicleRecording = 80, //VehicleRecording audio (YVR) - VehicleRecordingList = 81,//list of VehicleRecordings - AnimalFootsteps = 82, //af_, animal footsteps on collision materials - AnimalFootstepsList = 83, //list of AnimalFootsteps sounds per collision material + AnimalVocalAnimTrigger = 74,//animal sounds - links to speech.dat somehow? + ScannerVoiceParams = 75, //ScannerVoiceParams ? contains all police scanner colours and prefixes for vehicles + ScannerVehicleParams = 76, // _scanner_params + AudioRoadInfo = 77, + MicrophoneSettingsReference = 78, + MicrophoneSettings = 79, //Microphone? _mic + CarRecordingAudioSettings = 80, //vehicle recording audio (YVR) + CarRecordingList = 81,//list of CarRecordings + AnimalFootstepSettings = 82, //af_, animal footsteps on collision materials + AnimalFootstepReference = 83, //list of AnimalFootstepSettings sounds per collision material ShoeList = 84, //contains a list of Shoe objects - Cloth = 85, //Cloth, clothing items, bags, etc. - ClothList = 86, //ClothList, all sorts of clothing stuff, bags, rappel gear, parachute gear, pants, shorts, etc. references ClothType - Explosion = 87, - VehicleEngineGranular = 88, //granular engine system, _granular_engine - ShoreLinePool = 90, - ShoreLineLake = 91, - ShoreLineRiver = 92, - ShoreLineOcean = 93, + ClothAudioSettings = 85, //Cloth, clothing items, bags, etc. + ClothList = 86, //ClothList, all sorts of clothing stuff, bags, rappel gear, parachute gear, pants, shorts, etc. references ClothAudioSettings + ExplosionAudioSettings = 87, + GranularEngineAudioSettings = 88, //granular engine system, _granular_engine + ShoreLinePoolAudioSettings = 90, + ShoreLineLakeAudioSettings = 91, + ShoreLineRiverAudioSettings = 92, + ShoreLineOceanAudioSettings = 93, ShoreLineList = 94, RadioTrackSettings = 95, //_rts, _radio_settings - sets a specific radio track - StealthSettings = 96, //player_one_tuning_values, good_stealth, bad_stealth, etc + ModelFootStepTuning = 96, //player_one_tuning_values, good_stealth, bad_stealth, etc RadioDJSpeechAction = 98, - Unk99 = 99, - Tunnel = 100, //Tunnels tunnels_in/out - Alarm = 101, + SilenceConstraint = 99, + ReflectionsSettings = 100, //tunnels_in/out + AlarmSettings = 101, FadeOutRadioAction = 102, FadeInRadioAction = 103, ForceRadioTrackAction = 104, //suffixed _frta SlowMoSettings = 105, //SlowMotion settings for weapons, jumps, other slow squences etc. - Scenario = 106, //eg world_human_musician + PedScenarioAudioSettings = 106, //eg world_human_musician PortalSettings = 107, //world changes, broken window vs fixed windows at certain interiors (Michael's house, car showroom, etc) - ElectricEngine = 108, //voltic_electric_engine - BreathSettings = 109, //bike_breath_settings, run_breath_settings - WallaSpeech = 110, //conversation/speech related - for scenarios? + ElectricEngineAudioSettings = 108, //voltic_electric_engine + PlayerBreathingSettings = 109, //bike_breath_settings, run_breath_settings + PedWallaSpeechSettings = 110, //ped walla speech AircraftWarningSettings = 111, - WallaSpeechList = 112, //conversation/speech related? contains refs to WallaSpeech + PedWallaSpeechSettingsList = 112, //conversation/speech related? contains refs to PedWallaSpeechSettings CopDispatchInteractionSettings = 113, //cop_dispatch_interaction_settings - RadioTrackEvents = 114, //suffixed rtt and rtb, contains list of Events from radio song's awc. - Unk115 = 115,//links to StaticEmitters - TennisVFXSettings = 116,//tennis_vfx_settings - DoorModel = 117, //assigns door models to Door entriees. prefixed dasl_ followed by hash of door model. (DoorAssetLink?) - Unk118 = 118, - Foliage = 119, //_foliage, prop_bush_lrg_02 - tree sounds - TrackList = 120, //_tracklist - its like a radio system, but for non-radio sounds (r* editor sounds and stuff) - ModelAudioCollisionSettingsOverride = 121, //macs = modelaudiocollisionsettings (stems from Dat151ModelAudioCollisionSettings) - RadioStationList2 = 124, // radio override something? + RadioTrackTextIDs = 114, //suffixed rtt and rtb, contains list of Events from radio song's awc. + RandomisedRadioEmitterSettings = 115,//links to StaticEmitters + TennisVocalizationSettings = 116,//tennis_vfx_settings + DoorAudioSettingsLink = 117, //assigns door models to Door entriees. prefixed dasl_ followed by hash of door model. + SportsCarRevsSettings = 118, + FoliageSettings = 119, //_foliage, prop_bush_lrg_02 - tree sounds + ReplayRadioStationTrackList = 120, //_tracklist - its like a radio system, but for non-radio sounds (r* editor sounds and stuff) + ModelAudioCollisionSettingsOverrideList = 121, //macs = modelaudiocollisionsettings (stems from Dat151ModelAudioCollisionSettings) + GameObjectHashList = 124, // radio override something? } - [TC(typeof(EXP))] public class Dat151RelData : RelData + [TC(typeof(EXP))] + public class Dat151RelData : RelData { public Dat151RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -5147,37 +5208,40 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct Dat151HashPair : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151HashPair : IMetaXmlItem { - public MetaHash Hash0 { get; set; } - public MetaHash Hash1 { get; set; } + public MetaHash Context { get; set; } + public MetaHash SoundRef { get; set; } public Dat151HashPair(BinaryReader br) { - Hash0 = br.ReadUInt32(); - Hash1 = br.ReadUInt32(); + Context = br.ReadUInt32(); + SoundRef = br.ReadUInt32(); } public void Write(BinaryWriter bw) { - bw.Write(Hash0); - bw.Write(Hash1); + bw.Write(Context); + bw.Write(SoundRef); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Hash0", RelXml.HashString(Hash0)); - RelXml.StringTag(sb, indent, "Hash1", RelXml.HashString(Hash1)); + RelXml.StringTag(sb, indent, "Context", RelXml.HashString(Context)); + RelXml.StringTag(sb, indent, "SoundRef", RelXml.HashString(SoundRef)); } public void ReadXml(XmlNode node) { - Hash0 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Hash0")); - Hash1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Hash1")); + Context = XmlRel.GetHash(Xml.GetChildInnerText(node, "Context")); + SoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundRef")); } public override string ToString() { - return Hash0.ToString() + ": " + Hash1.ToString(); + return Context.ToString() + ": " + SoundRef.ToString(); } } - [TC(typeof(EXP))] public struct Dat151HashFloat : IMetaXmlItem + + [TC(typeof(EXP))] + public struct Dat151HashFloat : IMetaXmlItem { public MetaHash Hash { get; set; } public float Value { get; set; } @@ -5209,14 +5273,15 @@ namespace CodeWalker.GameFiles } - public enum Dat151ZoneShape : uint + public enum Dat151ZoneShape : byte { Box = 0, Sphere = 1, Line = 2, } - [TC(typeof(EXP))] public class Dat151StaticEmitterList: Dat151RelData + [TC(typeof(EXP))] + public class Dat151StaticEmitterList: Dat151RelData { public uint EmitterCount { get; set; } public MetaHash[] EmitterHashes { get; set; } @@ -5234,16 +5299,9 @@ namespace CodeWalker.GameFiles { EmitterHashes[i] = br.ReadUInt32(); } - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } //no hits here - - } public override void Write(BinaryWriter bw) { - //base.Write(bw); WriteTypeAndOffset(bw); bw.Write(EmitterCount); @@ -5267,68 +5325,92 @@ namespace CodeWalker.GameFiles return EmitterHashes; } } - [TC(typeof(EXP))] public class Dat151AmbientZone : Dat151RelData - { - public FlagsUint Flags0 { get; set; } - public Dat151ZoneShape Shape { get; set; } - public FlagsUint Flags1 { get; set; } - public Vector3 ActivationZonePosition { get; set; } - public float Unused01 { get; set; } - public Vector3 ActivationZoneSize { get; set; } - public float Unused02 { get; set; } - public Vector4 ActivationZoneVec1 { get; set; } - public Vector4 ActivationZoneVec2 { get; set; } - public uint ActivationZoneAngle { get; set; } - public Vector3 ActivationZoneVec3 { get; set; } - public Vector3 PlaybackZonePosition { get; set; } - public float Unused06 { get; set; } - public Vector3 PlaybackZoneSize { get; set; } - public float Unused07 { get; set; } - public Vector4 PlaybackZoneVec1 { get; set; } - public Vector4 PlaybackZoneVec2 { get; set; } - public uint PlaybackZoneAngle { get; set; } - public Vector3 PlaybackZoneVec3 { get; set; } - public Vector4 UnkVec1 { get; set; } - public Vector4 UnkVec2 { get; set; } - public MetaHash UnkHash0 { get; set; } - public MetaHash Scene { get; set; } - public Vector2 UnkVec3 { get; set; } - public MetaHash Unk13 { get; set; } - public byte Unk14 { get; set; } - public byte Unk15 { get; set; } - public byte RulesCount { get; set; } - public byte Unk16 { get; set; } - public MetaHash[] Rules { get; set; } - public uint DependentAmbiencesCount { get; set; } - public DependentAmbience[] DependentAmbiences { get; set; } - public struct DependentAmbience : IMetaXmlItem + [TC(typeof(EXP))] + public class Dat151AmbientZone : Dat151RelData + { + public FlagsUint Flags { get; set; } + public Dat151ZoneShape Shape { get; set; } + public short unused0 { get; set; } + public byte unused00 { get; set; } + public uint Padding00 { get; set; } + public Vector3 ActivationZoneCentre { get; set; } + public float Unused01 { get; set; } + public Vector3 ActivationZoneSize { get; set; } + public float Unused02 { get; set; } + public Vector3 ActivationZonePostRotationOffset { get; set; } + public uint Padding01 { get; set; } + public Vector3 ActivationZoneSizeScale { get; set; } + public uint Padding02 { get; set; } + public ushort ActivationZoneRotationAngle { get; set; } + public ushort Padding03 { get; set; } + public uint Padding04 { get; set; } + public uint Padding05 { get; set; } + public uint Padding06 { get; set; } + public Vector3 PositioningZoneCentre { get; set; } + public float Unused06 { get; set; } + public Vector3 PositioningZoneSize { get; set; } + public float Unused07 { get; set; } + public Vector3 PositioningZonePostRotationOffset { get; set; } + public uint Padding07 { get; set; } + public Vector3 PositioningZoneSizeScale { get; set; } + public uint Padding08 { get; set; } + public ushort PositioningZoneRotationAngle { get; set; } + public ushort Padding09 { get; set; } + public uint Padding10 { get; set; } + public uint Padding11 { get; set; } + public uint Padding12 { get; set; } + public float BuiltUpFactor { get; set; } + public float MinPedDensity { get; set; } + public float MaxPedDensity { get; set; } + public MetaHash PedDensityTOD { get; set; } + public float PedDensityScalar { get; set; } + public float MaxWindInfluence { get; set; } + public float MinWindInfluence { get; set; } + public uint WindElevationSounds { get; set; } + public MetaHash EnvironmentRule { get; set; } + public MetaHash AudioScene { get; set; } + public float UnderwaterCreakFactor { get; set; } + public MetaHash PedWallaSettings { get; set; } + public MetaHash RandomisedRadioSettings { get; set; } + public byte NumRulesToPlay { get; set; } + public byte ZoneWaterCalculation { get; set; } + public byte NumRules { get; set; } + public byte Unused11 { get; set; } + public MetaHash[] Rules { get; set; } + public byte NumDirAmbiences { get; set; } + public byte Unused12 { get; set; } + public byte Unused13 { get; set; } + public byte Unused14 { get; set; } + public DirAmbience[] DirAmbiences { get; set; } + public uint Unused15 { get; set; } + public struct DirAmbience : IMetaXmlItem { public MetaHash Name { get; set; } - public float Value { get; set; } - public DependentAmbience(BinaryReader br) + public float Volume { get; set; } + public DirAmbience(BinaryReader br) { Name = br.ReadUInt32(); - Value = br.ReadSingle(); + Volume = br.ReadSingle(); } public void Write(BinaryWriter bw) { bw.Write(Name); - bw.Write(Value); + bw.Write(Volume); } public void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); - RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); + RelXml.ValueTag(sb, indent, "Volume", FloatUtil.ToString(Volume)); } public void ReadXml(XmlNode node) { Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); - Value = Xml.GetChildFloatAttribute(node, "Value", "value"); + Volume = Xml.GetChildFloatAttribute(node, "Volume", "value"); } public override string ToString() { - return Name.ToString() + ": " + FloatUtil.ToString(Value); + return Name.ToString() + ": " + FloatUtil.ToString(Volume); } } @@ -5341,318 +5423,317 @@ namespace CodeWalker.GameFiles } public Dat151AmbientZone(RelData d, BinaryReader br) : base(d, br) { - Flags0 = br.ReadUInt32(); - Shape = (Dat151ZoneShape)br.ReadUInt32(); - Flags1 = br.ReadUInt32(); - ActivationZonePosition = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Flags = br.ReadUInt32(); + Shape = (Dat151ZoneShape)br.ReadByte(); + unused0 = br.ReadInt16(); + unused00 = br.ReadByte(); + Padding00 = br.ReadUInt32(); + ActivationZoneCentre = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused01 = br.ReadSingle(); ActivationZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused02 = br.ReadSingle(); - ActivationZoneVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - ActivationZoneVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - ActivationZoneAngle = br.ReadUInt32();//### - ActivationZoneVec3 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - PlaybackZonePosition = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + ActivationZonePostRotationOffset = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding01 = br.ReadUInt32(); + ActivationZoneSizeScale = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding02 = br.ReadUInt32(); + ActivationZoneRotationAngle = br.ReadUInt16(); + Padding03 = br.ReadUInt16(); + Padding04 = br.ReadUInt32(); + Padding05 = br.ReadUInt32(); + Padding06 = br.ReadUInt32(); + PositioningZoneCentre = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused06 = br.ReadSingle(); - PlaybackZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + PositioningZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused07 = br.ReadSingle(); - PlaybackZoneVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - PlaybackZoneVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - PlaybackZoneAngle = br.ReadUInt32();//### - PlaybackZoneVec3 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - UnkVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - UnkVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - UnkHash0 = br.ReadUInt32(); - Scene = br.ReadUInt32(); - UnkVec3 = new Vector2(br.ReadSingle(), br.ReadSingle()); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadByte(); - Unk15 = br.ReadByte(); - RulesCount = br.ReadByte(); - Unk16 = br.ReadByte(); - Rules = new MetaHash[RulesCount]; - for (int i = 0; i < RulesCount; i++) + PositioningZonePostRotationOffset = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding07 = br.ReadUInt32(); + PositioningZoneSizeScale = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding08 = br.ReadUInt32(); + PositioningZoneRotationAngle = br.ReadUInt16(); + Padding09 = br.ReadUInt16(); + Padding10 = br.ReadUInt32(); + Padding11 = br.ReadUInt32(); + Padding12 = br.ReadUInt32(); + BuiltUpFactor = br.ReadSingle(); + MinPedDensity = br.ReadSingle(); + MaxPedDensity = br.ReadSingle(); + PedDensityTOD = br.ReadUInt32(); + PedDensityScalar = br.ReadSingle(); + MaxWindInfluence = br.ReadSingle(); + MinWindInfluence = br.ReadSingle(); + WindElevationSounds = br.ReadUInt32(); + EnvironmentRule = br.ReadUInt32(); + AudioScene = br.ReadUInt32(); + UnderwaterCreakFactor = br.ReadSingle(); + PedWallaSettings = br.ReadUInt32(); + RandomisedRadioSettings = br.ReadUInt32(); + NumRulesToPlay = br.ReadByte(); + ZoneWaterCalculation = br.ReadByte(); + NumRules = br.ReadByte(); + Unused11 = br.ReadByte(); + + var rules = new MetaHash[NumRules]; + for (int i = 0; i < NumRules; i++) { - Rules[i] = br.ReadUInt32(); + rules[i] = br.ReadUInt32(); } + Rules = rules; - DependentAmbiencesCount = br.ReadUInt32(); - DependentAmbiences = new DependentAmbience[DependentAmbiencesCount]; - for (int i = 0; i < DependentAmbiencesCount; i++) + NumDirAmbiences = br.ReadByte(); + Unused12 = br.ReadByte(); + Unused13 = br.ReadByte(); + Unused14 = br.ReadByte(); + + DirAmbiences = new DirAmbience[NumDirAmbiences]; + for (int i = 0; i < NumDirAmbiences; i++) { - DependentAmbiences[i] = new DependentAmbience(br); + DirAmbiences[i] = new DirAmbience(br); } - if (DependentAmbiencesCount != 0) - { } - - - #region testing - - var data = this.Data; - - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { - //byte[] remainder = br.ReadBytes((int)bytesleft); - //for (int i = 0; i < remainder.Length; i++) - //{ - // if (remainder[i] != 0) - // { } //no hits here! probably got everything, i'm assuming the block is padded to 0x10 or something. - //} - } - - - //RecVec(Pos01);//debug coords output - //RecVec(Pos06); - - - if (Unused01 != 0) - { }//no hit - if (Unused02 != 0) - { }//no hit - if (Unused06 != 0) - { }//no hit - if (Unused07 != 0) - { }//no hit - if (Shape != 0) - { }//eg 1, 2 - if (Flags1 != 0) - { }//no hit - if (ActivationZoneAngle > 360) - { }//no hit - if (PlaybackZoneAngle > 360) - { }//no hit - if (Unk13 != 0) - { }//eg 0xAE64583B, 0x61083310, 0xCAE96294, 0x1C376176 - if (UnkHash0 != 0) - { } - if (Scene != 0) - { } - - #endregion - } public override void Write(BinaryWriter bw) { - //base.Write(bw); WriteTypeAndOffset(bw); - bw.Write(Flags0); + bw.Write(Flags); bw.Write((uint)Shape); - bw.Write(Flags1); - bw.Write(ActivationZonePosition.X); - bw.Write(ActivationZonePosition.Y); - bw.Write(ActivationZonePosition.Z); + bw.Write(Padding00); + bw.Write(ActivationZoneCentre.X); + bw.Write(ActivationZoneCentre.Y); + bw.Write(ActivationZoneCentre.Z); bw.Write(Unused01); bw.Write(ActivationZoneSize.X); bw.Write(ActivationZoneSize.Y); bw.Write(ActivationZoneSize.Z); bw.Write(Unused02); - bw.Write(ActivationZoneVec1.X); - bw.Write(ActivationZoneVec1.Y); - bw.Write(ActivationZoneVec1.Z); - bw.Write(ActivationZoneVec1.W); - bw.Write(ActivationZoneVec2.X); - bw.Write(ActivationZoneVec2.Y); - bw.Write(ActivationZoneVec2.Z); - bw.Write(ActivationZoneVec2.W); - bw.Write(ActivationZoneAngle);//### - bw.Write(ActivationZoneVec3.X); - bw.Write(ActivationZoneVec3.Y); - bw.Write(ActivationZoneVec3.Z); - bw.Write(PlaybackZonePosition.X); - bw.Write(PlaybackZonePosition.Y); - bw.Write(PlaybackZonePosition.Z); + bw.Write(ActivationZonePostRotationOffset.X); + bw.Write(ActivationZonePostRotationOffset.Y); + bw.Write(ActivationZonePostRotationOffset.Z); + bw.Write(Padding01); + bw.Write(ActivationZoneSizeScale.X); + bw.Write(ActivationZoneSizeScale.Y); + bw.Write(ActivationZoneSizeScale.Z); + bw.Write(Padding02); + bw.Write(ActivationZoneRotationAngle); + bw.Write(Padding03); + bw.Write(Padding04); + bw.Write(Padding05); + bw.Write(Padding06); + bw.Write(PositioningZoneCentre.X); + bw.Write(PositioningZoneCentre.Y); + bw.Write(PositioningZoneCentre.Z); bw.Write(Unused06); - bw.Write(PlaybackZoneSize.X); - bw.Write(PlaybackZoneSize.Y); - bw.Write(PlaybackZoneSize.Z); + bw.Write(PositioningZoneSize.X); + bw.Write(PositioningZoneSize.Y); + bw.Write(PositioningZoneSize.Z); bw.Write(Unused07); - bw.Write(PlaybackZoneVec1.X); - bw.Write(PlaybackZoneVec1.Y); - bw.Write(PlaybackZoneVec1.Z); - bw.Write(PlaybackZoneVec1.W); - bw.Write(PlaybackZoneVec2.X); - bw.Write(PlaybackZoneVec2.Y); - bw.Write(PlaybackZoneVec2.Z); - bw.Write(PlaybackZoneVec2.W); - bw.Write(PlaybackZoneAngle);//### - bw.Write(PlaybackZoneVec3.X); - bw.Write(PlaybackZoneVec3.Y); - bw.Write(PlaybackZoneVec3.Z); - bw.Write(UnkVec1.X); - bw.Write(UnkVec1.Y); - bw.Write(UnkVec1.Z); - bw.Write(UnkVec1.W); - bw.Write(UnkVec2.X); - bw.Write(UnkVec2.Y); - bw.Write(UnkVec2.Z); - bw.Write(UnkVec2.W); - bw.Write(UnkHash0); - bw.Write(Scene); - bw.Write(UnkVec3.X); - bw.Write(UnkVec3.Y); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(RulesCount); - bw.Write(Unk16); - for (int i = 0; i < RulesCount; i++) + bw.Write(PositioningZonePostRotationOffset.X); + bw.Write(PositioningZonePostRotationOffset.Y); + bw.Write(PositioningZonePostRotationOffset.Z); + bw.Write(Padding07); + bw.Write(PositioningZoneSizeScale.X); + bw.Write(PositioningZoneSizeScale.Y); + bw.Write(PositioningZoneSizeScale.Z); + bw.Write(Padding08); + bw.Write(PositioningZoneRotationAngle); + bw.Write(Padding09); + bw.Write(Padding10); + bw.Write(Padding11); + bw.Write(Padding12); + bw.Write(BuiltUpFactor); + bw.Write(MinPedDensity); + bw.Write(MaxPedDensity); + bw.Write(PedDensityTOD); + bw.Write(PedDensityScalar); + bw.Write(MaxWindInfluence); + bw.Write(MinWindInfluence); + bw.Write(WindElevationSounds); + bw.Write(EnvironmentRule); + bw.Write(AudioScene); + bw.Write(UnderwaterCreakFactor); + bw.Write(PedWallaSettings); + bw.Write(RandomisedRadioSettings); + bw.Write(NumRulesToPlay); + bw.Write(ZoneWaterCalculation); + bw.Write(NumRules); + bw.Write(Unused11); + + for (int i = 0; i < NumRules; i++) { bw.Write(Rules[i]); } - bw.Write(DependentAmbiencesCount); - for (int i = 0; i < DependentAmbiencesCount; i++) + bw.Write(NumDirAmbiences); + bw.Write(Unused12); + bw.Write(Unused13); + bw.Write(Unused14); + + for (int i = 0; i < NumDirAmbiences; i++) { - DependentAmbiences[i].Write(bw); + DirAmbiences[i].Write(bw); } - if (DependentAmbiencesCount != 0) + if (NumDirAmbiences != 0) { } - - while ((bw.BaseStream.Position & 0xF) != 0) bw.Write((byte)0); //pad out to next 16 bytes - } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Flags0", "0x" + Flags0.Hex); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); RelXml.StringTag(sb, indent, "Shape", Shape.ToString()); - RelXml.ValueTag(sb, indent, "Flags1", "0x" + Flags1.Hex); - RelXml.SelfClosingTag(sb, indent, "ActivationZonePosition " + FloatUtil.GetVector3XmlString(ActivationZonePosition)); + RelXml.SelfClosingTag(sb, indent, "ActivationZoneCentre " + FloatUtil.GetVector3XmlString(ActivationZoneCentre)); RelXml.SelfClosingTag(sb, indent, "ActivationZoneSize " + FloatUtil.GetVector3XmlString(ActivationZoneSize)); - RelXml.SelfClosingTag(sb, indent, "ActivationZoneVec1 " + FloatUtil.GetVector4XmlString(ActivationZoneVec1)); - RelXml.SelfClosingTag(sb, indent, "ActivationZoneVec2 " + FloatUtil.GetVector4XmlString(ActivationZoneVec2)); - RelXml.ValueTag(sb, indent, "ActivationZoneAngle", ActivationZoneAngle.ToString()); - RelXml.SelfClosingTag(sb, indent, "ActivationZoneVec3 " + FloatUtil.GetVector3XmlString(ActivationZoneVec3)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZonePosition " + FloatUtil.GetVector3XmlString(PlaybackZonePosition)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneSize " + FloatUtil.GetVector3XmlString(PlaybackZoneSize)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneVec1 " + FloatUtil.GetVector4XmlString(PlaybackZoneVec1)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneVec2 " + FloatUtil.GetVector4XmlString(PlaybackZoneVec2)); - RelXml.ValueTag(sb, indent, "PlaybackZoneAngle", PlaybackZoneAngle.ToString()); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneVec3 " + FloatUtil.GetVector3XmlString(PlaybackZoneVec3)); - RelXml.SelfClosingTag(sb, indent, "UnkVec1 " + FloatUtil.GetVector4XmlString(UnkVec1)); - RelXml.SelfClosingTag(sb, indent, "UnkVec2 " + FloatUtil.GetVector4XmlString(UnkVec2)); - RelXml.StringTag(sb, indent, "UnkHash0", RelXml.HashString(UnkHash0)); - RelXml.StringTag(sb, indent, "Scene", RelXml.HashString(Scene)); - RelXml.SelfClosingTag(sb, indent, "UnkVec3 " + FloatUtil.GetVector2XmlString(UnkVec3)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); + RelXml.SelfClosingTag(sb, indent, "ActivationZonePostRotationOffset " + FloatUtil.GetVector3XmlString(ActivationZonePostRotationOffset)); + RelXml.SelfClosingTag(sb, indent, "ActivationZoneSizeScale " + FloatUtil.GetVector3XmlString(ActivationZoneSizeScale)); + RelXml.ValueTag(sb, indent, "ActivationZoneRotationAngle", ActivationZoneRotationAngle.ToString()); + RelXml.SelfClosingTag(sb, indent, "PositioningZoneCentre " + FloatUtil.GetVector3XmlString(PositioningZoneCentre)); + RelXml.SelfClosingTag(sb, indent, "PositioningZoneSize " + FloatUtil.GetVector3XmlString(PositioningZoneSize)); + RelXml.SelfClosingTag(sb, indent, "PositioningZonePostRotationOffset " + FloatUtil.GetVector3XmlString(PositioningZonePostRotationOffset)); + RelXml.SelfClosingTag(sb, indent, "PositioningZoneSizeScale " + FloatUtil.GetVector3XmlString(PositioningZoneSizeScale)); + RelXml.ValueTag(sb, indent, "PositioningZoneRotationAngle", PositioningZoneRotationAngle.ToString()); + RelXml.ValueTag(sb, indent, "BuiltUpFactor", FloatUtil.ToString(BuiltUpFactor)); + RelXml.ValueTag(sb, indent, "MinPedDensity", FloatUtil.ToString(MinPedDensity)); + RelXml.ValueTag(sb, indent, "MaxPedDensity", FloatUtil.ToString(MaxPedDensity)); + RelXml.StringTag(sb, indent, "PedDensityTOD", RelXml.HashString(PedDensityTOD)); + RelXml.ValueTag(sb, indent, "PedDensityScalar", FloatUtil.ToString(PedDensityScalar)); + RelXml.ValueTag(sb, indent, "MaxWindInfluence", FloatUtil.ToString(MaxWindInfluence)); + RelXml.ValueTag(sb, indent, "MinWindInfluence", FloatUtil.ToString(MinWindInfluence)); + RelXml.ValueTag(sb, indent, "WindElevationSounds", WindElevationSounds.ToString()); + RelXml.StringTag(sb, indent, "EnvironmentRule", RelXml.HashString(EnvironmentRule)); + RelXml.StringTag(sb, indent, "AudioScene", RelXml.HashString(AudioScene)); + RelXml.ValueTag(sb, indent, "UnderwaterCreakFactor", FloatUtil.ToString(UnderwaterCreakFactor)); + RelXml.StringTag(sb, indent, "PedWallaSettings", RelXml.HashString(PedWallaSettings)); + RelXml.StringTag(sb, indent, "RandomisedRadioSettings", RelXml.HashString(RandomisedRadioSettings)); + RelXml.ValueTag(sb, indent, "NumRulesToPlay", NumRulesToPlay.ToString()); + RelXml.ValueTag(sb, indent, "ZoneWaterCalculation", ZoneWaterCalculation.ToString()); RelXml.WriteHashItemArray(sb, Rules, indent, "Rules"); - RelXml.WriteItemArray(sb, DependentAmbiences, indent, "DependentAmbiences"); + RelXml.WriteItemArray(sb, DirAmbiences, indent, "DirAmbiences"); } public override void ReadXml(XmlNode node) { - Flags0 = Xml.GetChildUIntAttribute(node, "Flags0", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Shape = Xml.GetEnumValue(Xml.GetChildInnerText(node, "Shape")); - Flags1 = Xml.GetChildUIntAttribute(node, "Flags1", "value"); - ActivationZonePosition = Xml.GetChildVector3Attributes(node, "ActivationZonePosition"); + ActivationZoneCentre = Xml.GetChildVector3Attributes(node, "ActivationZoneCentre"); ActivationZoneSize = Xml.GetChildVector3Attributes(node, "ActivationZoneSize"); - ActivationZoneVec1 = Xml.GetChildVector4Attributes(node, "ActivationZoneVec1"); - ActivationZoneVec2 = Xml.GetChildVector4Attributes(node, "ActivationZoneVec2"); - ActivationZoneAngle = Xml.GetChildUIntAttribute(node, "ActivationZoneAngle", "value"); - ActivationZoneVec3 = Xml.GetChildVector3Attributes(node, "ActivationZoneVec3"); - PlaybackZonePosition = Xml.GetChildVector3Attributes(node, "PlaybackZonePosition"); - PlaybackZoneSize = Xml.GetChildVector3Attributes(node, "PlaybackZoneSize"); - PlaybackZoneVec1 = Xml.GetChildVector4Attributes(node, "PlaybackZoneVec1"); - PlaybackZoneVec2 = Xml.GetChildVector4Attributes(node, "PlaybackZoneVec2"); - PlaybackZoneAngle = Xml.GetChildUIntAttribute(node, "PlaybackZoneAngle", "value"); - PlaybackZoneVec3 = Xml.GetChildVector3Attributes(node, "PlaybackZoneVec3"); - UnkVec1 = Xml.GetChildVector4Attributes(node, "UnkVec1"); - UnkVec2 = Xml.GetChildVector4Attributes(node, "UnkVec2"); - UnkHash0 = XmlRel.GetHash(Xml.GetChildInnerText(node, "UnkHash0")); - Scene = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scene")); - UnkVec3 = Xml.GetChildVector2Attributes(node, "UnkVec3"); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = (byte)Xml.GetChildUIntAttribute(node, "Unk14", "value"); - Unk15 = (byte)Xml.GetChildUIntAttribute(node, "Unk15", "value"); - Unk16 = (byte)Xml.GetChildUIntAttribute(node, "Unk16", "value"); + ActivationZonePostRotationOffset = Xml.GetChildVector3Attributes(node, "ActivationZonePostRotationOffset"); + ActivationZoneSizeScale = Xml.GetChildVector3Attributes(node, "ActivationZoneSizeScale"); + ActivationZoneRotationAngle = (ushort)Xml.GetChildUIntAttribute(node, "ActivationZoneRotationAngle", "value"); + PositioningZoneCentre = Xml.GetChildVector3Attributes(node, "PositioningZoneCentre"); + PositioningZoneSize = Xml.GetChildVector3Attributes(node, "PositioningZoneSize"); + PositioningZonePostRotationOffset = Xml.GetChildVector3Attributes(node, "PositioningZonePostRotationOffset"); + PositioningZoneSizeScale = Xml.GetChildVector3Attributes(node, "PositioningZoneSizeScale"); + PositioningZoneRotationAngle = (ushort)Xml.GetChildUIntAttribute(node, "PositioningZoneRotationAngle", "value"); + BuiltUpFactor = Xml.GetChildFloatAttribute(node, "BuiltUpFactor", "value"); + MinPedDensity = Xml.GetChildFloatAttribute(node, "MinPedDensity", "value"); + MaxPedDensity = Xml.GetChildFloatAttribute(node, "MaxPedDensity", "value"); + PedDensityTOD = XmlRel.GetHash(Xml.GetChildInnerText(node, "PedDensityTOD")); + PedDensityScalar = Xml.GetChildFloatAttribute(node, "PedDensityScalar", "value"); + MaxWindInfluence = Xml.GetChildFloatAttribute(node, "MaxWindInfluence", "value"); + MinWindInfluence = Xml.GetChildFloatAttribute(node, "MinWindInfluence", "value"); + WindElevationSounds = Xml.GetChildUIntAttribute(node, "WindElevationSounds", "value"); + EnvironmentRule = XmlRel.GetHash(Xml.GetChildInnerText(node, "EnvironmentRule")); + AudioScene = XmlRel.GetHash(Xml.GetChildInnerText(node, "AudioScene")); + UnderwaterCreakFactor = Xml.GetChildFloatAttribute(node, "UnderwaterCreakFactor", "value"); + PedWallaSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "PedWallaSettings")); + RandomisedRadioSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "RandomisedRadioSettings")); + NumRulesToPlay = (byte)Xml.GetChildUIntAttribute(node, "NumRulesToPlay", "value"); + ZoneWaterCalculation = (byte)Xml.GetChildUIntAttribute(node, "ZoneWaterCalculation", "value"); Rules = XmlRel.ReadHashItemArray(node, "Rules"); - RulesCount = (byte)(Rules?.Length ?? 0); - DependentAmbiences = XmlRel.ReadItemArray(node, "DependentAmbiences"); - DependentAmbiencesCount = (uint)(DependentAmbiences?.Length ?? 0); + NumRules = (byte)(Rules?.Length ?? 0); + DirAmbiences = XmlRel.ReadItemArray(node, "DirAmbiences"); + NumDirAmbiences = (byte)(DirAmbiences?.Length ?? 0); } public override MetaHash[] GetMixerHashes() { - return new[] { Scene }; + return new[] { AudioScene, PedDensityTOD }; } public override MetaHash[] GetGameHashes() { - var list = new List(); - list.Add(UnkHash0); - if (Rules != null) list.AddRange(Rules); - if (DependentAmbiences != null) - { - foreach (var ep in DependentAmbiences) list.Add(ep.Name); - } - return list.ToArray(); + var hashes = new List { EnvironmentRule }; + if (Rules != null) + hashes.AddRange(Rules); + if (DirAmbiences != null) + hashes.AddRange(DirAmbiences.Select(ep => ep.Name)); + + return hashes.ToArray(); } } - [TC(typeof(EXP))] public class Dat151AmbientRule : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151AmbientRule : Dat151RelData { - public FlagsUint Flags0 { get; set; } - public FlagsUint Flags1 { get; set; } - public FlagsUint Flags2 { get; set; } + public FlagsUint Flags { get; set; } + public uint Padding01 { get; set; } + public uint Padding02 { get; set; } public Vector3 Position { get; set; } - public FlagsUint Flags3 { get; set; } //0 + public uint Padding03 { get; set; } public MetaHash ChildSound { get; set; } public MetaHash Category { get; set; } - public FlagsUint Flags4 { get; set; } //0 - public FlagsUint Flags5 { get; set; } //0xFFFFFFFF - public FlagsUint Flags6 { get; set; } //0 - public float Unk01 { get; set; } //1, 5, 100, ... - public float InnerRadius { get; set; } //inner radius of volume (playback bound) - public float OuterRadius { get; set; } //outer radius of volume (activation bound) - public ushort StartTime { get; set; } //time allows to start playing, in mins - public ushort EndTime { get; set; } //time to stop playing, in mins (max 1440) - public FlagsUshort Frequency { get; set; } //0..600 - public FlagsUshort Unk07 { get; set; } //0..150 - public FlagsByte Unk08 { get; set; } //0,1,2 - public FlagsByte Unk09 { get; set; } //0,1,2 - public FlagsByte Unk10 { get; set; } //1,2,3,4,8,255 - public FlagsByte Unk11 { get; set; } //1,2,3,4,5,6,8,10,255 - public FlagsByte Unk12 { get; set; } //0, 50, 80, 100 - public FlagsByte Unk13 { get; set; } //1,2,3,5 - public ushort VariablesCount { get; set; } //0,1,2,4 - public Variable[] Variables { get; set; } + public uint LastPlayTime { get; set; } + public int DynamicBankID { get; set; } + public uint DynamicSlotType { get; set; } + public float Weight { get; set; } + public float MinDist { get; set; } // inner radius of volume (playback bound) + public float MaxDist { get; set; } // outer radius of volume (activation bound) + public ushort MinTimeMinutes { get; set; } // time allows to start playing, in mins + public ushort MaxTimeMinutes { get; set; } // time to stop playing, in mins (max 1440) + public ushort MinRepeatTime { get; set; } // 0..600 + public ushort MinRepeatTimeVariance { get; set; } // 0..150 + public byte SpawnHeight { get; set; } // 0,1,2 + public ExplicitSpawnType ExplicitSpawn { get; set; } + public byte MaxLocalInstances { get; set; } // 1,2,3,4,8,255 + public byte MaxGlobalInstances { get; set; } // 1,2,3,4,5,6,8,10,255 + public byte BlockabilityFactor { get; set; } // 0, 50, 80, 100 + public byte MaxPathDepth { get; set; } // 1,2,3,5 + public ushort NumConditions { get; set; } // 0,1,2,4 + public Condition[] Conditions { get; set; } - public struct Variable : IMetaXmlItem + public struct Condition : IMetaXmlItem { public MetaHash Name; public float Value; - public FlagsUint Flags; - public Variable(BinaryReader br) + public byte ConditionType; + public byte BankLoading; + public ushort Padding; + public Condition(BinaryReader br) { Name = br.ReadUInt32(); Value = br.ReadSingle(); - Flags = br.ReadUInt32(); + ConditionType = br.ReadByte(); + BankLoading = br.ReadByte(); + Padding = br.ReadUInt16(); } public void Write(BinaryWriter bw) { bw.Write(Name); bw.Write(Value); - bw.Write(Flags); + bw.Write(ConditionType); + bw.Write(BankLoading); + bw.Write(Padding); } public void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); - RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); + RelXml.ValueTag(sb, indent, "ConditionType", FloatUtil.ToString(ConditionType)); + RelXml.ValueTag(sb, indent, "BankLoading", FloatUtil.ToString(BankLoading)); } public void ReadXml(XmlNode node) { Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); Value = Xml.GetChildFloatAttribute(node, "Value", "value"); - Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + ConditionType = (byte)Xml.GetChildUIntAttribute(node, "ConditionType", "value"); + BankLoading = (byte)Xml.GetChildUIntAttribute(node, "BankLoading", "value"); } public override string ToString() { - return Name.ToString() + ": " + FloatUtil.ToString(Value) + ": " + Flags.ToString(); + return Name.ToString() + ": " + FloatUtil.ToString(Value) + ": " + ConditionType.ToString(); } } + public enum ExplicitSpawnType : byte + { + Disabled = 0, + WorldRelative = 1, + InteriorRelative = 2, + } public Dat151AmbientRule(RelFile rel) : base(rel) { @@ -5661,40 +5742,40 @@ namespace CodeWalker.GameFiles } public Dat151AmbientRule(RelData d, BinaryReader br) : base(d, br) { - Flags0 = br.ReadUInt32(); - Flags1 = br.ReadUInt32(); - Flags2 = br.ReadUInt32(); + Flags = br.ReadUInt32(); + Padding01 = br.ReadUInt32(); + Padding02 = br.ReadUInt32(); Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Flags3 = br.ReadUInt32(); //0 + Padding03 = br.ReadUInt32(); ChildSound = br.ReadUInt32(); Category = br.ReadUInt32(); - Flags4 = br.ReadUInt32(); //0 - Flags5 = br.ReadUInt32(); //0xFFFFFFFF - Flags6 = br.ReadUInt32(); //0 - Unk01 = br.ReadSingle(); //1, 5, 100, ... - InnerRadius = br.ReadSingle(); //inner radius of volume (playback bound) - OuterRadius = br.ReadSingle(); //outer radius of volume (activation bound) - StartTime = br.ReadUInt16(); //time allows to start playing, in mins - EndTime = br.ReadUInt16(); //time to stop playing, in mins (max 1440) - Frequency = br.ReadUInt16(); //0..600 - Unk07 = br.ReadUInt16(); //0..150 - Unk08 = br.ReadByte(); //0,1,2 - Unk09 = br.ReadByte(); //0,1,2 - Unk10 = br.ReadByte(); //1,2,3,4,8,255 - Unk11 = br.ReadByte(); //1,2,3,4,5,6,8,10,255 - Unk12 = br.ReadByte(); //0, 50, 80, 100 - Unk13 = br.ReadByte(); //1,2,3,5 - VariablesCount = br.ReadUInt16(); //0,1,2,4 + LastPlayTime = br.ReadUInt32(); + DynamicBankID = br.ReadInt32(); + DynamicSlotType = br.ReadUInt32(); + Weight = br.ReadSingle(); + MinDist = br.ReadSingle(); // inner radius of volume (playback bound) + MaxDist = br.ReadSingle(); // outer radius of volume (activation bound) + MinTimeMinutes = br.ReadUInt16(); // time allows to start playing, in mins + MaxTimeMinutes = br.ReadUInt16(); // time to stop playing, in mins (max 1440) + MinRepeatTime = br.ReadUInt16(); + MinRepeatTimeVariance = br.ReadUInt16(); + SpawnHeight = br.ReadByte(); + ExplicitSpawn = (ExplicitSpawnType)br.ReadByte(); + MaxLocalInstances = br.ReadByte(); + MaxGlobalInstances = br.ReadByte(); + BlockabilityFactor = br.ReadByte(); + MaxPathDepth = br.ReadByte(); + NumConditions = br.ReadUInt16(); - if (VariablesCount > 0) + if (NumConditions > 0) { - Variables = new Variable[VariablesCount]; - for (int i = 0; i < VariablesCount; i++) + Conditions = new Condition[NumConditions]; + for (int i = 0; i < NumConditions; i++) { - Variables[i] = new Variable(br); + Conditions[i] = new Condition(br); } //array seems to be padded to multiples of 16 bytes. (read the rest here) - int brem = (16 - ((VariablesCount * 12) % 16)) % 16; + int brem = (16 - ((NumConditions * 12) % 16)) % 16; if (brem > 0) { byte[] brema = br.ReadBytes(brem); @@ -5706,242 +5787,43 @@ namespace CodeWalker.GameFiles } } - - #region testing - - switch (Frequency.Value) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 18: - case 20: - case 22: - case 24: - case 25: - case 26: - case 30: - case 32: - case 35: - case 40: - case 45: - case 48: - case 50: - case 51: - case 54: - case 55: - case 57: - case 60: - case 64: - case 65: - case 70: - case 75: - case 80: - case 90: - case 95: - case 97: - case 100: - case 120: - case 125: - case 130: - case 135: - case 140: - case 145: - case 150: - case 160: - case 170: - case 178: - case 180: - case 190: - case 200: - case 220: - case 225: - case 240: - case 245: - case 250: - case 300: - case 350: - case 500: - case 600: - break; - default: - break; - } - switch (Unk07.Value) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 12: - case 15: - case 17: - case 20: - case 21: - case 22: - case 25: - case 27: - case 30: - case 32: - case 35: - case 40: - case 50: - case 60: - case 100: - case 150: - break; - default: - break; - } - switch (Unk08.Value) - { - case 0: - case 1: - case 2: - break; - default: - break; - } - switch (Unk09.Value) - { - case 0: - case 1: - case 2: - break; - default: - break; - } - switch (Unk10.Value) - { - case 1: - case 2: - case 3: - case 4: - case 8: - case 255: - break; - default: - break; - } - switch (Unk11.Value) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 8: - case 10: - case 255: - break; - default: - break; - } - switch (Unk12.Value) - { - case 0: - case 50: - case 80: - case 100: - break; - default: - break; - } - switch (Unk13.Value) - { - case 1: - case 2: - case 3: - case 5: - break; - default: - break; - } - switch (VariablesCount) - { - case 0: - case 1: - case 2: - case 4: - break; - default: - break; - } - - - - //if ((Position.X != 0) || (Position.Y != 0) || (Position.Z != 0)) - //{ - // FoundCoords.Add(FloatUtil.GetVector3String(Position) + ", " + GetNameString()); - //} - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - - - #endregion - } public override void Write(BinaryWriter bw) { - //base.Write(bw); WriteTypeAndOffset(bw); - bw.Write(Flags0); - bw.Write(Flags1); - bw.Write(Flags2); + bw.Write(Flags); + bw.Write(Padding01); + bw.Write(Padding02); bw.Write(Position.X); bw.Write(Position.Y); bw.Write(Position.Z); - bw.Write(Flags3); + bw.Write(Padding03); bw.Write(ChildSound); bw.Write(Category); - bw.Write(Flags4); - bw.Write(Flags5); - bw.Write(Flags6); - bw.Write(Unk01); - bw.Write(InnerRadius); - bw.Write(OuterRadius); - bw.Write(StartTime); - bw.Write(EndTime); - bw.Write(Frequency); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(VariablesCount); + bw.Write(LastPlayTime); + bw.Write(DynamicBankID); + bw.Write(DynamicSlotType); + bw.Write(Weight); + bw.Write(MinDist); + bw.Write(MaxDist); + bw.Write(MinTimeMinutes); + bw.Write(MaxTimeMinutes); + bw.Write(MinRepeatTime); + bw.Write(MinRepeatTimeVariance); + bw.Write(SpawnHeight); + bw.Write((byte)ExplicitSpawn); + bw.Write(MaxLocalInstances); + bw.Write(MaxGlobalInstances); + bw.Write(BlockabilityFactor); + bw.Write(MaxPathDepth); + bw.Write(NumConditions); - if (VariablesCount > 0) + if (NumConditions > 0) { - for (int i = 0; i < VariablesCount; i++) + for (int i = 0; i < NumConditions; i++) { - Variables[i].Write(bw); + Conditions[i].Write(bw); } //array seems to be padded to multiples of 16 bytes. (write the rest here) while ((bw.BaseStream.Position & 0xF) != 0) bw.Write((byte)0); //pad out to next 16 bytes @@ -5950,58 +5832,52 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Flags0", "0x" + Flags0.Hex); - RelXml.ValueTag(sb, indent, "Flags1", "0x" + Flags1.Hex); - RelXml.ValueTag(sb, indent, "Flags2", "0x" + Flags2.Hex); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); RelXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position)); - RelXml.ValueTag(sb, indent, "Flags3", "0x" + Flags3.Hex); RelXml.StringTag(sb, indent, "ChildSound", RelXml.HashString(ChildSound)); RelXml.StringTag(sb, indent, "Category", RelXml.HashString(Category)); - RelXml.ValueTag(sb, indent, "Flags4", "0x" + Flags4.Hex); - RelXml.ValueTag(sb, indent, "Flags5", "0x" + Flags5.Hex); - RelXml.ValueTag(sb, indent, "Flags6", "0x" + Flags6.Hex); - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "InnerRadius", FloatUtil.ToString(InnerRadius)); - RelXml.ValueTag(sb, indent, "OuterRadius", FloatUtil.ToString(OuterRadius)); - RelXml.ValueTag(sb, indent, "StartTime", StartTime.ToString()); - RelXml.ValueTag(sb, indent, "EndTime", EndTime.ToString()); - RelXml.ValueTag(sb, indent, "Frequency", Frequency.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.Value.ToString()); - RelXml.WriteItemArray(sb, Variables, indent, "Variables"); + RelXml.ValueTag(sb, indent, "LastPlayTime", LastPlayTime.ToString()); ; + RelXml.ValueTag(sb, indent, "DynamicBankID", DynamicBankID.ToString()); + RelXml.ValueTag(sb, indent, "DynamicSlotType", DynamicSlotType.ToString()); + RelXml.ValueTag(sb, indent, "Weight", FloatUtil.ToString(Weight)); + RelXml.ValueTag(sb, indent, "MinDist", FloatUtil.ToString(MinDist)); + RelXml.ValueTag(sb, indent, "MaxDist", FloatUtil.ToString(MaxDist)); + RelXml.ValueTag(sb, indent, "MinTimeMinutes", MinTimeMinutes.ToString()); + RelXml.ValueTag(sb, indent, "MaxTimeMinutes", MaxTimeMinutes.ToString()); + RelXml.ValueTag(sb, indent, "MinRepeatTime", MinRepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "MinRepeatTimeVariance", MinRepeatTimeVariance.ToString()); + RelXml.ValueTag(sb, indent, "SpawnHeight", SpawnHeight.ToString()); + RelXml.StringTag(sb, indent, "ExplicitSpawn", ExplicitSpawn.ToString()); + RelXml.ValueTag(sb, indent, "MaxLocalInstances", MaxLocalInstances.ToString()); + RelXml.ValueTag(sb, indent, "MaxGlobalInstances", MaxGlobalInstances.ToString()); + RelXml.ValueTag(sb, indent, "BlockabilityFactor", BlockabilityFactor.ToString()); + RelXml.ValueTag(sb, indent, "MaxPathDepth", MaxPathDepth.ToString()); + RelXml.WriteItemArray(sb, Conditions, indent, "Conditions"); } public override void ReadXml(XmlNode node) { - Flags0 = Xml.GetChildUIntAttribute(node, "Flags0", "value"); - Flags1 = Xml.GetChildUIntAttribute(node, "Flags1", "value"); - Flags2 = Xml.GetChildUIntAttribute(node, "Flags2", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Position = Xml.GetChildVector3Attributes(node, "Position"); - Flags3 = Xml.GetChildUIntAttribute(node, "Flags3", "value"); ChildSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound")); Category = XmlRel.GetHash(Xml.GetChildInnerText(node, "Category")); - Flags4 = Xml.GetChildUIntAttribute(node, "Flags4", "value"); - Flags5 = Xml.GetChildUIntAttribute(node, "Flags5", "value"); - Flags6 = Xml.GetChildUIntAttribute(node, "Flags6", "value"); - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - InnerRadius = Xml.GetChildFloatAttribute(node, "InnerRadius", "value"); - OuterRadius = Xml.GetChildFloatAttribute(node, "OuterRadius", "value"); - StartTime = (ushort)Xml.GetChildUIntAttribute(node, "StartTime", "value"); - EndTime = (ushort)Xml.GetChildUIntAttribute(node, "EndTime", "value"); - Frequency = (ushort)Xml.GetChildUIntAttribute(node, "Frequency", "value"); - Unk07 = (ushort)Xml.GetChildUIntAttribute(node, "Unk07", "value"); - Unk08 = (byte)Xml.GetChildUIntAttribute(node, "Unk08", "value"); - Unk09 = (byte)Xml.GetChildUIntAttribute(node, "Unk09", "value"); - Unk10 = (byte)Xml.GetChildUIntAttribute(node, "Unk10", "value"); - Unk11 = (byte)Xml.GetChildUIntAttribute(node, "Unk11", "value"); - Unk12 = (byte)Xml.GetChildUIntAttribute(node, "Unk12", "value"); - Unk13 = (byte)Xml.GetChildUIntAttribute(node, "Unk13", "value"); - Variables = XmlRel.ReadItemArray(node, "Variables"); - VariablesCount = (ushort)(Variables?.Length ?? 0); + LastPlayTime = Xml.GetChildUIntAttribute(node, "LastPlayTime", "value"); + DynamicBankID = Xml.GetChildIntAttribute(node, "DynamicBankID", "value"); + DynamicSlotType = Xml.GetChildUIntAttribute(node, "DynamicSlotType", "value"); + Weight = Xml.GetChildFloatAttribute(node, "Weight", "value"); + MinDist = Xml.GetChildFloatAttribute(node, "MinDist", "value"); + MaxDist = Xml.GetChildFloatAttribute(node, "MaxDist", "value"); + MinTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MinTimeMinutes", "value"); + MaxTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MaxTimeMinutes", "value"); + MinRepeatTime = (ushort)Xml.GetChildUIntAttribute(node, "MinRepeatTime", "value"); + MinRepeatTimeVariance = (ushort)Xml.GetChildUIntAttribute(node, "MinRepeatTimeVariance", "value"); + SpawnHeight = (byte)Xml.GetChildUIntAttribute(node, "SpawnHeight", "value"); + ExplicitSpawn = Xml.GetChildEnumInnerText(node, "ExplicitSpawn"); + MaxLocalInstances = (byte)Xml.GetChildUIntAttribute(node, "MaxLocalInstances", "value"); + MaxGlobalInstances = (byte)Xml.GetChildUIntAttribute(node, "MaxGlobalInstances", "value"); + BlockabilityFactor = (byte)Xml.GetChildUIntAttribute(node, "BlockabilityFactor", "value"); + MaxPathDepth = (byte)Xml.GetChildUIntAttribute(node, "MaxPathDepth", "value"); + Conditions = XmlRel.ReadItemArray(node, "Conditions"); + NumConditions = (ushort)(Conditions?.Length ?? 0); } public override MetaHash[] GetCategoryHashes() { @@ -6012,7 +5888,9 @@ namespace CodeWalker.GameFiles return new[] { ChildSound }; } } - [TC(typeof(EXP))] public class Dat151AmbientZoneList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151AmbientZoneList : Dat151RelData { public uint ZoneCount { get; set; } public MetaHash[] ZoneHashes { get; set; } @@ -6030,15 +5908,9 @@ namespace CodeWalker.GameFiles { ZoneHashes[i] = br.ReadUInt32(); } - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } //no hits here - } public override void Write(BinaryWriter bw) { - //base.Write(bw); WriteTypeAndOffset(bw); bw.Write(ZoneCount); @@ -6062,34 +5934,37 @@ namespace CodeWalker.GameFiles return ZoneHashes; } } - [TC(typeof(EXP))] public class Dat151StaticEmitter : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151StaticEmitter : Dat151RelData { - public FlagsUint Flags { get; set; }//flags + public FlagsUint Flags { get; set; } public MetaHash ChildSound { get; set; } public MetaHash RadioStation { get; set; } public Vector3 Position { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public int Unk08 { get; set; } - public short LPFCutoff { get; set; } - public short HPFCutoff { get; set; } - public int Unk11 { get; set; } + public float MinDistance { get; set; } + public float MaxDistance { get; set; } + public int EmittedVolume { get; set; } + public ushort LPFCutoff { get; set; } + public ushort HPFCutoff { get; set; } + public ushort RolloffFactor { get; set; } + public ushort Padding00 { get; set; } public MetaHash Interior { get; set; } public MetaHash Room { get; set; } - public MetaHash Unk13 { get; set; } - public float Unk14 { get; set; } - public ushort Unk15 { get; set; } - public ushort Unk16 { get; set; } + public MetaHash RadioStationForScore { get; set; } + public float MaxLeakage { get; set; } + public ushort MinLeakageDistance { get; set; } + public ushort MaxLeakageDistance { get; set; } public MetaHash Alarm { get; set; } - public MetaHash Unk18 { get; set; } - public uint MaxPathDepth { get; set; } - public uint SmallReverbSend { get; set; } - public uint MediumReverbSend { get; set; } - public uint LargeReverbSend { get; set; } + public MetaHash OnBreakOneShot { get; set; } + public byte MaxPathDepth { get; set; } + public byte SmallReverbSend { get; set; } + public byte MediumReverbSend { get; set; } + public byte LargeReverbSend { get; set; } public ushort MinTimeMinutes { get; set; } public ushort MaxTimeMinutes { get; set; } - public float Unk21 { get; set; } - public float Unk22 { get; set; } + public float BrokenHealth { get; set; } + public float UndamagedHealth { get; set; } public Dat151StaticEmitter(RelFile rel) : base(rel) { @@ -6098,68 +5973,66 @@ namespace CodeWalker.GameFiles } public Dat151StaticEmitter(RelData d, BinaryReader br) : base(d, br) { - Flags = br.ReadUInt32();//flags + Flags = br.ReadUInt32(); ChildSound = br.ReadUInt32(); RadioStation = br.ReadUInt32(); Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadInt32(); - LPFCutoff = br.ReadInt16(); - HPFCutoff = br.ReadInt16(); - Unk11 = br.ReadInt32(); + MinDistance = br.ReadSingle(); + MaxDistance = br.ReadSingle(); + EmittedVolume = br.ReadInt32(); + LPFCutoff = br.ReadUInt16(); + HPFCutoff = br.ReadUInt16(); + RolloffFactor = br.ReadUInt16(); + Padding00 = br.ReadUInt16(); Interior = br.ReadUInt32(); Room = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadUInt16(); - Unk16 = br.ReadUInt16(); + RadioStationForScore = br.ReadUInt32(); + MaxLeakage = br.ReadSingle(); + MinLeakageDistance = br.ReadUInt16(); + MaxLeakageDistance = br.ReadUInt16(); Alarm = br.ReadUInt32(); - Unk18 = br.ReadUInt32(); + OnBreakOneShot = br.ReadUInt32(); MaxPathDepth = br.ReadByte(); SmallReverbSend = br.ReadByte(); MediumReverbSend = br.ReadByte(); LargeReverbSend = br.ReadByte(); MinTimeMinutes = br.ReadUInt16(); MaxTimeMinutes = br.ReadUInt16(); - Unk21 = br.ReadSingle(); - Unk22 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + BrokenHealth = br.ReadSingle(); + UndamagedHealth = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Flags);//flags + bw.Write(Flags); bw.Write(ChildSound); bw.Write(RadioStation); bw.Write(Position.X); bw.Write(Position.Y); bw.Write(Position.Z); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); + bw.Write(MinDistance); + bw.Write(MaxDistance); + bw.Write(EmittedVolume); bw.Write(LPFCutoff); bw.Write(HPFCutoff); - bw.Write(Unk11); + bw.Write(RolloffFactor); + bw.Write(Padding00); bw.Write(Interior); bw.Write(Room); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); + bw.Write(RadioStationForScore); + bw.Write(MaxLeakage); + bw.Write(MinLeakageDistance); + bw.Write(MaxLeakageDistance); bw.Write(Alarm); - bw.Write(Unk18); + bw.Write(OnBreakOneShot); bw.Write(MaxPathDepth); bw.Write(SmallReverbSend); bw.Write(MediumReverbSend); bw.Write(LargeReverbSend); bw.Write(MinTimeMinutes); bw.Write(MaxTimeMinutes); - bw.Write(Unk21); - bw.Write(Unk22); + bw.Write(BrokenHealth); + bw.Write(UndamagedHealth); } public override void WriteXml(StringBuilder sb, int indent) { @@ -6167,28 +6040,28 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "ChildSound", RelXml.HashString(ChildSound)); RelXml.StringTag(sb, indent, "RadioStation", RelXml.HashString(RadioStation)); RelXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); + RelXml.ValueTag(sb, indent, "MinDistance", FloatUtil.ToString(MinDistance)); + RelXml.ValueTag(sb, indent, "MaxDistance", FloatUtil.ToString(MaxDistance)); + RelXml.ValueTag(sb, indent, "EmittedVolume", EmittedVolume.ToString()); RelXml.ValueTag(sb, indent, "LPFCutoff", LPFCutoff.ToString()); RelXml.ValueTag(sb, indent, "HPFCutoff", HPFCutoff.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); + RelXml.ValueTag(sb, indent, "RolloffFactor", RolloffFactor.ToString()); RelXml.StringTag(sb, indent, "Interior", RelXml.HashString(Interior)); RelXml.StringTag(sb, indent, "Room", RelXml.HashString(Room)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); + RelXml.StringTag(sb, indent, "RadioStationForScore", RelXml.HashString(RadioStationForScore)); + RelXml.ValueTag(sb, indent, "MaxLeakage", FloatUtil.ToString(MaxLeakage)); + RelXml.ValueTag(sb, indent, "MinLeakageDistance", MinLeakageDistance.ToString()); + RelXml.ValueTag(sb, indent, "MaxLeakageDistance", MaxLeakageDistance.ToString()); RelXml.StringTag(sb, indent, "Alarm", RelXml.HashString(Alarm)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); + RelXml.StringTag(sb, indent, "OnBreakOneShot", RelXml.HashString(OnBreakOneShot)); RelXml.ValueTag(sb, indent, "MaxPathDepth", MaxPathDepth.ToString()); RelXml.ValueTag(sb, indent, "SmallReverbSend", SmallReverbSend.ToString()); RelXml.ValueTag(sb, indent, "MediumReverbSend", MediumReverbSend.ToString()); RelXml.ValueTag(sb, indent, "LargeReverbSend", LargeReverbSend.ToString()); RelXml.ValueTag(sb, indent, "MinTimeMinutes", MinTimeMinutes.ToString()); RelXml.ValueTag(sb, indent, "MaxTimeMinutes", MaxTimeMinutes.ToString()); - RelXml.ValueTag(sb, indent, "Unk21", FloatUtil.ToString(Unk21)); - RelXml.ValueTag(sb, indent, "Unk22", FloatUtil.ToString(Unk22)); + RelXml.ValueTag(sb, indent, "BrokenHealth", FloatUtil.ToString(BrokenHealth)); + RelXml.ValueTag(sb, indent, "UndamagedHealth", FloatUtil.ToString(UndamagedHealth)); } public override void ReadXml(XmlNode node) { @@ -6196,56 +6069,58 @@ namespace CodeWalker.GameFiles ChildSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound")); RadioStation = XmlRel.GetHash(Xml.GetChildInnerText(node, "RadioStation")); Position = Xml.GetChildVector3Attributes(node, "Position"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); - LPFCutoff = (short)Xml.GetChildIntAttribute(node, "LPFCutoff", "value"); - HPFCutoff = (short)Xml.GetChildIntAttribute(node, "HPFCutoff", "value"); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); + MinDistance = Xml.GetChildFloatAttribute(node, "MinDistance", "value"); + MaxDistance = Xml.GetChildFloatAttribute(node, "MaxDistance", "value"); + EmittedVolume = Xml.GetChildIntAttribute(node, "EmittedVolume", "value"); + LPFCutoff = (ushort)Xml.GetChildIntAttribute(node, "LPFCutoff", "value"); + HPFCutoff = (ushort)Xml.GetChildIntAttribute(node, "HPFCutoff", "value"); + RolloffFactor = (ushort)Xml.GetChildIntAttribute(node, "RolloffFactor", "value"); Interior = XmlRel.GetHash(Xml.GetChildInnerText(node, "Interior")); Room = XmlRel.GetHash(Xml.GetChildInnerText(node, "Room")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = (ushort)Xml.GetChildUIntAttribute(node, "Unk15", "value"); - Unk16 = (ushort)Xml.GetChildUIntAttribute(node, "Unk16", "value"); + RadioStationForScore = XmlRel.GetHash(Xml.GetChildInnerText(node, "RadioStationForScore")); + MaxLeakage = Xml.GetChildFloatAttribute(node, "MaxLeakage", "value"); + MinLeakageDistance = (ushort)Xml.GetChildUIntAttribute(node, "MinLeakageDistance", "value"); + MaxLeakageDistance = (ushort)Xml.GetChildUIntAttribute(node, "MaxLeakageDistance", "value"); Alarm = XmlRel.GetHash(Xml.GetChildInnerText(node, "Alarm")); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); - MaxPathDepth = Xml.GetChildUIntAttribute(node, "MaxPathDepth", "value"); - SmallReverbSend = Xml.GetChildUIntAttribute(node, "SmallReverbSend", "value"); - MediumReverbSend = Xml.GetChildUIntAttribute(node, "MediumReverbSend", "value"); - LargeReverbSend = Xml.GetChildUIntAttribute(node, "LargeReverbSend", "value"); + OnBreakOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "OnBreakOneShot")); + MaxPathDepth = (byte)Xml.GetChildUIntAttribute(node, "MaxPathDepth", "value"); + SmallReverbSend = (byte)Xml.GetChildUIntAttribute(node, "SmallReverbSend", "value"); + MediumReverbSend = (byte)Xml.GetChildUIntAttribute(node, "MediumReverbSend", "value"); + LargeReverbSend = (byte)Xml.GetChildUIntAttribute(node, "LargeReverbSend", "value"); MinTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MinTimeMinutes", "value"); MaxTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MaxTimeMinutes", "value"); - Unk21 = Xml.GetChildFloatAttribute(node, "Unk21", "value"); - Unk22 = Xml.GetChildFloatAttribute(node, "Unk22", "value"); + BrokenHealth = Xml.GetChildFloatAttribute(node, "BrokenHealth", "value"); + UndamagedHealth = Xml.GetChildFloatAttribute(node, "UndamagedHealth", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { ChildSound, Unk18 }; + return new[] { ChildSound, OnBreakOneShot }; } public override MetaHash[] GetGameHashes() { return new[] { RadioStation, Alarm, Interior }; } } - [TC(typeof(EXP))] public class Dat151Interior : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151InteriorSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Walla { get; set; } - public MetaHash Tunnel { get; set; } + public MetaHash InteriorWallaSoundSet { get; set; } + public MetaHash InteriorReflections { get; set; } public uint RoomsCount { get; set; } public MetaHash[] Rooms { get; set; } - public Dat151Interior(RelFile rel) : base(rel) + public Dat151InteriorSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Interior; + Type = Dat151RelType.InteriorSettings; TypeID = (byte)Type; } - public Dat151Interior(RelData d, BinaryReader br) : base(d, br) + public Dat151InteriorSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Walla = br.ReadUInt32(); - Tunnel = br.ReadUInt32(); + InteriorWallaSoundSet = br.ReadUInt32(); + InteriorReflections = br.ReadUInt32(); RoomsCount = br.ReadUInt32(); var rooms = new MetaHash[RoomsCount]; for (int i = 0; i < RoomsCount; i++) @@ -6253,18 +6128,14 @@ namespace CodeWalker.GameFiles rooms[i] = br.ReadUInt32(); } Rooms = rooms; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Walla); - bw.Write(Tunnel); + bw.Write(InteriorWallaSoundSet); + bw.Write(InteriorReflections); bw.Write(RoomsCount); for (int i = 0; i < RoomsCount; i++) { @@ -6274,15 +6145,15 @@ namespace CodeWalker.GameFiles public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "Walla", RelXml.HashString(Walla)); - RelXml.StringTag(sb, indent, "Tunnel", RelXml.HashString(Tunnel)); + RelXml.StringTag(sb, indent, "InteriorWallaSoundSet", RelXml.HashString(InteriorWallaSoundSet)); + RelXml.StringTag(sb, indent, "InteriorReflections", RelXml.HashString(InteriorReflections)); RelXml.WriteHashItemArray(sb, Rooms, indent, "Rooms"); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Walla = XmlRel.GetHash(Xml.GetChildInnerText(node, "Walla")); - Tunnel = XmlRel.GetHash(Xml.GetChildInnerText(node, "Tunnel")); + InteriorWallaSoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorWallaSoundSet")); + InteriorReflections = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorReflections")); Rooms = XmlRel.ReadHashItemArray(node, "Rooms"); RoomsCount = (uint)(Rooms?.Length ?? 0); } @@ -6297,13 +6168,13 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetSoundHashes() { - return new[] { Walla }; + return new[] { InteriorWallaSoundSet }; } public override MetaHash[] GetGameHashes() { var list = new List(); - list.Add(Tunnel); + list.Add(InteriorReflections); if (Rooms != null) { list.AddRange(Rooms); @@ -6311,24 +6182,30 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151InteriorRoom : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151InteriorRoom : Dat151RelData { - public FlagsUint Flags0 { get; set; } - public MetaHash MloRoom { get; set; } - public MetaHash Zone { get; set; } - public uint Unk02 { get; set; } - public float Unk03 { get; set; } - public float Reverb { get; set; } - public float Echo { get; set; } - public MetaHash Sound { get; set; } - public float Unk07 { get; set; } - public float Unk08 { get; set; } - public float Unk09 { get; set; } - public float Unk10 { get; set; } - public float Unk11 { get; set; } - public float Unk12 { get; set; } - public MetaHash Unk13 { get; set; } - public MetaHash SoundSet { get; set; } + public FlagsUint Flags { get; set; } + public MetaHash RoomName { get; set; } + public MetaHash AmbientZone { get; set; } + public byte InteriorType { get; set; } + public byte padding00 { get; set; } + public short padding01 { get; set; } + public float ReverbSmall { get; set; } + public float ReverbMedium { get; set; } + public float ReverbLarge { get; set; } + public MetaHash RoomToneSound { get; set; } + public byte RainType { get; set; } + public byte padding02 { get; set; } + public short padding03 { get; set; } + public float ExteriorAudibility { get; set; } + public float RoomOcclusionDamping { get; set; } + public float NonMarkedPortalOcclusion { get; set; } + public float DistanceFromPortalForOcclusion { get; set; } + public float DistanceFromPortalFadeDistance { get; set; } + public MetaHash WeaponMetrics { get; set; } + public MetaHash InteriorWallaSoundSet { get; set; } public Dat151InteriorRoom(RelFile rel) : base(rel) { @@ -6337,85 +6214,89 @@ namespace CodeWalker.GameFiles } public Dat151InteriorRoom(RelData d, BinaryReader br) : base(d, br) { - Flags0 = br.ReadUInt32(); - MloRoom = br.ReadUInt32(); - Zone = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadSingle(); - Reverb = br.ReadSingle(); - Echo = br.ReadSingle(); - Sound = br.ReadUInt32(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadSingle(); - Unk10 = br.ReadSingle(); - Unk11 = br.ReadSingle(); - Unk12 = br.ReadSingle(); - Unk13 = br.ReadUInt32(); - SoundSet = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Flags = br.ReadUInt32(); + RoomName = br.ReadUInt32(); + AmbientZone = br.ReadUInt32(); + InteriorType = br.ReadByte(); + padding00 = br.ReadByte(); + padding01 = br.ReadInt16(); + ReverbSmall = br.ReadSingle(); + ReverbMedium = br.ReadSingle(); + ReverbLarge = br.ReadSingle(); + RoomToneSound = br.ReadUInt32(); + RainType = br.ReadByte(); + padding02 = br.ReadByte(); + padding03 = br.ReadInt16(); + ExteriorAudibility = br.ReadSingle(); + RoomOcclusionDamping = br.ReadSingle(); + NonMarkedPortalOcclusion = br.ReadSingle(); + DistanceFromPortalForOcclusion = br.ReadSingle(); + DistanceFromPortalFadeDistance = br.ReadSingle(); + WeaponMetrics = br.ReadUInt32(); + InteriorWallaSoundSet = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Flags0); - bw.Write(MloRoom); - bw.Write(Zone); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Reverb); - bw.Write(Echo); - bw.Write(Sound); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(SoundSet); + bw.Write(Flags); + bw.Write(RoomName); + bw.Write(AmbientZone); + bw.Write(InteriorType); + bw.Write(padding00); + bw.Write(padding01); + bw.Write(ReverbSmall); + bw.Write(ReverbMedium); + bw.Write(ReverbLarge); + bw.Write(RoomToneSound); + bw.Write(RainType); + bw.Write(padding02); + bw.Write(padding03); + bw.Write(ExteriorAudibility); + bw.Write(RoomOcclusionDamping); + bw.Write(NonMarkedPortalOcclusion); + bw.Write(DistanceFromPortalForOcclusion); + bw.Write(DistanceFromPortalFadeDistance); + bw.Write(WeaponMetrics); + bw.Write(InteriorWallaSoundSet); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Flags0", "0x" + Flags0.Hex); - RelXml.StringTag(sb, indent, "MloRoom", RelXml.HashString(MloRoom)); - RelXml.StringTag(sb, indent, "Zone", RelXml.HashString(Zone)); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Reverb", FloatUtil.ToString(Reverb)); - RelXml.ValueTag(sb, indent, "Echo", FloatUtil.ToString(Echo)); - RelXml.StringTag(sb, indent, "Sound", RelXml.HashString(Sound)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", FloatUtil.ToString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", FloatUtil.ToString(Unk11)); - RelXml.ValueTag(sb, indent, "Unk12", FloatUtil.ToString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.StringTag(sb, indent, "SoundSet", RelXml.HashString(SoundSet)); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); + RelXml.StringTag(sb, indent, "RoomName", RelXml.HashString(RoomName)); + RelXml.StringTag(sb, indent, "AmbientZone", RelXml.HashString(AmbientZone)); + RelXml.ValueTag(sb, indent, "InteriorType", InteriorType.ToString()); + RelXml.ValueTag(sb, indent, "ReverbSmall", FloatUtil.ToString(ReverbSmall)); + RelXml.ValueTag(sb, indent, "ReverbMedium", FloatUtil.ToString(ReverbMedium)); + RelXml.ValueTag(sb, indent, "ReverbLarge", FloatUtil.ToString(ReverbLarge)); + RelXml.StringTag(sb, indent, "RoomToneSound", RelXml.HashString(RoomToneSound)); + RelXml.ValueTag(sb, indent, "RainType", FloatUtil.ToString(RainType)); + RelXml.ValueTag(sb, indent, "ExteriorAudibility", FloatUtil.ToString(ExteriorAudibility)); + RelXml.ValueTag(sb, indent, "RoomOcclusionDamping", FloatUtil.ToString(RoomOcclusionDamping)); + RelXml.ValueTag(sb, indent, "NonMarkedPortalOcclusion", FloatUtil.ToString(NonMarkedPortalOcclusion)); + RelXml.ValueTag(sb, indent, "DistanceFromPortalForOcclusion", FloatUtil.ToString(DistanceFromPortalForOcclusion)); + RelXml.ValueTag(sb, indent, "DistanceFromPortalFadeDistance", FloatUtil.ToString(DistanceFromPortalFadeDistance)); + RelXml.StringTag(sb, indent, "WeaponMetrics", RelXml.HashString(WeaponMetrics)); + RelXml.StringTag(sb, indent, "InteriorWallaSoundSet", RelXml.HashString(InteriorWallaSoundSet)); } public override void ReadXml(XmlNode node) { - Flags0 = Xml.GetChildUIntAttribute(node, "Flags0", "value"); - MloRoom = XmlRel.GetHash(Xml.GetChildInnerText(node, "MloRoom")); - Zone = XmlRel.GetHash(Xml.GetChildInnerText(node, "Zone")); - Unk02 = Xml.GetChildUIntAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Reverb = Xml.GetChildFloatAttribute(node, "Reverb", "value"); - Echo = Xml.GetChildFloatAttribute(node, "Echo", "value"); - Sound = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sound")); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildFloatAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildFloatAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildFloatAttribute(node, "Unk12", "value"); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - SoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundSet")); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + RoomName = XmlRel.GetHash(Xml.GetChildInnerText(node, "RoomName")); + AmbientZone = XmlRel.GetHash(Xml.GetChildInnerText(node, "AmbientZone")); + InteriorType = (byte)Xml.GetChildUIntAttribute(node, "InteriorType", "value"); + ReverbSmall = Xml.GetChildFloatAttribute(node, "ReverbSmall", "value"); + ReverbMedium = Xml.GetChildFloatAttribute(node, "ReverbMedium", "value"); + ReverbLarge = Xml.GetChildFloatAttribute(node, "ReverbLarge", "value"); + RoomToneSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RoomToneSound")); + RainType = (byte)Xml.GetChildUIntAttribute(node, "RainType", "value"); + ExteriorAudibility = Xml.GetChildFloatAttribute(node, "ExteriorAudibility", "value"); + RoomOcclusionDamping = Xml.GetChildFloatAttribute(node, "RoomOcclusionDamping", "value"); + NonMarkedPortalOcclusion = Xml.GetChildFloatAttribute(node, "NonMarkedPortalOcclusion", "value"); + DistanceFromPortalForOcclusion = Xml.GetChildFloatAttribute(node, "DistanceFromPortalForOcclusion", "value"); + DistanceFromPortalFadeDistance = Xml.GetChildFloatAttribute(node, "DistanceFromPortalFadeDistance", "value"); + WeaponMetrics = XmlRel.GetHash(Xml.GetChildInnerText(node, "WeaponMetrics")); + InteriorWallaSoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorWallaSoundSet")); } public override uint[] GetHashTableOffsets() { @@ -6423,14 +6304,16 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetSoundHashes() { - return new[] { Sound, SoundSet }; + return new[] { RoomToneSound, InteriorWallaSoundSet }; } public override MetaHash[] GetGameHashes() { - return new[] { Zone, Unk13 }; + return new[] { AmbientZone, WeaponMetrics }; } } - [TC(typeof(EXP))] public class Dat151RadioStationList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151RadioStationList : Dat151RelData { public uint StationsCount { get; set; } public MetaHash[] Stations { get; set; } @@ -6449,10 +6332,6 @@ namespace CodeWalker.GameFiles tracks[i] = br.ReadUInt32(); } Stations = tracks; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -6487,58 +6366,59 @@ namespace CodeWalker.GameFiles return Stations; } } - [TC(typeof(EXP))] public class Dat151RadioStation : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151RadioStationSettings : Dat151RelData { - public FlagsUint Unk00 { get; set; } + public FlagsUint Flags { get; set; } public uint WheelPosition { get; set; } - public uint Unk02 { get; set; } - public ushort MusicGenre { get; set; } + public uint NextStationSettingsPtr { get; set; } + public byte Genre { get; set; } + public byte AmbientRadioVol { get; set; } public string RadioName { get; set; } - public ushort Unk04 { get; set; } + public ushort padding00 { get; set; } - public uint MusicListCount { get; set; } - public MetaHash[] MusicList { get; set; } + public uint NumTrackList { get; set; } + public MetaHash[] TrackList { get; set; } - public Dat151RadioStation(RelFile rel) : base(rel) + public Dat151RadioStationSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.RadioStation; + Type = Dat151RelType.RadioStationSettings; TypeID = (byte)Type; } - public Dat151RadioStation(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioStationSettings(RelData d, BinaryReader br) : base(d, br) { - Unk00 = br.ReadUInt32(); + Flags = br.ReadUInt32(); WheelPosition = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - MusicGenre = br.ReadUInt16(); + NextStationSettingsPtr = br.ReadUInt32(); + Genre = br.ReadByte(); + AmbientRadioVol = br.ReadByte(); var data = br.ReadBytes(32); RadioName = Encoding.ASCII.GetString(data).Replace("\0", ""); - Unk04 = br.ReadUInt16(); + padding00 = br.ReadUInt16(); - if (Unk04 != 0) + if (padding00 != 0) { } - MusicListCount = br.ReadUInt32(); - var tracks = new MetaHash[MusicListCount]; - for (int i = 0; i < MusicListCount; i++) + NumTrackList = br.ReadUInt32(); + var tracks = new MetaHash[NumTrackList]; + for (int i = 0; i < NumTrackList; i++) { tracks[i] = br.ReadUInt32(); } - MusicList = tracks; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + TrackList = tracks; } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk00); + bw.Write(Flags); bw.Write(WheelPosition); - bw.Write(Unk02); - bw.Write(MusicGenre); + bw.Write(NextStationSettingsPtr); + bw.Write(Genre); + bw.Write(AmbientRadioVol); byte[] data = new byte[32]; int len = Math.Min(RadioName?.Length ?? 0, 32); @@ -6548,39 +6428,37 @@ namespace CodeWalker.GameFiles } bw.Write(data); - bw.Write(Unk04); + bw.Write(padding00); - bw.Write(MusicListCount); - for (int i = 0; i < MusicListCount; i++) + bw.Write(NumTrackList); + for (int i = 0; i < NumTrackList; i++) { - bw.Write(MusicList[i]); + bw.Write(TrackList[i]); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk00", "0x" + Unk00.Hex); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); RelXml.ValueTag(sb, indent, "WheelPosition", WheelPosition.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "MusicGenre", MusicGenre.ToString()); + RelXml.ValueTag(sb, indent, "Genre", Genre.ToString()); + RelXml.ValueTag(sb, indent, "AmbientRadioVol", AmbientRadioVol.ToString()); RelXml.StringTag(sb, indent, "RadioName", RadioName); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.WriteHashItemArray(sb, MusicList, indent, "MusicList"); + RelXml.WriteHashItemArray(sb, TrackList, indent, "TrackList"); } public override void ReadXml(XmlNode node) { - Unk00 = Xml.GetChildUIntAttribute(node, "Unk00", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); WheelPosition = Xml.GetChildUIntAttribute(node, "WheelPosition", "value"); - Unk02 = Xml.GetChildUIntAttribute(node, "Unk02", "value"); - MusicGenre = (ushort)Xml.GetChildUIntAttribute(node, "MusicGenre", "value"); + Genre = (byte)Xml.GetChildUIntAttribute(node, "Genre", "value"); + AmbientRadioVol = (byte)Xml.GetChildUIntAttribute(node, "AmbientRadioVol", "value"); RadioName = Xml.GetChildInnerText(node, "RadioName"); - Unk04 = (ushort)Xml.GetChildUIntAttribute(node, "Unk04", "value"); - MusicList = XmlRel.ReadHashItemArray(node, "MusicList"); - MusicListCount = (uint)(MusicList?.Length ?? 0); + TrackList = XmlRel.ReadHashItemArray(node, "TrackList"); + NumTrackList = (uint)(TrackList?.Length ?? 0); } public override uint[] GetHashTableOffsets() { var offsets = new List(); - for (uint i = 0; i < MusicListCount; i++) + for (uint i = 0; i < NumTrackList; i++) { offsets.Add(52 + i * 4); } @@ -6588,11 +6466,13 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetGameHashes() { - return MusicList; + return TrackList; } } - [TC(typeof(EXP))] public class Dat151RadioTrack : Dat151RelData //used exclusively for radio stuff, eg music dj lines and idents - { + + [TC(typeof(EXP))] + public class Dat151RadioStationTrackList : Dat151RelData + { public FlagsUint Unk00 { get; set; } public byte TrackType { get; set; } public uint Unk01 { get; set; } @@ -6615,12 +6495,12 @@ namespace CodeWalker.GameFiles public Dat151HashPair[] Tracks { get; set; } - public Dat151RadioTrack(RelFile rel) : base(rel) + public Dat151RadioStationTrackList(RelFile rel) : base(rel) { - Type = Dat151RelType.RadioTrack; + Type = Dat151RelType.RadioStationTrackList; TypeID = (byte)Type; } - public Dat151RadioTrack(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioStationTrackList(RelData d, BinaryReader br) : base(d, br) { Unk00 = br.ReadUInt32(); TrackType = br.ReadByte(); @@ -6648,34 +6528,6 @@ namespace CodeWalker.GameFiles items[i] = new Dat151HashPair(br); } this.Tracks = items; - - - - if (Unk04 != 0) - { } - if (Unk05 != 0) - { } - if (Unk06 != 0) - { } - if (Unk07 != 0) - { } - if (Unk08 != 0) - { } - if (Unk09 != 0) - { } - if (Unk10 != 0) - { } - if (Unk11 != 0) - { } - if (Unk12 != 0) - { } - if (Unk13 != 0) - { } - - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -6713,19 +6565,6 @@ namespace CodeWalker.GameFiles RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); RelXml.WriteItemArray(sb, Tracks, indent, "Tracks"); } public override void ReadXml(XmlNode node) @@ -6735,19 +6574,6 @@ namespace CodeWalker.GameFiles Unk01 = Xml.GetChildUIntAttribute(node, "Unk01", "value"); Unk02 = Xml.GetChildUIntAttribute(node, "Unk02", "value"); Unk03 = (byte)Xml.GetChildUIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildUIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildUIntAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildUIntAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildUIntAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildUIntAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildUIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildUIntAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildUIntAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildUIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildUIntAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildUIntAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildUIntAttribute(node, "Unk15", "value"); - Unk16 = (ushort)Xml.GetChildUIntAttribute(node, "Unk16", "value"); Tracks = XmlRel.ReadItemArray(node, "Tracks"); TracksCount = (uint)(Tracks?.Length ?? 0); } @@ -6758,24 +6584,26 @@ namespace CodeWalker.GameFiles { foreach (var item in Tracks) { - list.Add(item.Hash1); + list.Add(item.SoundRef); } } return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151TrackList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ReplayRadioStationTrackList : Dat151RelData { public FlagsUint Unk00 { get; set; } public uint TrackCount { get; set; } public Dat151HashPair[] Tracks { get; set; } - public Dat151TrackList(RelFile rel) : base(rel) + public Dat151ReplayRadioStationTrackList(RelFile rel) : base(rel) { - Type = Dat151RelType.TrackList; + Type = Dat151RelType.ReplayRadioStationTrackList; TypeID = (byte)Type; } - public Dat151TrackList(RelData d, BinaryReader br) : base(d, br) + public Dat151ReplayRadioStationTrackList(RelData d, BinaryReader br) : base(d, br) { Unk00 = br.ReadUInt32(); TrackCount = br.ReadUInt32(); @@ -6784,10 +6612,6 @@ namespace CodeWalker.GameFiles { Tracks[i] = new Dat151HashPair(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -6819,38 +6643,36 @@ namespace CodeWalker.GameFiles { foreach (var item in Tracks) { - list.Add(item.Hash1); + list.Add(item.SoundRef); } } return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151WeaponAudioItem : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ItemAudioSettings : Dat151RelData { public MetaHash FallBackWeapon { get; set; } public uint WeaponsCount { get; set; } - public Dat151WeaponAudioItemItem[] Weapons { get; set; } + public Dat151ItemAudioSettingsItem[] Weapons { get; set; } - public Dat151WeaponAudioItem(RelFile rel) : base(rel) + public Dat151ItemAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.WeaponAudioItem; + Type = Dat151RelType.ItemAudioSettings; TypeID = (byte)Type; } - public Dat151WeaponAudioItem(RelData d, BinaryReader br) : base(d, br) + public Dat151ItemAudioSettings(RelData d, BinaryReader br) : base(d, br) { FallBackWeapon = br.ReadUInt32(); WeaponsCount = br.ReadUInt32(); - Dat151WeaponAudioItemItem[] items = new Dat151WeaponAudioItemItem[WeaponsCount]; + Dat151ItemAudioSettingsItem[] items = new Dat151ItemAudioSettingsItem[WeaponsCount]; for (int i = 0; i < WeaponsCount; i++) { - items[i] = new Dat151WeaponAudioItemItem(br); + items[i] = new Dat151ItemAudioSettingsItem(br); } this.Weapons = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -6870,7 +6692,7 @@ namespace CodeWalker.GameFiles public override void ReadXml(XmlNode node) { FallBackWeapon = XmlRel.GetHash(Xml.GetChildInnerText(node, "FallBackWeapon")); - Weapons = XmlRel.ReadItemArray(node, "Weapons"); + Weapons = XmlRel.ReadItemArray(node, "Weapons"); WeaponsCount = (uint)(Weapons?.Length ?? 0); } public override uint[] GetHashTableOffsets() @@ -6912,12 +6734,14 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public struct Dat151WeaponAudioItemItem : IMetaXmlItem + + [TC(typeof(EXP))] + public struct Dat151ItemAudioSettingsItem : IMetaXmlItem { public MetaHash Category { get; set; } public MetaHash Weapon { get; set; } - public Dat151WeaponAudioItemItem(BinaryReader br) + public Dat151ItemAudioSettingsItem(BinaryReader br) { Category = br.ReadUInt32(); Weapon = br.ReadUInt32(); @@ -6942,12 +6766,14 @@ namespace CodeWalker.GameFiles return Category.ToString() + ": " + Weapon.ToString(); } } - [TC(typeof(EXP))] public class Dat151StartTrackAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151StartTrackAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public float Unk3 { get; set; } public MetaHash Track { get; set; } @@ -6989,13 +6815,6 @@ namespace CodeWalker.GameFiles items[i] = new Dat151StartTrackActionItem(br); } this.Tracks = items; - - if (Unk1 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7079,7 +6898,9 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public struct Dat151StartTrackActionItem : IMetaXmlItem + + [TC(typeof(EXP))] + public struct Dat151StartTrackActionItem : IMetaXmlItem { public MetaHash Track { get; set; } public FlagsUint Flags { get; set; } @@ -7109,12 +6930,14 @@ namespace CodeWalker.GameFiles return Track.ToString() + ": " + Flags.ToString(); } } - [TC(typeof(EXP))] public class Dat151StopTrackAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151StopTrackAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public float Unk3 { get; set; } public int Unk4 { get; set; } @@ -7133,13 +6956,6 @@ namespace CodeWalker.GameFiles Beat = br.ReadUInt32(); Unk3 = br.ReadSingle(); Unk4 = br.ReadInt32(); - - if (Unk1 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7183,37 +6999,34 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151Mood : Dat151RelData + [TC(typeof(EXP))] + public class Dat151InteractiveMusicMood : Dat151RelData { public FlagsUint Unk0 { get; set; } public ushort FadeIn { get; set; } public ushort FadeOut { get; set; } public float Unk3 { get; set; } public uint MoodsCount { get; set; } - public Dat151MoodItem[] Moods { get; set; } + public Dat151InteractiveMusicMoodItem[] Moods { get; set; } - public Dat151Mood(RelFile rel) : base(rel) + public Dat151InteractiveMusicMood(RelFile rel) : base(rel) { - Type = Dat151RelType.Mood; + Type = Dat151RelType.InteractiveMusicMood; TypeID = (byte)Type; } - public Dat151Mood(RelData d, BinaryReader br) : base(d, br) + public Dat151InteractiveMusicMood(RelData d, BinaryReader br) : base(d, br) { Unk0 = br.ReadUInt32(); FadeIn = br.ReadUInt16(); FadeOut = br.ReadUInt16(); Unk3 = br.ReadSingle(); MoodsCount = br.ReadUInt32(); - var items = new Dat151MoodItem[MoodsCount]; + var items = new Dat151InteractiveMusicMoodItem[MoodsCount]; for (int i = 0; i < MoodsCount; i++) { - items[i] = new Dat151MoodItem(br); + items[i] = new Dat151InteractiveMusicMoodItem(br); } Moods = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7243,7 +7056,7 @@ namespace CodeWalker.GameFiles FadeIn = (ushort)Xml.GetChildUIntAttribute(node, "FadeIn", "value"); FadeOut = (ushort)Xml.GetChildUIntAttribute(node, "FadeOut", "value"); Unk3 = Xml.GetChildFloatAttribute(node, "Unk3", "value"); - Moods = XmlRel.ReadItemArray(node, "Moods"); + Moods = XmlRel.ReadItemArray(node, "Moods"); MoodsCount = (uint)(Moods?.Length ?? 0); } public override uint[] GetHashTableOffsets() @@ -7277,7 +7090,7 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public class Dat151MoodItem : IMetaXmlItem + public class Dat151InteractiveMusicMoodItem : IMetaXmlItem { public MetaHash StemMix { get; set; } public MetaHash StopAction { get; set; } @@ -7285,18 +7098,18 @@ namespace CodeWalker.GameFiles public float Unk2 { get; set; } public float Unk3 { get; set; } public float Unk4 { get; set; } - public MetaHash Bar { get; set; }//MusicBar - public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. + public MetaHash Bar { get; set; } + public MetaHash Beat { get; set; } public override string ToString() { return StemMix.ToString(); } - public Dat151MoodItem() + public Dat151InteractiveMusicMoodItem() { } - public Dat151MoodItem(BinaryReader br) + public Dat151InteractiveMusicMoodItem(BinaryReader br) { StemMix = br.ReadUInt32(); StopAction = br.ReadUInt32(); @@ -7342,12 +7155,13 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151SetMoodAction : Dat151RelData + [TC(typeof(EXP))] + public class Dat151SetMoodAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public float Unk3 { get; set; } public MetaHash Mood { get; set; } @@ -7372,17 +7186,6 @@ namespace CodeWalker.GameFiles Unk4 = br.ReadSingle(); FadeIn = br.ReadInt32(); FadeOut = br.ReadInt32(); - - if (Unk1 != 0) - { } - if (this.Bar != 0) - { } - if (this.Beat != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7434,17 +7237,19 @@ namespace CodeWalker.GameFiles return new[] { Bar, Beat, Mood }; } } - [TC(typeof(EXP))] public class Dat151PlayerAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151MusicEvent : Dat151RelData { public uint AudioTrackCount { get; set; } public MetaHash[] AudioTracks { get; set; } - public Dat151PlayerAction(RelFile rel) : base(rel) + public Dat151MusicEvent(RelFile rel) : base(rel) { - Type = Dat151RelType.PlayerAction; + Type = Dat151RelType.MusicEvent; TypeID = (byte)Type; } - public Dat151PlayerAction(RelData d, BinaryReader br) : base(d, br) + public Dat151MusicEvent(RelData d, BinaryReader br) : base(d, br) { AudioTrackCount = br.ReadUInt32(); var tracks = new MetaHash[AudioTrackCount]; @@ -7453,10 +7258,6 @@ namespace CodeWalker.GameFiles tracks[i] = br.ReadUInt32(); } AudioTracks = tracks; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7493,12 +7294,13 @@ namespace CodeWalker.GameFiles return AudioTracks; } } - [TC(typeof(EXP))] public class Dat151StartOneShotAction : Dat151RelData + [TC(typeof(EXP))] + public class Dat151StartOneShotAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public float Unk3 { get; set; } public MetaHash Sound { get; set; } @@ -7525,13 +7327,6 @@ namespace CodeWalker.GameFiles Unk6 = br.ReadInt32(); Unk7 = br.ReadInt32(); Unk8 = br.ReadInt32(); - - if (Unk1 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7590,12 +7385,14 @@ namespace CodeWalker.GameFiles return new[] { Bar, Beat }; } } - [TC(typeof(EXP))] public class Dat151StopOneShotAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151StopOneShotAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public int Unk3 { get; set; } @@ -7612,17 +7409,6 @@ namespace CodeWalker.GameFiles Bar = br.ReadUInt32(); Beat = br.ReadUInt32(); Unk3 = br.ReadInt32(); - - if (Unk1 != 0) - { } - if (Unk2 != 0) - { } - if (Unk3 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7662,12 +7448,14 @@ namespace CodeWalker.GameFiles return new[] { Bar, Beat }; } } - [TC(typeof(EXP))] public class Dat151FadeInRadioAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151FadeInRadioAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public float Unk3 { get; set; } public float Unk4 { get; set; } @@ -7686,15 +7474,6 @@ namespace CodeWalker.GameFiles Beat = br.ReadUInt32(); Unk3 = br.ReadSingle(); Unk4 = br.ReadSingle(); - - if (Unk1 != 0) - { } - if (Unk2 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7737,12 +7516,14 @@ namespace CodeWalker.GameFiles return new[] { Bar, Beat }; } } - [TC(typeof(EXP))] public class Dat151FadeOutRadioAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151FadeOutRadioAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } public int Unk2 { get; set; } - public MetaHash Bar { get; set; }//MusicBar + public MetaHash Bar { get; set; }//BarConstraint public MetaHash Beat { get; set; }//not used but follows same pattern as TrackAction items. public float Unk3 { get; set; } public float Unk4 { get; set; } @@ -7761,15 +7542,6 @@ namespace CodeWalker.GameFiles Beat = br.ReadUInt32(); Unk3 = br.ReadSingle(); Unk4 = br.ReadSingle(); - - if (Unk1 != 0) - { } - if (Unk2 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -7812,7 +7584,9 @@ namespace CodeWalker.GameFiles return new[] { Bar, Beat }; } } - [TC(typeof(EXP))] public class Dat151ModelAudioCollisionSettings : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ModelAudioCollisionSettings : Dat151RelData { public FlagsUint Flags { get; set; } public int Unk01 { get; set; } @@ -7834,7 +7608,7 @@ namespace CodeWalker.GameFiles public byte Unk16 { get; set; } public byte Unk17 { get; set; } public MetaHash Material { get; set; }//not used - public Dat151ModelAudioCollisionSettingsMaterialItem[] Materials { get; set; }//AudioMaterial pairs + public Dat151ModelAudioCollisionSettingsMaterialItem[] Materials { get; set; }//CollisionMaterialSettings pairs public uint PhysicsCount { get; set; } public MetaHash[] Physics { get; set; }//more mod objects @@ -7907,10 +7681,6 @@ namespace CodeWalker.GameFiles } Physics = tracks2; } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -8090,22 +7860,20 @@ namespace CodeWalker.GameFiles return InputMaterial.ToString() + ": " + OutputMaterial.ToString(); } } - [TC(typeof(EXP))] public class Dat151DoorModel : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151DoorAudioSettingsLink : Dat151RelData { public MetaHash Door { get; set; } - public Dat151DoorModel(RelFile rel) : base(rel) + public Dat151DoorAudioSettingsLink(RelFile rel) : base(rel) { - Type = Dat151RelType.DoorModel; + Type = Dat151RelType.DoorAudioSettingsLink; TypeID = (byte)Type; } - public Dat151DoorModel(RelData d, BinaryReader br) : base(d, br) + public Dat151DoorAudioSettingsLink(RelData d, BinaryReader br) : base(d, br) { Door = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -8130,7 +7898,9 @@ namespace CodeWalker.GameFiles return new[] { Door }; } } - [TC(typeof(EXP))] public class Dat151AudioMaterial : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151CollisionMaterialSettings : Dat151RelData { public FlagsUint Unk00 { get; set; } public MetaHash Unk01 { get; set; } @@ -8166,7 +7936,7 @@ namespace CodeWalker.GameFiles public MetaHash Footsteps { get; set; } public int Unk31 { get; set; } public MetaHash Unk32 { get; set; } - public MetaHash AnimalFootsteps { get; set; } + public MetaHash AnimalFootstepSettings { get; set; } public MetaHash AudioTrack2 { get; set; } public MetaHash Unk33 { get; set; } public MetaHash Unk34 { get; set; } @@ -8213,7 +7983,7 @@ namespace CodeWalker.GameFiles public MetaHash Unk75 { get; set; } public MetaHash Unk76 { get; set; } public float Unk77 { get; set; } - public MetaHash Unk78 { get; set; }//another AudioMaterial + public MetaHash Unk78 { get; set; }//another CollisionMaterialSettings public MetaHash Unk79 { get; set; }//self reference public MetaHash Unk80 { get; set; } public MetaHash Unk81 { get; set; } @@ -8226,12 +7996,12 @@ namespace CodeWalker.GameFiles public MetaHash Unk88 { get; set; } public int Unk89 { get; set; } - public Dat151AudioMaterial(RelFile rel) : base(rel) + public Dat151CollisionMaterialSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.AudioMaterial; + Type = Dat151RelType.CollisionMaterialSettings; TypeID = (byte)Type; } - public Dat151AudioMaterial(RelData d, BinaryReader br) : base(d, br) + public Dat151CollisionMaterialSettings(RelData d, BinaryReader br) : base(d, br) { Unk00 = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -8267,7 +8037,7 @@ namespace CodeWalker.GameFiles Footsteps = br.ReadUInt32(); Unk31 = br.ReadInt32(); Unk32 = br.ReadUInt32(); - AnimalFootsteps = br.ReadUInt32(); + AnimalFootstepSettings = br.ReadUInt32(); AudioTrack2 = br.ReadUInt32(); Unk33 = br.ReadUInt32(); Unk34 = br.ReadUInt32(); @@ -8326,25 +8096,6 @@ namespace CodeWalker.GameFiles Unk87 = br.ReadInt32(); Unk88 = br.ReadUInt32(); Unk89 = br.ReadInt32(); - - if (Unk58 != 0) - { } - if (Unk61 != 0) - { } - if (Unk62 != 0) - { } - if (Unk66 != 0) - { } - if (Unk87 != 0) - { } - if (Unk89 != 0) - { } - if (Unk79 != NameHash) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -8384,7 +8135,7 @@ namespace CodeWalker.GameFiles bw.Write(Footsteps); bw.Write(Unk31); bw.Write(Unk32); - bw.Write(AnimalFootsteps); + bw.Write(AnimalFootstepSettings); bw.Write(AudioTrack2); bw.Write(Unk33); bw.Write(Unk34); @@ -8480,7 +8231,7 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "Footsteps", RelXml.HashString(Footsteps)); RelXml.ValueTag(sb, indent, "Unk31", Unk31.ToString()); RelXml.StringTag(sb, indent, "Unk32", RelXml.HashString(Unk32)); - RelXml.StringTag(sb, indent, "AnimalFootsteps", RelXml.HashString(AnimalFootsteps)); + RelXml.StringTag(sb, indent, "AnimalFootstepSettings", RelXml.HashString(AnimalFootstepSettings)); RelXml.StringTag(sb, indent, "AudioTrack2", RelXml.HashString(AudioTrack2)); RelXml.StringTag(sb, indent, "Unk33", RelXml.HashString(Unk33)); RelXml.StringTag(sb, indent, "Unk34", RelXml.HashString(Unk34)); @@ -8576,7 +8327,7 @@ namespace CodeWalker.GameFiles Footsteps = XmlRel.GetHash(Xml.GetChildInnerText(node, "Footsteps")); Unk31 = Xml.GetChildIntAttribute(node, "Unk31", "value"); Unk32 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk32")); - AnimalFootsteps = XmlRel.GetHash(Xml.GetChildInnerText(node, "AnimalFootsteps")); + AnimalFootstepSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "AnimalFootstepSettings")); AudioTrack2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "AudioTrack2")); Unk33 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk33")); Unk34 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk34")); @@ -8654,385 +8405,355 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetGameHashes() { - return new[] { Footsteps, Unk32, AnimalFootsteps, Unk54, Unk78, /*Unk79*/ }; + return new[] { Footsteps, Unk32, AnimalFootstepSettings, Unk54, Unk78, /*Unk79*/ }; } } - [TC(typeof(EXP))] public class Dat151VehicleCollision : Dat151RelData - { - public FlagsUint Flags { get; set; } - public uint Unk01 { get; set; } - public MetaHash Scrape { get; set; } - public MetaHash SlowScrape { get; set; } - public MetaHash ScrapeImpact { get; set; } - public MetaHash SlowScrapeImpact { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public float Unk08 { get; set; } - public MetaHash ScrapePitch { get; set; } - public MetaHash ScrapeVolume { get; set; } - public MetaHash SlowScrapeVolume { get; set; } - public MetaHash ScrapeImpactVolume { get; set; } - public MetaHash SlowScrapeImpactVolume { get; set; } - public MetaHash Unk14 { get; set; } - public MetaHash Unk15 { get; set; } - public MetaHash Unk16 { get; set; } - public MetaHash Unk17 { get; set; } - public MetaHash Unk18 { get; set; } - public MetaHash Unk19 { get; set; } - public MetaHash Unk20 { get; set; } - public float Unk21 { get; set; } - public float Unk22 { get; set; } - public float Unk23 { get; set; } - public float Unk24 { get; set; } - public float Unk25 { get; set; } - public float Unk26 { get; set; } - public MetaHash Unk27 { get; set; } - public MetaHash Unk28 { get; set; } - public MetaHash Unk29 { get; set; }//AudioMaterial - public MetaHash Unk30 { get; set; } - public MetaHash Unk31 { get; set; } - public MetaHash Unk32 { get; set; } - public MetaHash Unk33 { get; set; } - public float Unk34 { get; set; } - public float Unk35 { get; set; } - public float Unk36 { get; set; } - public float Unk37 { get; set; } - public uint Unk38 { get; set; } - public float Unk39 { get; set; } - public float Unk40 { get; set; } - public float Unk41 { get; set; } - public float Unk42 { get; set; } - public float Unk43 { get; set; } - public float Unk44 { get; set; } - public MetaHash Unk45 { get; set; } - public MetaHash Unk46 { get; set; } - public MetaHash Unk47 { get; set; } - public MetaHash Unk48 { get; set; }//AudioMaterial - public MetaHash Unk49 { get; set; }//AudioMaterial - public uint HasAudioTracks { get; set; } - public MetaHash AudioTrack0 { get; set; }//AudioMaterial - public MetaHash AudioTrack1 { get; set; }//AudioMaterial - public Dat151VehicleCollision(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151VehicleCollisionSettings : Dat151RelData + { + public uint MediumIntensity { get; set; } + public uint HighIntensity { get; set; } + public MetaHash SmallScrapeImpact { get; set; } + public MetaHash SlowScrapeImpact { get; set; } + public MetaHash SlowScrapeLoop { get; set; } + public MetaHash RollSound { get; set; } + public MetaHash VehOnVehCrashSound { get; set; } + public MetaHash HighImpactSweetenerSound { get; set; } + public float SweetenerImpactThreshold { get; set; } + public MetaHash ScrapePitchCurve { get; set; } + public MetaHash ScrapeVolCurve { get; set; } + public MetaHash SlowScrapeVolCurve { get; set; } + public MetaHash ScrapeImpactVolCurve { get; set; } + public MetaHash SlowScrapeImpactCurve { get; set; } + public MetaHash ImpactStartOffsetCurve { get; set; } + public MetaHash ImpactVolCurve { get; set; } + public MetaHash VehicleImpactStartOffsetCurve { get; set; } + public MetaHash VehicleImpactVolCurve { get; set; } + public MetaHash VelocityImpactScalingCurve { get; set; } + public MetaHash FakeImpactStartOffsetCurve { get; set; } + public MetaHash FakeImpactVolCurve { get; set; } + public float FakeImpactMin { get; set; } + public float FakeImpactMax { get; set; } + public float FakeImpactScale { get; set; } + public float VehicleSizeScale { get; set; } + public float FakeImpactTriggerDelta { get; set; } + public float FakeImpactSweetenerThreshold { get; set; } + public MetaHash DamageVolCurve { get; set; } + public MetaHash JumpLandVolCurve { get; set; } + public MetaHash VehicleMaterialSettings { get; set; }//CollisionMaterialSettings + public MetaHash DeformationSound { get; set; } + public MetaHash ImpactDebris { get; set; } + public MetaHash GlassDebris { get; set; } + public MetaHash PostImpactDebris { get; set; } + public float PedCollisionMin { get; set; } + public float PedCollisionMax { get; set; } + public float CollisionMin { get; set; } + public float CollisionMax { get; set; } + public float VehicleCollisionMin { get; set; } + public float VehicleCollisionMax { get; set; } + public float VehicleSweetenerThreshold { get; set; } + public float ScrapeMin { get; set; } + public float ScrapeMax { get; set; } + public float DamageMin { get; set; } + public float DamageMax { get; set; } + public MetaHash TrainImpact { get; set; } + public MetaHash TrainImpactLoop { get; set; } + public MetaHash WaveImpactLoop { get; set; } + public MetaHash FragMaterial { get; set; } + public MetaHash WheelFragMaterial { get; set; } + public byte NumMeleeMaterialOverrides { get; set; } + public byte padding00 { get; set; } + public short padding01 { get; set; } + + public Dat151VehicleCollisionSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleCollision; + Type = Dat151RelType.VehicleCollisionSettings; TypeID = (byte)Type; } - public Dat151VehicleCollision(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleCollisionSettings(RelData d, BinaryReader br) : base(d, br) { - Flags = br.ReadUInt32(); - Unk01 = br.ReadUInt32(); - Scrape = br.ReadUInt32(); - SlowScrape = br.ReadUInt32(); - ScrapeImpact = br.ReadUInt32(); + MediumIntensity = br.ReadUInt32(); + HighIntensity = br.ReadUInt32(); + SmallScrapeImpact = br.ReadUInt32(); SlowScrapeImpact = br.ReadUInt32(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadSingle(); - ScrapePitch = br.ReadUInt32(); - ScrapeVolume = br.ReadUInt32(); - SlowScrapeVolume = br.ReadUInt32(); - ScrapeImpactVolume = br.ReadUInt32(); - SlowScrapeImpactVolume = br.ReadUInt32(); - Unk14 = br.ReadUInt32(); - Unk15 = br.ReadUInt32(); - Unk16 = br.ReadUInt32(); - Unk17 = br.ReadUInt32(); - Unk18 = br.ReadUInt32(); - Unk19 = br.ReadUInt32(); - Unk20 = br.ReadUInt32(); - Unk21 = br.ReadSingle(); - Unk22 = br.ReadSingle(); - Unk23 = br.ReadSingle(); - Unk24 = br.ReadSingle(); - Unk25 = br.ReadSingle(); - Unk26 = br.ReadSingle(); - Unk27 = br.ReadUInt32(); - Unk28 = br.ReadUInt32(); - Unk29 = br.ReadUInt32(); - Unk30 = br.ReadUInt32(); - Unk31 = br.ReadUInt32(); - Unk32 = br.ReadUInt32(); - Unk33 = br.ReadUInt32(); - Unk34 = br.ReadSingle(); - Unk35 = br.ReadSingle(); - Unk36 = br.ReadSingle(); - Unk37 = br.ReadSingle(); - Unk38 = br.ReadUInt32(); - Unk39 = br.ReadSingle(); - Unk40 = br.ReadSingle(); - Unk41 = br.ReadSingle(); - Unk42 = br.ReadSingle(); - Unk43 = br.ReadSingle(); - Unk44 = br.ReadSingle(); - Unk45 = br.ReadUInt32(); - Unk46 = br.ReadUInt32(); - Unk47 = br.ReadUInt32(); - Unk48 = br.ReadUInt32(); - Unk49 = br.ReadUInt32(); - HasAudioTracks = br.ReadUInt32(); - if (HasAudioTracks > 0) - { - AudioTrack0 = br.ReadUInt32(); - AudioTrack1 = br.ReadUInt32(); - } - switch (HasAudioTracks) - { - case 0: - case 1: - break; - default: - break; - } - - if (Flags != 0) - { } - if (Unk01 != 0) - { } - if (Unk38 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + SlowScrapeLoop = br.ReadUInt32(); + RollSound = br.ReadUInt32(); + VehOnVehCrashSound = br.ReadUInt32(); + HighImpactSweetenerSound = br.ReadUInt32(); + SweetenerImpactThreshold = br.ReadSingle(); + ScrapePitchCurve = br.ReadUInt32(); + ScrapeVolCurve = br.ReadUInt32(); + SlowScrapeVolCurve = br.ReadUInt32(); + ScrapeImpactVolCurve = br.ReadUInt32(); + SlowScrapeImpactCurve = br.ReadUInt32(); + ImpactStartOffsetCurve = br.ReadUInt32(); + ImpactVolCurve = br.ReadUInt32(); + VehicleImpactStartOffsetCurve = br.ReadUInt32(); + VehicleImpactVolCurve = br.ReadUInt32(); + VelocityImpactScalingCurve = br.ReadUInt32(); + FakeImpactStartOffsetCurve = br.ReadUInt32(); + FakeImpactVolCurve = br.ReadUInt32(); + FakeImpactMin = br.ReadSingle(); + FakeImpactMax = br.ReadSingle(); + FakeImpactScale = br.ReadSingle(); + VehicleSizeScale = br.ReadSingle(); + FakeImpactTriggerDelta = br.ReadSingle(); + FakeImpactSweetenerThreshold = br.ReadSingle(); + DamageVolCurve = br.ReadUInt32(); + JumpLandVolCurve = br.ReadUInt32(); + VehicleMaterialSettings = br.ReadUInt32(); + DeformationSound = br.ReadUInt32(); + ImpactDebris = br.ReadUInt32(); + GlassDebris = br.ReadUInt32(); + PostImpactDebris = br.ReadUInt32(); + PedCollisionMin = br.ReadSingle(); + PedCollisionMax = br.ReadSingle(); + CollisionMin = br.ReadSingle(); + CollisionMax = br.ReadSingle(); + VehicleCollisionMin = br.ReadSingle(); + VehicleCollisionMax = br.ReadSingle(); + VehicleSweetenerThreshold = br.ReadSingle(); + ScrapeMin = br.ReadSingle(); + ScrapeMax = br.ReadSingle(); + DamageMin = br.ReadSingle(); + DamageMax = br.ReadSingle(); + TrainImpact = br.ReadUInt32(); + TrainImpactLoop = br.ReadUInt32(); + WaveImpactLoop = br.ReadUInt32(); + FragMaterial = br.ReadUInt32(); + WheelFragMaterial = br.ReadUInt32(); + NumMeleeMaterialOverrides = br.ReadByte(); + padding00 = br.ReadByte(); + padding01 = br.ReadInt16(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Scrape); - bw.Write(SlowScrape); - bw.Write(ScrapeImpact); + bw.Write(MediumIntensity); + bw.Write(HighIntensity); + bw.Write(SmallScrapeImpact); bw.Write(SlowScrapeImpact); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(ScrapePitch); - bw.Write(ScrapeVolume); - bw.Write(SlowScrapeVolume); - bw.Write(ScrapeImpactVolume); - bw.Write(SlowScrapeImpactVolume); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Unk24); - bw.Write(Unk25); - bw.Write(Unk26); - bw.Write(Unk27); - bw.Write(Unk28); - bw.Write(Unk29); - bw.Write(Unk30); - bw.Write(Unk31); - bw.Write(Unk32); - bw.Write(Unk33); - bw.Write(Unk34); - bw.Write(Unk35); - bw.Write(Unk36); - bw.Write(Unk37); - bw.Write(Unk38); - bw.Write(Unk39); - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(Unk42); - bw.Write(Unk43); - bw.Write(Unk44); - bw.Write(Unk45); - bw.Write(Unk46); - bw.Write(Unk47); - bw.Write(Unk48); - bw.Write(Unk49); - bw.Write(HasAudioTracks); - if (HasAudioTracks > 0) - { - bw.Write(AudioTrack0); - bw.Write(AudioTrack1); - } + bw.Write(SlowScrapeLoop); + bw.Write(RollSound); + bw.Write(VehOnVehCrashSound); + bw.Write(HighImpactSweetenerSound); + bw.Write(SweetenerImpactThreshold); + bw.Write(ScrapePitchCurve); + bw.Write(ScrapeVolCurve); + bw.Write(SlowScrapeVolCurve); + bw.Write(ScrapeImpactVolCurve); + bw.Write(SlowScrapeImpactCurve); + bw.Write(ImpactStartOffsetCurve); + bw.Write(ImpactVolCurve); + bw.Write(VehicleImpactStartOffsetCurve); + bw.Write(VehicleImpactVolCurve); + bw.Write(VelocityImpactScalingCurve); + bw.Write(FakeImpactStartOffsetCurve); + bw.Write(FakeImpactVolCurve); + bw.Write(FakeImpactMin); + bw.Write(FakeImpactMax); + bw.Write(FakeImpactScale); + bw.Write(VehicleSizeScale); + bw.Write(FakeImpactTriggerDelta); + bw.Write(FakeImpactSweetenerThreshold); + bw.Write(DamageVolCurve); + bw.Write(JumpLandVolCurve); + bw.Write(VehicleMaterialSettings); + bw.Write(DeformationSound); + bw.Write(ImpactDebris); + bw.Write(GlassDebris); + bw.Write(PostImpactDebris); + bw.Write(PedCollisionMin); + bw.Write(PedCollisionMax); + bw.Write(CollisionMin); + bw.Write(CollisionMax); + bw.Write(VehicleCollisionMin); + bw.Write(VehicleCollisionMax); + bw.Write(VehicleSweetenerThreshold); + bw.Write(ScrapeMin); + bw.Write(ScrapeMax); + bw.Write(DamageMin); + bw.Write(DamageMax); + bw.Write(TrainImpact); + bw.Write(TrainImpactLoop); + bw.Write(WaveImpactLoop); + bw.Write(FragMaterial); + bw.Write(WheelFragMaterial); + bw.Write(NumMeleeMaterialOverrides); + bw.Write(padding00); + bw.Write(padding01); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.StringTag(sb, indent, "Scrape", RelXml.HashString(Scrape)); - RelXml.StringTag(sb, indent, "SlowScrape", RelXml.HashString(SlowScrape)); - RelXml.StringTag(sb, indent, "ScrapeImpact", RelXml.HashString(ScrapeImpact)); + RelXml.ValueTag(sb, indent, "MediumIntensity", MediumIntensity.ToString()); + RelXml.ValueTag(sb, indent, "HighIntensity", HighIntensity.ToString()); + RelXml.StringTag(sb, indent, "SmallScrapeImpact", RelXml.HashString(SmallScrapeImpact)); RelXml.StringTag(sb, indent, "SlowScrapeImpact", RelXml.HashString(SlowScrapeImpact)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.StringTag(sb, indent, "ScrapePitch", RelXml.HashString(ScrapePitch)); - RelXml.StringTag(sb, indent, "ScrapeVolume", RelXml.HashString(ScrapeVolume)); - RelXml.StringTag(sb, indent, "SlowScrapeVolume", RelXml.HashString(SlowScrapeVolume)); - RelXml.StringTag(sb, indent, "ScrapeImpactVolume", RelXml.HashString(ScrapeImpactVolume)); - RelXml.StringTag(sb, indent, "SlowScrapeImpactVolume", RelXml.HashString(SlowScrapeImpactVolume)); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); - RelXml.StringTag(sb, indent, "Unk19", RelXml.HashString(Unk19)); - RelXml.StringTag(sb, indent, "Unk20", RelXml.HashString(Unk20)); - RelXml.ValueTag(sb, indent, "Unk21", FloatUtil.ToString(Unk21)); - RelXml.ValueTag(sb, indent, "Unk22", FloatUtil.ToString(Unk22)); - RelXml.ValueTag(sb, indent, "Unk23", FloatUtil.ToString(Unk23)); - RelXml.ValueTag(sb, indent, "Unk24", FloatUtil.ToString(Unk24)); - RelXml.ValueTag(sb, indent, "Unk25", FloatUtil.ToString(Unk25)); - RelXml.ValueTag(sb, indent, "Unk26", FloatUtil.ToString(Unk26)); - RelXml.StringTag(sb, indent, "Unk27", RelXml.HashString(Unk27)); - RelXml.StringTag(sb, indent, "Unk28", RelXml.HashString(Unk28)); - RelXml.StringTag(sb, indent, "Unk29", RelXml.HashString(Unk29)); - RelXml.StringTag(sb, indent, "Unk30", RelXml.HashString(Unk30)); - RelXml.StringTag(sb, indent, "Unk31", RelXml.HashString(Unk31)); - RelXml.StringTag(sb, indent, "Unk32", RelXml.HashString(Unk32)); - RelXml.StringTag(sb, indent, "Unk33", RelXml.HashString(Unk33)); - RelXml.ValueTag(sb, indent, "Unk34", FloatUtil.ToString(Unk34)); - RelXml.ValueTag(sb, indent, "Unk35", FloatUtil.ToString(Unk35)); - RelXml.ValueTag(sb, indent, "Unk36", FloatUtil.ToString(Unk36)); - RelXml.ValueTag(sb, indent, "Unk37", FloatUtil.ToString(Unk37)); - RelXml.ValueTag(sb, indent, "Unk38", Unk38.ToString()); - RelXml.ValueTag(sb, indent, "Unk39", FloatUtil.ToString(Unk39)); - RelXml.ValueTag(sb, indent, "Unk40", FloatUtil.ToString(Unk40)); - RelXml.ValueTag(sb, indent, "Unk41", FloatUtil.ToString(Unk41)); - RelXml.ValueTag(sb, indent, "Unk42", FloatUtil.ToString(Unk42)); - RelXml.ValueTag(sb, indent, "Unk43", FloatUtil.ToString(Unk43)); - RelXml.ValueTag(sb, indent, "Unk44", FloatUtil.ToString(Unk44)); - RelXml.StringTag(sb, indent, "Unk45", RelXml.HashString(Unk45)); - RelXml.StringTag(sb, indent, "Unk46", RelXml.HashString(Unk46)); - RelXml.StringTag(sb, indent, "Unk47", RelXml.HashString(Unk47)); - RelXml.StringTag(sb, indent, "Unk48", RelXml.HashString(Unk48)); - RelXml.StringTag(sb, indent, "Unk49", RelXml.HashString(Unk49)); - //RelXml.ValueTag(sb, indent, "HasAudioTracks", HasAudioTracks.ToString()); - if (HasAudioTracks > 0) - { - RelXml.StringTag(sb, indent, "AudioTrack0", RelXml.HashString(AudioTrack0)); - RelXml.StringTag(sb, indent, "AudioTrack1", RelXml.HashString(AudioTrack1)); - } + RelXml.StringTag(sb, indent, "SlowScrapeLoop", RelXml.HashString(SlowScrapeLoop)); + RelXml.StringTag(sb, indent, "RollSound", RelXml.HashString(RollSound)); + RelXml.StringTag(sb, indent, "VehOnVehCrashSound", RelXml.HashString(VehOnVehCrashSound)); + RelXml.StringTag(sb, indent, "HighImpactSweetenerSound", RelXml.HashString(HighImpactSweetenerSound)); + RelXml.ValueTag(sb, indent, "SweetenerImpactThreshold", FloatUtil.ToString(SweetenerImpactThreshold)); + RelXml.StringTag(sb, indent, "ScrapePitchCurve", RelXml.HashString(ScrapePitchCurve)); + RelXml.StringTag(sb, indent, "ScrapeVolCurve", RelXml.HashString(ScrapeVolCurve)); + RelXml.StringTag(sb, indent, "SlowScrapeVolCurve", RelXml.HashString(SlowScrapeVolCurve)); + RelXml.StringTag(sb, indent, "ScrapeImpactVolCurve", RelXml.HashString(ScrapeImpactVolCurve)); + RelXml.StringTag(sb, indent, "SlowScrapeImpactCurve", RelXml.HashString(SlowScrapeImpactCurve)); + RelXml.StringTag(sb, indent, "ImpactStartOffsetCurve", RelXml.HashString(ImpactStartOffsetCurve)); + RelXml.StringTag(sb, indent, "ImpactVolCurve", RelXml.HashString(ImpactVolCurve)); + RelXml.StringTag(sb, indent, "VehicleImpactStartOffsetCurve", RelXml.HashString(VehicleImpactStartOffsetCurve)); + RelXml.StringTag(sb, indent, "VehicleImpactVolCurve", RelXml.HashString(VehicleImpactVolCurve)); + RelXml.StringTag(sb, indent, "VelocityImpactScalingCurve", RelXml.HashString(VelocityImpactScalingCurve)); + RelXml.StringTag(sb, indent, "FakeImpactStartOffsetCurve", RelXml.HashString(FakeImpactStartOffsetCurve)); + RelXml.StringTag(sb, indent, "FakeImpactVolCurve", RelXml.HashString(FakeImpactVolCurve)); + RelXml.ValueTag(sb, indent, "FakeImpactMin", FloatUtil.ToString(FakeImpactMin)); + RelXml.ValueTag(sb, indent, "FakeImpactMax", FloatUtil.ToString(FakeImpactMax)); + RelXml.ValueTag(sb, indent, "FakeImpactScale", FloatUtil.ToString(FakeImpactScale)); + RelXml.ValueTag(sb, indent, "VehicleSizeScale", FloatUtil.ToString(VehicleSizeScale)); + RelXml.ValueTag(sb, indent, "FakeImpactTriggerDelta", FloatUtil.ToString(FakeImpactTriggerDelta)); + RelXml.ValueTag(sb, indent, "FakeImpactSweetenerThreshold", FloatUtil.ToString(FakeImpactSweetenerThreshold)); + RelXml.StringTag(sb, indent, "DamageVolCurve", RelXml.HashString(DamageVolCurve)); + RelXml.StringTag(sb, indent, "JumpLandVolCurve", RelXml.HashString(JumpLandVolCurve)); + RelXml.StringTag(sb, indent, "VehicleMaterialSettings", RelXml.HashString(VehicleMaterialSettings)); + RelXml.StringTag(sb, indent, "DeformationSound", RelXml.HashString(DeformationSound)); + RelXml.StringTag(sb, indent, "ImpactDebris", RelXml.HashString(ImpactDebris)); + RelXml.StringTag(sb, indent, "GlassDebris", RelXml.HashString(GlassDebris)); + RelXml.StringTag(sb, indent, "PostImpactDebris", RelXml.HashString(PostImpactDebris)); + RelXml.ValueTag(sb, indent, "PedCollisionMin", FloatUtil.ToString(PedCollisionMin)); + RelXml.ValueTag(sb, indent, "PedCollisionMax", FloatUtil.ToString(PedCollisionMax)); + RelXml.ValueTag(sb, indent, "CollisionMin", FloatUtil.ToString(CollisionMin)); + RelXml.ValueTag(sb, indent, "CollisionMax", FloatUtil.ToString(CollisionMax)); + RelXml.ValueTag(sb, indent, "VehicleCollisionMin", FloatUtil.ToString(VehicleCollisionMin)); + RelXml.ValueTag(sb, indent, "VehicleCollisionMax", FloatUtil.ToString(VehicleCollisionMax)); + RelXml.ValueTag(sb, indent, "VehicleSweetenerThreshold", FloatUtil.ToString(VehicleSweetenerThreshold)); + RelXml.ValueTag(sb, indent, "ScrapeMin", FloatUtil.ToString(ScrapeMin)); + RelXml.ValueTag(sb, indent, "ScrapeMax", FloatUtil.ToString(ScrapeMax)); + RelXml.ValueTag(sb, indent, "DamageMin", FloatUtil.ToString(DamageMin)); + RelXml.ValueTag(sb, indent, "DamageMax", FloatUtil.ToString(DamageMax)); + RelXml.StringTag(sb, indent, "TrainImpact", RelXml.HashString(TrainImpact)); + RelXml.StringTag(sb, indent, "TrainImpactLoop", RelXml.HashString(TrainImpactLoop)); + RelXml.StringTag(sb, indent, "WaveImpactLoop", RelXml.HashString(WaveImpactLoop)); + RelXml.StringTag(sb, indent, "FragMaterial", RelXml.HashString(FragMaterial)); + RelXml.StringTag(sb, indent, "WheelFragMaterial", RelXml.HashString(WheelFragMaterial)); + RelXml.ValueTag(sb, indent, "NumMeleeMaterialOverrides", NumMeleeMaterialOverrides.ToString()); + } public override void ReadXml(XmlNode node) { - Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildUIntAttribute(node, "Unk01", "value"); - Scrape = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scrape")); - SlowScrape = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrape")); - ScrapeImpact = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeImpact")); + MediumIntensity = Xml.GetChildUIntAttribute(node, "MediumIntensity", "value"); + HighIntensity = Xml.GetChildUIntAttribute(node, "HighIntensity", "value"); + SmallScrapeImpact = XmlRel.GetHash(Xml.GetChildInnerText(node, "SmallScrapeImpact")); SlowScrapeImpact = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrapeImpact")); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - ScrapePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapePitch")); - ScrapeVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeVolume")); - SlowScrapeVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrapeVolume")); - ScrapeImpactVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeImpactVolume")); - SlowScrapeImpactVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrapeImpactVolume")); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); - Unk19 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk19")); - Unk20 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk20")); - Unk21 = Xml.GetChildFloatAttribute(node, "Unk21", "value"); - Unk22 = Xml.GetChildFloatAttribute(node, "Unk22", "value"); - Unk23 = Xml.GetChildFloatAttribute(node, "Unk23", "value"); - Unk24 = Xml.GetChildFloatAttribute(node, "Unk24", "value"); - Unk25 = Xml.GetChildFloatAttribute(node, "Unk25", "value"); - Unk26 = Xml.GetChildFloatAttribute(node, "Unk26", "value"); - Unk27 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk27")); - Unk28 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk28")); - Unk29 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk29")); - Unk30 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk30")); - Unk31 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk31")); - Unk32 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk32")); - Unk33 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk33")); - Unk34 = Xml.GetChildFloatAttribute(node, "Unk34", "value"); - Unk35 = Xml.GetChildFloatAttribute(node, "Unk35", "value"); - Unk36 = Xml.GetChildFloatAttribute(node, "Unk36", "value"); - Unk37 = Xml.GetChildFloatAttribute(node, "Unk37", "value"); - Unk38 = Xml.GetChildUIntAttribute(node, "Unk38", "value"); - Unk39 = Xml.GetChildFloatAttribute(node, "Unk39", "value"); - Unk40 = Xml.GetChildFloatAttribute(node, "Unk40", "value"); - Unk41 = Xml.GetChildFloatAttribute(node, "Unk41", "value"); - Unk42 = Xml.GetChildFloatAttribute(node, "Unk42", "value"); - Unk43 = Xml.GetChildFloatAttribute(node, "Unk43", "value"); - Unk44 = Xml.GetChildFloatAttribute(node, "Unk44", "value"); - Unk45 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk45")); - Unk46 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk46")); - Unk47 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk47")); - Unk48 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk48")); - Unk49 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk49")); - if (node.SelectSingleNode("AudioTrack0") != null) - { - HasAudioTracks = 1; - AudioTrack0 = XmlRel.GetHash(Xml.GetChildInnerText(node, "AudioTrack0")); - AudioTrack1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "AudioTrack1")); - } + SlowScrapeLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrapeLoop")); + RollSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RollSound")); + VehOnVehCrashSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehOnVehCrashSound")); + HighImpactSweetenerSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "HighImpactSweetenerSound")); + SweetenerImpactThreshold = Xml.GetChildFloatAttribute(node, "SweetenerImpactThreshold", "value"); + ScrapePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapePitchCurve")); + ScrapeVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeVolCurve")); + SlowScrapeVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrapeVolCurve")); + ScrapeImpactVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeImpactVolCurve")); + SlowScrapeImpactCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowScrapeImpactCurve")); + ImpactStartOffsetCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ImpactStartOffsetCurve")); + ImpactVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ImpactVolCurve")); + VehicleImpactStartOffsetCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleImpactStartOffsetCurve")); + VehicleImpactVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleImpactVolCurve")); + VelocityImpactScalingCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "VelocityImpactScalingCurve")); + FakeImpactStartOffsetCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "FakeImpactStartOffsetCurve")); + FakeImpactVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "FakeImpactVolCurve")); + FakeImpactMin = Xml.GetChildFloatAttribute(node, "FakeImpactMin", "value"); + FakeImpactMax = Xml.GetChildFloatAttribute(node, "FakeImpactMax", "value"); + FakeImpactScale = Xml.GetChildFloatAttribute(node, "FakeImpactScale", "value"); + VehicleSizeScale = Xml.GetChildFloatAttribute(node, "VehicleSizeScale", "value"); + FakeImpactTriggerDelta = Xml.GetChildFloatAttribute(node, "FakeImpactTriggerDelta", "value"); + FakeImpactSweetenerThreshold = Xml.GetChildFloatAttribute(node, "FakeImpactSweetenerThreshold", "value"); + DamageVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageVolCurve")); + JumpLandVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandVolCurve")); + VehicleMaterialSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleMaterialSettings")); + DeformationSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DeformationSound")); + ImpactDebris = XmlRel.GetHash(Xml.GetChildInnerText(node, "ImpactDebris")); + GlassDebris = XmlRel.GetHash(Xml.GetChildInnerText(node, "GlassDebris")); + PostImpactDebris = XmlRel.GetHash(Xml.GetChildInnerText(node, "PostImpactDebris")); + PedCollisionMin = Xml.GetChildFloatAttribute(node, "PedCollisionMin", "value"); + PedCollisionMax = Xml.GetChildFloatAttribute(node, "PedCollisionMax", "value"); + CollisionMin = Xml.GetChildFloatAttribute(node, "CollisionMin", "value"); + CollisionMax = Xml.GetChildFloatAttribute(node, "CollisionMax", "value"); + VehicleCollisionMin = Xml.GetChildFloatAttribute(node, "VehicleCollisionMin", "value"); + VehicleCollisionMax = Xml.GetChildFloatAttribute(node, "VehicleCollisionMax", "value"); + VehicleSweetenerThreshold = Xml.GetChildFloatAttribute(node, "VehicleSweetenerThreshold", "value"); + ScrapeMin = Xml.GetChildFloatAttribute(node, "ScrapeMin", "value"); + ScrapeMax = Xml.GetChildFloatAttribute(node, "ScrapeMax", "value"); + DamageMin = Xml.GetChildFloatAttribute(node, "DamageMin", "value"); + DamageMax = Xml.GetChildFloatAttribute(node, "DamageMax", "value"); + TrainImpact = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrainImpact")); + TrainImpactLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrainImpactLoop")); + WaveImpactLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveImpactLoop")); + FragMaterial = XmlRel.GetHash(Xml.GetChildInnerText(node, "FragMaterial")); + WheelFragMaterial = XmlRel.GetHash(Xml.GetChildInnerText(node, "WheelFragMaterial")); + NumMeleeMaterialOverrides = (byte)Xml.GetChildUIntAttribute(node, "NumMeleeMaterialOverrides", "value"); } public override uint[] GetHashTableOffsets() { - if (HasAudioTracks > 0) return new uint[] { 204, 208 }; + if (NumMeleeMaterialOverrides > 0) return new uint[] { 204, 208 }; else return null; } public override MetaHash[] GetCurveHashes() { - return new[] { ScrapePitch, ScrapeVolume, SlowScrapeVolume, ScrapeImpactVolume, SlowScrapeImpactVolume, Unk14, Unk15, Unk16, Unk17, Unk18, Unk19, Unk20, Unk27, Unk28 }; + return new[] { ScrapePitchCurve, ScrapeVolCurve, SlowScrapeVolCurve, ScrapeImpactVolCurve, SlowScrapeImpactCurve, ImpactStartOffsetCurve, + ImpactVolCurve, VehicleImpactStartOffsetCurve, VehicleImpactVolCurve, VelocityImpactScalingCurve, FakeImpactStartOffsetCurve, + FakeImpactVolCurve, DamageVolCurve, JumpLandVolCurve }; } public override MetaHash[] GetSoundHashes() { - return new[] { Scrape, SlowScrape, ScrapeImpact, SlowScrapeImpact, Unk06, Unk07, Unk30, Unk31, Unk32, Unk33, Unk45, Unk46, Unk47 }; + return new[] { SmallScrapeImpact, SlowScrapeImpact, SlowScrapeLoop, RollSound, VehOnVehCrashSound, + HighImpactSweetenerSound, DeformationSound, ImpactDebris, GlassDebris, PostImpactDebris, + TrainImpact, TrainImpactLoop, WaveImpactLoop }; } public override MetaHash[] GetGameHashes() { - return new[] { Unk29, Unk48, Unk49, AudioTrack0, AudioTrack1 }; + return new[] { VehicleMaterialSettings, FragMaterial, WheelFragMaterial }; } } - [TC(typeof(EXP))] public class Dat151Door : Dat151RelData - { - public MetaHash SoundSet { get; set; } - public MetaHash Params { get; set; }//type Dat151DoorParams - public float Unk1 { get; set; } - public Dat151Door(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151DoorAudioSettings : Dat151RelData + { + public MetaHash Sounds { get; set; } + public MetaHash TuningParams { get; set; }//type Dat151DoorTuningParams + public float MaxOcclusion { get; set; } + + public Dat151DoorAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Door; + Type = Dat151RelType.DoorAudioSettings; TypeID = (byte)Type; } - public Dat151Door(RelData d, BinaryReader br) : base(d, br) + public Dat151DoorAudioSettings(RelData d, BinaryReader br) : base(d, br) { - SoundSet = br.ReadUInt32(); - Params = br.ReadUInt32(); - Unk1 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Sounds = br.ReadUInt32(); + TuningParams = br.ReadUInt32(); + MaxOcclusion = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(SoundSet); - bw.Write(Params); - bw.Write(Unk1); + bw.Write(Sounds); + bw.Write(TuningParams); + bw.Write(MaxOcclusion); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "SoundSet", RelXml.HashString(SoundSet)); - RelXml.StringTag(sb, indent, "Params", RelXml.HashString(Params)); - RelXml.ValueTag(sb, indent, "Unk1", FloatUtil.ToString(Unk1)); + RelXml.StringTag(sb, indent, "Sounds", RelXml.HashString(Sounds)); + RelXml.StringTag(sb, indent, "TuningParams", RelXml.HashString(TuningParams)); + RelXml.ValueTag(sb, indent, "MaxOcclusion", FloatUtil.ToString(MaxOcclusion)); } public override void ReadXml(XmlNode node) { - SoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundSet")); - Params = XmlRel.GetHash(Xml.GetChildInnerText(node, "Params")); - Unk1 = Xml.GetChildFloatAttribute(node, "Unk1", "value"); + Sounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sounds")); + TuningParams = XmlRel.GetHash(Xml.GetChildInnerText(node, "TuningParams")); + MaxOcclusion = Xml.GetChildFloatAttribute(node, "MaxOcclusion", "value"); } public override uint[] GetHashTableOffsets() { @@ -9040,60 +8761,58 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetSoundHashes() { - return new[] { SoundSet }; + return new[] { Sounds }; } public override MetaHash[] GetGameHashes() { - return new[] { Params }; + return new[] { TuningParams }; } } - [TC(typeof(EXP))] public class Dat151AnimalFootstepsList : Dat151RelData - { - public uint AnimalFootstepsCount { get; set; } - public Dat151AnimalFootstepsListItem[] AnimalFootsteps { get; set; } - public Dat151AnimalFootstepsList(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151AnimalFootstepReference : Dat151RelData + { + public uint AnimalFootstepSettingsCount { get; set; } + public Dat151AnimalFootstepReferenceItem[] AnimalFootstepSettings { get; set; } + + public Dat151AnimalFootstepReference(RelFile rel) : base(rel) { - Type = Dat151RelType.AnimalFootstepsList; + Type = Dat151RelType.AnimalFootstepReference; TypeID = (byte)Type; } - public Dat151AnimalFootstepsList(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalFootstepReference(RelData d, BinaryReader br) : base(d, br) { - AnimalFootstepsCount = br.ReadUInt32(); - var items = new Dat151AnimalFootstepsListItem[AnimalFootstepsCount]; - for (uint i = 0; i < AnimalFootstepsCount; i++) + AnimalFootstepSettingsCount = br.ReadUInt32(); + var items = new Dat151AnimalFootstepReferenceItem[AnimalFootstepSettingsCount]; + for (uint i = 0; i < AnimalFootstepSettingsCount; i++) { - items[i] = new Dat151AnimalFootstepsListItem(br); + items[i] = new Dat151AnimalFootstepReferenceItem(br); } - AnimalFootsteps = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + AnimalFootstepSettings = items; } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(AnimalFootstepsCount); - for (uint i = 0; i < AnimalFootstepsCount; i++) + bw.Write(AnimalFootstepSettingsCount); + for (uint i = 0; i < AnimalFootstepSettingsCount; i++) { - AnimalFootsteps[i].Write(bw); + AnimalFootstepSettings[i].Write(bw); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.WriteItemArray(sb, AnimalFootsteps, indent, "AnimalFootsteps"); + RelXml.WriteItemArray(sb, AnimalFootstepSettings, indent, "AnimalFootstepSettings"); } public override void ReadXml(XmlNode node) { - AnimalFootsteps = XmlRel.ReadItemArray(node, "AnimalFootsteps"); - AnimalFootstepsCount = (uint)(AnimalFootsteps?.Length ?? 0); + AnimalFootstepSettings = XmlRel.ReadItemArray(node, "AnimalFootstepSettings"); + AnimalFootstepSettingsCount = (uint)(AnimalFootstepSettings?.Length ?? 0); } public override uint[] GetHashTableOffsets() { var offsets = new List(); - for (uint i = 0; i < AnimalFootstepsCount; i++) + for (uint i = 0; i < AnimalFootstepSettingsCount; i++) { offsets.Add(8 + i * 8); } @@ -9102,7 +8821,7 @@ namespace CodeWalker.GameFiles public override MetaHash[] GetGameHashes() { var list = new List(); - foreach (var item in AnimalFootsteps) + foreach (var item in AnimalFootstepSettings) { list.Add(item.Footsteps); } @@ -9111,12 +8830,12 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public struct Dat151AnimalFootstepsListItem : IMetaXmlItem + public struct Dat151AnimalFootstepReferenceItem : IMetaXmlItem { public MetaHash Animal { get; set; } public MetaHash Footsteps { get; set; } - public Dat151AnimalFootstepsListItem(BinaryReader br) + public Dat151AnimalFootstepReferenceItem(BinaryReader br) { Animal = br.ReadUInt32(); Footsteps = br.ReadUInt32(); @@ -9142,7 +8861,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151ForceRadioTrackAction : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ForceRadioTrackAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } @@ -9177,17 +8897,6 @@ namespace CodeWalker.GameFiles tracks[i] = br.ReadUInt32(); } AudioTracks = tracks; - - if (Unk1 != 0) - { } - if (Unk2 != 0) - { } - if (Unk5 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9256,7 +8965,9 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151RadioDjSpeechAction : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151RadioDjSpeechAction : Dat151RelData { public FlagsUint Unk0 { get; set; } public int Unk1 { get; set; } @@ -9282,21 +8993,6 @@ namespace CodeWalker.GameFiles Unk3 = br.ReadSingle(); RadioStation = br.ReadUInt32(); Unk5 = br.ReadInt32(); - - if (Unk1 != 0) - { } - if (Unk2 != 0) - { } - if (Unk3 != 0) - { } - if (RadioStation != 0) - { } - if (Unk5 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9342,29 +9038,27 @@ namespace CodeWalker.GameFiles return new[] { Bar, Beat, RadioStation }; } } - [TC(typeof(EXP))] public class Dat151MicrophoneList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151MicrophoneSettingsReference : Dat151RelData { public uint MicrophonesCount { get; set; } - public Dat151MicrophoneListItem[] Microphones { get; set; }//types: name?, Microphone + public Dat151MicrophoneSettingsReferenceItem[] Microphones { get; set; }//types: name?, Microphone - public Dat151MicrophoneList(RelFile rel) : base(rel) + public Dat151MicrophoneSettingsReference(RelFile rel) : base(rel) { - Type = Dat151RelType.MicrophoneList; + Type = Dat151RelType.MicrophoneSettingsReference; TypeID = (byte)Type; } - public Dat151MicrophoneList(RelData d, BinaryReader br) : base(d, br) + public Dat151MicrophoneSettingsReference(RelData d, BinaryReader br) : base(d, br) { MicrophonesCount = br.ReadUInt32(); - var items = new Dat151MicrophoneListItem[MicrophonesCount]; + var items = new Dat151MicrophoneSettingsReferenceItem[MicrophonesCount]; for (var i = 0; i < MicrophonesCount; i++) { - items[i] = new Dat151MicrophoneListItem(br); + items[i] = new Dat151MicrophoneSettingsReferenceItem(br); } Microphones = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9382,7 +9076,7 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - Microphones = XmlRel.ReadItemArray(node, "Microphones"); + Microphones = XmlRel.ReadItemArray(node, "Microphones"); MicrophonesCount = (uint)(Microphones?.Length ?? 0); } public override uint[] GetHashTableOffsets() @@ -9409,12 +9103,12 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public struct Dat151MicrophoneListItem : IMetaXmlItem + public struct Dat151MicrophoneSettingsReferenceItem : IMetaXmlItem { public MetaHash Camera { get; set; } public MetaHash Microphone { get; set; } - public Dat151MicrophoneListItem(BinaryReader br) + public Dat151MicrophoneSettingsReferenceItem(BinaryReader br) { Camera = br.ReadUInt32(); Microphone = br.ReadUInt32(); @@ -9440,7 +9134,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151DoorList : Dat151RelData //doors/gates + [TC(typeof(EXP))] + public class Dat151DoorList : Dat151RelData //doors/gates { public uint DoorsCount { get; set; } public Dat151DoorListItem[] Doors { get; set; }// prop name, Door @@ -9459,10 +9154,6 @@ namespace CodeWalker.GameFiles items[i] = new Dat151DoorListItem(br); } Doors = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9538,7 +9229,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151ShoeList : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ShoeList : Dat151RelData { public uint ShoesCount { get; set; } public Dat151ShoeListItem[] Shoes { get; set; }//types: name?, Shoe @@ -9557,10 +9249,6 @@ namespace CodeWalker.GameFiles items[i] = new Dat151ShoeListItem(br); } Shoes = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9636,7 +9324,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151ClothList : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ClothList : Dat151RelData { public uint ClothesCount { get; set; } public Dat151ClothListItem[] Clothes { get; set; }//types @@ -9655,10 +9344,6 @@ namespace CodeWalker.GameFiles items[i] = new Dat151ClothListItem(br); } Clothes = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9734,53 +9419,50 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151VehicleRecordingList : Dat151RelData + [TC(typeof(EXP))] + public class Dat151CarRecordingList : Dat151RelData { - public uint VehicleRecordingsCount { get; set; } - public Dat151VehicleRecordingListItem[] VehicleRecordings { get; set; }//types: ???, VehicleRecording + public uint CarRecordingsCount { get; set; } + public Dat151CarRecordingListItem[] CarRecordings { get; set; }//types: ???, CarRecording - public Dat151VehicleRecordingList(RelFile rel) : base(rel) + public Dat151CarRecordingList(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleRecordingList; + Type = Dat151RelType.CarRecordingList; TypeID = (byte)Type; } - public Dat151VehicleRecordingList(RelData d, BinaryReader br) : base(d, br) + public Dat151CarRecordingList(RelData d, BinaryReader br) : base(d, br) { - VehicleRecordingsCount = br.ReadUInt32(); - var items = new Dat151VehicleRecordingListItem[VehicleRecordingsCount]; - for (var i = 0; i < VehicleRecordingsCount; i++) + CarRecordingsCount = br.ReadUInt32(); + var items = new Dat151CarRecordingListItem[CarRecordingsCount]; + for (var i = 0; i < CarRecordingsCount; i++) { - items[i] = new Dat151VehicleRecordingListItem(br); + items[i] = new Dat151CarRecordingListItem(br); } - VehicleRecordings = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + CarRecordings = items; } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(VehicleRecordingsCount); - for (var i = 0; i < VehicleRecordingsCount; i++) + bw.Write(CarRecordingsCount); + for (var i = 0; i < CarRecordingsCount; i++) { - VehicleRecordings[i].Write(bw); + CarRecordings[i].Write(bw); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.WriteItemArray(sb, VehicleRecordings, indent, "VehicleRecordings"); + RelXml.WriteItemArray(sb, CarRecordings, indent, "CarRecordings"); } public override void ReadXml(XmlNode node) { - VehicleRecordings = XmlRel.ReadItemArray(node, "VehicleRecordings"); - VehicleRecordingsCount = (uint)(VehicleRecordings?.Length ?? 0); + CarRecordings = XmlRel.ReadItemArray(node, "CarRecordings"); + CarRecordingsCount = (uint)(CarRecordings?.Length ?? 0); } public override uint[] GetHashTableOffsets() { var offsets = new List(); - for (uint i = 0; i < VehicleRecordingsCount; i++) + for (uint i = 0; i < CarRecordingsCount; i++) { offsets.Add(8 + i * 8); } @@ -9789,9 +9471,9 @@ namespace CodeWalker.GameFiles public override MetaHash[] GetGameHashes() { var list = new List(); - if (VehicleRecordings != null) + if (CarRecordings != null) { - foreach (var item in VehicleRecordings) + foreach (var item in CarRecordings) { list.Add(item.Recording); } @@ -9799,12 +9481,14 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public struct Dat151VehicleRecordingListItem : IMetaXmlItem + + [TC(typeof(EXP))] + public struct Dat151CarRecordingListItem : IMetaXmlItem { public MetaHash ID { get; set; } public MetaHash Recording { get; set; } - public Dat151VehicleRecordingListItem(BinaryReader br) + public Dat151CarRecordingListItem(BinaryReader br) { ID = br.ReadUInt32(); Recording = br.ReadUInt32(); @@ -9830,29 +9514,26 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151WeatherTypeList : Dat151RelData + [TC(typeof(EXP))] + public class Dat151WeatherTypeAudioSettingsAudioReference : Dat151RelData { public uint WeatherTypesCount { get; set; } - public Dat151WeatherTypeListItem[] WeatherTypes { get; set; }//types: name, WeatherType + public Dat151WeatherTypeAudioSettingsAudioReferenceItem[] WeatherTypes { get; set; }//types: name, WeatherType - public Dat151WeatherTypeList(RelFile rel) : base(rel) + public Dat151WeatherTypeAudioSettingsAudioReference(RelFile rel) : base(rel) { - Type = Dat151RelType.WeatherTypeList; + Type = Dat151RelType.WeatherTypeAudioReference; TypeID = (byte)Type; } - public Dat151WeatherTypeList(RelData d, BinaryReader br) : base(d, br) + public Dat151WeatherTypeAudioSettingsAudioReference(RelData d, BinaryReader br) : base(d, br) { WeatherTypesCount = br.ReadUInt32(); - var items = new Dat151WeatherTypeListItem[WeatherTypesCount]; + var items = new Dat151WeatherTypeAudioSettingsAudioReferenceItem[WeatherTypesCount]; for (var i = 0; i < WeatherTypesCount; i++) { - items[i] = new Dat151WeatherTypeListItem(br); + items[i] = new Dat151WeatherTypeAudioSettingsAudioReferenceItem(br); } WeatherTypes = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -9870,7 +9551,7 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - WeatherTypes = XmlRel.ReadItemArray(node, "WeatherTypes"); + WeatherTypes = XmlRel.ReadItemArray(node, "WeatherTypes"); WeatherTypesCount = (uint)(WeatherTypes?.Length ?? 0); } public override uint[] GetHashTableOffsets() @@ -9897,12 +9578,12 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public struct Dat151WeatherTypeListItem : IMetaXmlItem + public struct Dat151WeatherTypeAudioSettingsAudioReferenceItem : IMetaXmlItem { public MetaHash WeatherType { get; set; } public MetaHash Weather { get; set; } - public Dat151WeatherTypeListItem(BinaryReader br) + public Dat151WeatherTypeAudioSettingsAudioReferenceItem(BinaryReader br) { WeatherType = br.ReadUInt32(); Weather = br.ReadUInt32(); @@ -9928,7 +9609,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151ShoreLinePool : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ShoreLinePoolAudioSettings : Dat151RelData { public FlagsUint Unk01 { get; set; } public Vector4 Unk02 { get; set; } @@ -9946,12 +9628,12 @@ namespace CodeWalker.GameFiles public Vector2[] Points { get; set; } - public Dat151ShoreLinePool(RelFile rel) : base(rel) + public Dat151ShoreLinePoolAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.ShoreLinePool; + Type = Dat151RelType.ShoreLinePoolAudioSettings; TypeID = (byte)Type; } - public Dat151ShoreLinePool(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLinePoolAudioSettings(RelData d, BinaryReader br) : base(d, br) { Unk01 = br.ReadUInt32(); Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -9973,19 +9655,6 @@ namespace CodeWalker.GameFiles points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } Points = points; - - //switch (Unk12) - //{ - // case 4.267251f: - // case 2.055879f: - // break; - // default: - // break; - //} - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -10050,7 +9719,9 @@ namespace CodeWalker.GameFiles PointsCount = Points?.Length ?? 0; } } - [TC(typeof(EXP))] public class Dat151ShoreLineLake : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ShoreLineLakeAudioSettings : Dat151RelData { public FlagsUint Unk01 { get; set; } public Vector4 Unk02 { get; set; } @@ -10060,12 +9731,12 @@ namespace CodeWalker.GameFiles public int PointsCount { get; set; } public Vector2[] Points { get; set; } - public Dat151ShoreLineLake(RelFile rel) : base(rel) + public Dat151ShoreLineLakeAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.ShoreLineLake; + Type = Dat151RelType.ShoreLineLakeAudioSettings; TypeID = (byte)Type; } - public Dat151ShoreLineLake(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineLakeAudioSettings(RelData d, BinaryReader br) : base(d, br) { Unk01 = br.ReadUInt32(); Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); @@ -10083,10 +9754,6 @@ namespace CodeWalker.GameFiles points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } Points = points; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -10131,30 +9798,32 @@ namespace CodeWalker.GameFiles PointsCount = Points?.Length ?? 0; } } - [TC(typeof(EXP))] public class Dat151ShoreLineRiver : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ShoreLineRiverAudioSettings : Dat151RelData { - public FlagsUint Unk01 { get; set; } - public Vector4 Unk02 { get; set; } - public float Unk03 { get; set; } - public uint Unk04 { get; set; } - public uint Unk05 { get; set; } - public uint Unk06 { get; set; } + public FlagsUint Flags { get; set; } + public Vector4 ActivationBox { get; set; } + public float RotationAngle { get; set; } + public uint NextShoreline { get; set; } + public uint RiverType { get; set; } + public float DefaultHeight { get; set; } public uint PointsCount { get; set; } public Vector3[] Points { get; set; } - public Dat151ShoreLineRiver(RelFile rel) : base(rel) + public Dat151ShoreLineRiverAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.ShoreLineRiver; + Type = Dat151RelType.ShoreLineRiverAudioSettings; TypeID = (byte)Type; } - public Dat151ShoreLineRiver(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineRiverAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32(); - Unk06 = br.ReadUInt32(); + Flags = br.ReadUInt32(); + ActivationBox = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + RotationAngle = br.ReadSingle(); + NextShoreline = br.ReadUInt32(); + RiverType = br.ReadUInt32(); + DefaultHeight = br.ReadSingle(); PointsCount = br.ReadUInt32(); var points = new Vector3[PointsCount]; @@ -10163,24 +9832,20 @@ namespace CodeWalker.GameFiles points[i] = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); } Points = points; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02.X); - bw.Write(Unk02.Y); - bw.Write(Unk02.Z); - bw.Write(Unk02.W); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); + bw.Write(Flags); + bw.Write(ActivationBox.X); + bw.Write(ActivationBox.Y); + bw.Write(ActivationBox.Z); + bw.Write(ActivationBox.W); + bw.Write(RotationAngle); + bw.Write(NextShoreline); + bw.Write(RiverType); + bw.Write(DefaultHeight); bw.Write(PointsCount); for (int i = 0; i < PointsCount; i++) @@ -10192,62 +9857,64 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", "0x" + Unk01.Hex); - RelXml.SelfClosingTag(sb, indent, "Unk02 " + FloatUtil.GetVector4XmlString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); + RelXml.SelfClosingTag(sb, indent, "ActivationBox " + FloatUtil.GetVector4XmlString(ActivationBox)); + RelXml.ValueTag(sb, indent, "RotationAngle", FloatUtil.ToString(RotationAngle)); + RelXml.ValueTag(sb, indent, "NextShoreline", NextShoreline.ToString()); + RelXml.ValueTag(sb, indent, "RiverType", RiverType.ToString()); + RelXml.ValueTag(sb, indent, "DefaultHeight", FloatUtil.ToString(DefaultHeight)); RelXml.WriteRawArray(sb, Points, indent, "Points", "", RelXml.FormatVector3, 1); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildUIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildVector4Attributes(node, "Unk02"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildUIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildUIntAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildUIntAttribute(node, "Unk06", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + ActivationBox = Xml.GetChildVector4Attributes(node, "ActivationBox"); + RotationAngle = Xml.GetChildFloatAttribute(node, "RotationAngle", "value"); + NextShoreline = Xml.GetChildUIntAttribute(node, "NextShoreline", "value"); + RiverType = Xml.GetChildUIntAttribute(node, "RiverType", "value"); + DefaultHeight = Xml.GetChildUIntAttribute(node, "DefaultHeight", "value"); Points = Xml.GetChildRawVector3Array(node, "Points"); PointsCount = (uint)(Points?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151ShoreLineOcean : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ShoreLineOceanAudioSettings : Dat151RelData { - public FlagsUint Unk01 { get; set; } - public Vector4 Unk02 { get; set; } - public float Unk03 { get; set; } - public uint Unk04 { get; set; } - public MetaHash Unk05 { get; set; }//adjacent shoreline? links to same type, not included in children list due to large chain! - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public float Unk08 { get; set; } - public float Unk09 { get; set; } - public float Unk10 { get; set; } - public float Unk11 { get; set; } - public float Unk12 { get; set; } + public FlagsUint Flags { get; set; } + public Vector4 ActivationBox { get; set; } + public float RotationAngle { get; set; } + public uint OceanType { get; set; } + public MetaHash NextShoreline { get; set; } + public float WaveStartDPDistance { get; set; } + public float WaveStartHeight { get; set; } + public float WaveBreaksDPDistance { get; set; } + public float WaveBreaksHeight { get; set; } + public float WaveEndDPDistance { get; set; } + public float WaveEndHeight { get; set; } + public float RecedeHeight { get; set; } public uint PointsCount { get; set; } public Vector2[] Points { get; set; } - public Dat151ShoreLineOcean(RelFile rel) : base(rel) + public Dat151ShoreLineOceanAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.ShoreLineOcean; + Type = Dat151RelType.ShoreLineOceanAudioSettings; TypeID = (byte)Type; } - public Dat151ShoreLineOcean(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoreLineOceanAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadSingle(); - Unk10 = br.ReadSingle(); - Unk11 = br.ReadSingle(); - Unk12 = br.ReadSingle(); + Flags = br.ReadUInt32(); + ActivationBox = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + RotationAngle = br.ReadSingle(); + OceanType = br.ReadUInt32(); + NextShoreline = br.ReadUInt32(); + WaveStartDPDistance = br.ReadSingle(); + WaveStartHeight = br.ReadSingle(); + WaveBreaksDPDistance = br.ReadSingle(); + WaveBreaksHeight = br.ReadSingle(); + WaveEndDPDistance = br.ReadSingle(); + WaveEndHeight = br.ReadSingle(); + RecedeHeight = br.ReadSingle(); PointsCount = br.ReadUInt32(); @@ -10257,30 +9924,26 @@ namespace CodeWalker.GameFiles points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } Points = points; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02.X); - bw.Write(Unk02.Y); - bw.Write(Unk02.Z); - bw.Write(Unk02.W); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); + bw.Write(Flags); + bw.Write(ActivationBox.X); + bw.Write(ActivationBox.Y); + bw.Write(ActivationBox.Z); + bw.Write(ActivationBox.W); + bw.Write(RotationAngle); + bw.Write(OceanType); + bw.Write(NextShoreline); + bw.Write(WaveStartDPDistance); + bw.Write(WaveStartHeight); + bw.Write(WaveBreaksDPDistance); + bw.Write(WaveBreaksHeight); + bw.Write(WaveEndDPDistance); + bw.Write(WaveEndHeight); + bw.Write(RecedeHeight); bw.Write(PointsCount); @@ -10292,39 +9955,41 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", "0x" + Unk01.Hex); - RelXml.SelfClosingTag(sb, indent, "Unk02 " + FloatUtil.GetVector4XmlString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", FloatUtil.ToString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", FloatUtil.ToString(Unk11)); - RelXml.ValueTag(sb, indent, "Unk12", FloatUtil.ToString(Unk12)); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); + RelXml.SelfClosingTag(sb, indent, "ActivationBox " + FloatUtil.GetVector4XmlString(ActivationBox)); + RelXml.ValueTag(sb, indent, "RotationAngle", FloatUtil.ToString(RotationAngle)); + RelXml.ValueTag(sb, indent, "OceanType", OceanType.ToString()); + RelXml.StringTag(sb, indent, "NextShoreline", RelXml.HashString(NextShoreline)); + RelXml.ValueTag(sb, indent, "WaveStartDPDistance", FloatUtil.ToString(WaveStartDPDistance)); + RelXml.ValueTag(sb, indent, "WaveStartHeight", FloatUtil.ToString(WaveStartHeight)); + RelXml.ValueTag(sb, indent, "WaveBreaksDPDistance", FloatUtil.ToString(WaveBreaksDPDistance)); + RelXml.ValueTag(sb, indent, "WaveBreaksHeight", FloatUtil.ToString(WaveBreaksHeight)); + RelXml.ValueTag(sb, indent, "WaveEndDPDistance", FloatUtil.ToString(WaveEndDPDistance)); + RelXml.ValueTag(sb, indent, "WaveEndHeight", FloatUtil.ToString(WaveEndHeight)); + RelXml.ValueTag(sb, indent, "RecedeHeight", FloatUtil.ToString(RecedeHeight)); RelXml.WriteRawArray(sb, Points, indent, "Points", "", RelXml.FormatVector2, 1); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildUIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildVector4Attributes(node, "Unk02"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildUIntAttribute(node, "Unk04", "value"); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildFloatAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildFloatAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildFloatAttribute(node, "Unk12", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + ActivationBox = Xml.GetChildVector4Attributes(node, "ActivationBox"); + RotationAngle = Xml.GetChildFloatAttribute(node, "RotationAngle", "value"); + OceanType = Xml.GetChildUIntAttribute(node, "OceanType", "value"); + NextShoreline = XmlRel.GetHash(Xml.GetChildInnerText(node, "NextShoreline")); + WaveStartDPDistance = Xml.GetChildFloatAttribute(node, "WaveStartDPDistance", "value"); + WaveStartHeight = Xml.GetChildFloatAttribute(node, "WaveStartHeight", "value"); + WaveBreaksDPDistance = Xml.GetChildFloatAttribute(node, "WaveBreaksDPDistance", "value"); + WaveBreaksHeight = Xml.GetChildFloatAttribute(node, "WaveBreaksHeight", "value"); + WaveEndDPDistance = Xml.GetChildFloatAttribute(node, "WaveEndDPDistance", "value"); + WaveEndHeight = Xml.GetChildFloatAttribute(node, "WaveEndHeight", "value"); + RecedeHeight = Xml.GetChildFloatAttribute(node, "RecedeHeight", "value"); Points = Xml.GetChildRawVector2Array(node, "Points"); PointsCount = (uint)(Points?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151ShoreLineList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ShoreLineList : Dat151RelData { public uint ShoreLineCount { get; set; } public MetaHash[] ShoreLines { get; set; } @@ -10343,10 +10008,6 @@ namespace CodeWalker.GameFiles shorelines[i] = br.ReadUInt32(); } ShoreLines = shorelines; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -10372,7 +10033,7 @@ namespace CodeWalker.GameFiles return ShoreLines; } } - [TC(typeof(EXP))] public class Dat151RadioTrackEvents : Dat151RelData + [TC(typeof(EXP))] public class Dat151RadioTrackTextIDs : Dat151RelData { public uint EventCount { get; set; } public EventData[] Events { get; set; } @@ -10409,12 +10070,12 @@ namespace CodeWalker.GameFiles } } - public Dat151RadioTrackEvents(RelFile rel) : base(rel) + public Dat151RadioTrackTextIDs(RelFile rel) : base(rel) { - Type = Dat151RelType.RadioTrackEvents; + Type = Dat151RelType.RadioTrackTextIDs; TypeID = (byte)Type; } - public Dat151RadioTrackEvents(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioTrackTextIDs(RelData d, BinaryReader br) : base(d, br) { EventCount = br.ReadUInt32(); Events = new EventData[EventCount]; @@ -10422,10 +10083,6 @@ namespace CodeWalker.GameFiles { Events[i] = new EventData(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -10447,242 +10104,150 @@ namespace CodeWalker.GameFiles EventCount = (uint)(Events?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151VehicleEngineGranular : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151GranularEngineAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } public int MasterVolume { get; set; } public MetaHash EngineAccel { get; set; } public MetaHash ExhaustAccel { get; set; } - public int Unk04 { get; set; } - public int Unk05 { get; set; } - public int Unk06 { get; set; } - public int Unk07 { get; set; } - public int Unk08 { get; set; } - public int Unk09 { get; set; } - public int Unk10 { get; set; } - public int Unk11 { get; set; } - public int Unk12 { get; set; } - public int EngineVolume { get; set; } - public int ExhaustVolume { get; set; } - public int EngineIdleVolume { get; set; } - public int ExhaustIdleVolume { get; set; } - public int Unk17 { get; set; } - public int Unk18 { get; set; } - public int EngineAccelVolume { get; set; } - public int ExhaustAccelVolume { get; set; } - public int Unk21 { get; set; } - public float Unk22 { get; set; } - public float Unk23 { get; set; } - public float Unk24 { get; set; } - public float Unk25 { get; set; } - public float Unk26 { get; set; } - public float Unk27 { get; set; } - public float Unk28 { get; set; } - public int Unk29 { get; set; } - public int Unk30 { get; set; } - public MetaHash EngineSubmix { get; set; } - public MetaHash EngineSubmixPreset { get; set; } - public MetaHash ExhaustSubmix { get; set; } - public MetaHash ExhaustSubmixPreset { get; set; } - public MetaHash EngineAccelNPC { get; set; } - public MetaHash ExhaustAccelNPC { get; set; } - public MetaHash LimiterPops { get; set; } - public int Unk38 { get; set; } - public int Unk39 { get; set; } - public MetaHash Unk40 { get; set; } - public MetaHash Unk41 { get; set; } - public int Unk42 { get; set; } - public int Unk43 { get; set; } - public int Unk44 { get; set; } - public MetaHash IdleSub { get; set; } - public int Unk46 { get; set; } - public int Unk47 { get; set; } - public int Unk48 { get; set; } - public int Unk49 { get; set; } - public MetaHash Unk50 { get; set; } - public MetaHash Unk51 { get; set; } - public MetaHash EngineDamage { get; set; } - public MetaHash LimiterPopsUpgraded { get; set; } - public int Unk54 { get; set; } - public int Unk55 { get; set; } - public int Unk56 { get; set; } - public int Unk57 { get; set; } - public int Unk58 { get; set; }//OPTIONAL!? only include this and next if either nonzero? - public float Unk59 { get; set; }//OPTIONAL!? + public int EngineVolume_PreSubmix { get; set; } + public int ExhaustVolume_PreSubmix { get; set; } + public int AccelVolume_PreSubmix { get; set; } + public int DecelVolume_PreSubmix { get; set; } + public int IdleVolume_PreSubmix { get; set; } + public int EngineRevsVolume_PreSubmix { get; set; } + public int ExhaustRevsVolume_PreSubmix { get; set; } + public int EngineThrottleVolume_PreSubmix { get; set; } + public int ExhaustThrottleVolume_PreSubmix { get; set; } + public int EngineVolume_PostSubmix { get; set; } + public int ExhaustVolume_PostSubmix { get; set; } + public int EngineMaxConeAttenuation { get; set; } + public int ExhaustMaxConeAttenuation { get; set; } + public int EngineRevsVolume_PostSubmix { get; set; } + public int ExhaustRevsVolume_PostSubmix { get; set; } + public int EngineThrottleVolume_PostSubmix { get; set; } + public int ExhaustThrottleVolume_PostSubmix { get; set; } + public uint GearChangeWobbleLength { get; set; } + public float GearChangeWobbleLengthVariance { get; set; } + public float GearChangeWobbleSpeed { get; set; } + public float GearChangeWobbleSpeedVariance { get; set; } + public float GearChangeWobblePitch { get; set; } + public float GearChangeWobblePitchVariance { get; set; } + public float GearChangeWobbleVolume { get; set; } + public float GearChangeWobbleVolumeVariance { get; set; } + public int EngineClutchAttenuation_PostSubmix { get; set; } + public int ExhaustClutchAttenuation_PostSubmix { get; set; } + public MetaHash EngineSynthDef { get; set; } + public MetaHash EngineSynthPreset { get; set; } + public MetaHash ExhaustSynthDef { get; set; } + public MetaHash ExhaustSynthPreset { get; set; } + public MetaHash NPCEngineAccel { get; set; } + public MetaHash NPCExhaustAccel { get; set; } + public MetaHash RevLimiterPopSound { get; set; } + public uint MinRPMOverride { get; set; } + public uint MaxRPMOverride { get; set; } + public MetaHash EngineSubmixVoice { get; set; } + public MetaHash ExhaustSubmixVoice { get; set; } + public int ExhaustProximityVolume_PostSubmix { get; set; } + public uint RevLimiterGrainsToPlay { get; set; } + public uint RevLimiterGrainsToSkip { get; set; } + public MetaHash SynchronisedSynth { get; set; } + public int UpgradedEngineVolumeBoost_PostSubmix { get; set; } + public MetaHash UpgradedEngineSynthDef { get; set; } + public MetaHash UpgradedEngineSynthPreset { get; set; } + public int UpgradedExhaustVolumeBoost_PostSubmix { get; set; } + public MetaHash UpgradedExhaustSynthDef { get; set; } + public MetaHash UpgradedExhaustSynthPreset { get; set; } + public MetaHash DamageSynthHashList { get; set; } + public MetaHash UpgradedRevLimiterPop { get; set; } + public int EngineIdleVolume_PostSubmix { get; set; } + public int ExhaustIdleVolume_PostSubmix { get; set; } + public int StartupRevsVolumeBoostEngine_PostSubmix { get; set; } + public int StartupRevsVolumeBoostExhaust_PostSubmix { get; set; } + public int RevLimiterApplyType { get; set; } + public float RevLimiterVolumeCut { get; set; } - public Dat151VehicleEngineGranular(RelFile rel) : base(rel) + public Dat151GranularEngineAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleEngineGranular; + Type = Dat151RelType.GranularEngineAudioSettings; TypeID = (byte)Type; } - public Dat151VehicleEngineGranular(RelData d, BinaryReader br) : base(d, br) + public Dat151GranularEngineAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); MasterVolume = br.ReadInt32(); EngineAccel = br.ReadUInt32(); ExhaustAccel = br.ReadUInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadInt32(); - Unk06 = br.ReadInt32(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadInt32(); - Unk09 = br.ReadInt32(); - Unk10 = br.ReadInt32(); - Unk11 = br.ReadInt32(); - Unk12 = br.ReadInt32(); - EngineVolume = br.ReadInt32(); - ExhaustVolume = br.ReadInt32(); - EngineIdleVolume = br.ReadInt32(); - ExhaustIdleVolume = br.ReadInt32(); - Unk17 = br.ReadInt32(); - Unk18 = br.ReadInt32(); - EngineAccelVolume = br.ReadInt32(); - ExhaustAccelVolume = br.ReadInt32(); - Unk21 = br.ReadInt32(); - Unk22 = br.ReadSingle(); - Unk23 = br.ReadSingle(); - Unk24 = br.ReadSingle(); - Unk25 = br.ReadSingle(); - Unk26 = br.ReadSingle(); - Unk27 = br.ReadSingle(); - Unk28 = br.ReadSingle(); - Unk29 = br.ReadInt32(); - Unk30 = br.ReadInt32(); - EngineSubmix = br.ReadUInt32(); - EngineSubmixPreset = br.ReadUInt32(); - ExhaustSubmix = br.ReadUInt32(); - ExhaustSubmixPreset = br.ReadUInt32(); - EngineAccelNPC = br.ReadUInt32(); - ExhaustAccelNPC = br.ReadUInt32(); - LimiterPops = br.ReadUInt32(); - Unk38 = br.ReadInt32(); - Unk39 = br.ReadInt32(); - Unk40 = br.ReadUInt32(); - Unk41 = br.ReadUInt32(); - Unk42 = br.ReadInt32(); - Unk43 = br.ReadInt32(); - Unk44 = br.ReadInt32(); - IdleSub = br.ReadUInt32(); - Unk46 = br.ReadInt32(); - Unk47 = br.ReadInt32(); - Unk48 = br.ReadInt32(); - Unk49 = br.ReadInt32(); - Unk50 = br.ReadUInt32(); - Unk51 = br.ReadUInt32(); - EngineDamage = br.ReadUInt32(); - LimiterPopsUpgraded = br.ReadUInt32(); - Unk54 = br.ReadInt32(); - Unk55 = br.ReadInt32(); - Unk56 = br.ReadInt32(); - Unk57 = br.ReadInt32(); + EngineVolume_PreSubmix = br.ReadInt32(); + ExhaustVolume_PreSubmix = br.ReadInt32(); + AccelVolume_PreSubmix = br.ReadInt32(); + DecelVolume_PreSubmix = br.ReadInt32(); + IdleVolume_PreSubmix = br.ReadInt32(); + EngineRevsVolume_PreSubmix = br.ReadInt32(); + ExhaustRevsVolume_PreSubmix = br.ReadInt32(); + EngineThrottleVolume_PreSubmix = br.ReadInt32(); + ExhaustThrottleVolume_PreSubmix = br.ReadInt32(); + EngineVolume_PostSubmix = br.ReadInt32(); + ExhaustVolume_PostSubmix = br.ReadInt32(); + EngineMaxConeAttenuation = br.ReadInt32(); + ExhaustMaxConeAttenuation = br.ReadInt32(); + EngineRevsVolume_PostSubmix = br.ReadInt32(); + ExhaustRevsVolume_PostSubmix = br.ReadInt32(); + EngineThrottleVolume_PostSubmix = br.ReadInt32(); + ExhaustThrottleVolume_PostSubmix = br.ReadInt32(); + GearChangeWobbleLength = br.ReadUInt32(); + GearChangeWobbleLengthVariance = br.ReadSingle(); + GearChangeWobbleSpeed = br.ReadSingle(); + GearChangeWobbleSpeedVariance = br.ReadSingle(); + GearChangeWobblePitch = br.ReadSingle(); + GearChangeWobblePitchVariance = br.ReadSingle(); + GearChangeWobbleVolume = br.ReadSingle(); + GearChangeWobbleVolumeVariance = br.ReadSingle(); + EngineClutchAttenuation_PostSubmix = br.ReadInt32(); + ExhaustClutchAttenuation_PostSubmix = br.ReadInt32(); + EngineSynthDef = br.ReadUInt32(); + EngineSynthPreset = br.ReadUInt32(); + ExhaustSynthDef = br.ReadUInt32(); + ExhaustSynthPreset = br.ReadUInt32(); + NPCEngineAccel = br.ReadUInt32(); + NPCExhaustAccel = br.ReadUInt32(); + RevLimiterPopSound = br.ReadUInt32(); + MinRPMOverride = br.ReadUInt32(); + MaxRPMOverride = br.ReadUInt32(); + EngineSubmixVoice = br.ReadUInt32(); + ExhaustSubmixVoice = br.ReadUInt32(); + ExhaustProximityVolume_PostSubmix = br.ReadInt32(); + RevLimiterGrainsToPlay = br.ReadUInt32(); + RevLimiterGrainsToSkip = br.ReadUInt32(); + SynchronisedSynth = br.ReadUInt32(); + UpgradedEngineVolumeBoost_PostSubmix = br.ReadInt32(); + UpgradedEngineSynthDef = br.ReadUInt32(); + UpgradedEngineSynthPreset = br.ReadUInt32(); + UpgradedExhaustVolumeBoost_PostSubmix = br.ReadInt32(); + UpgradedExhaustSynthDef = br.ReadUInt32(); + UpgradedExhaustSynthPreset = br.ReadUInt32(); + DamageSynthHashList = br.ReadUInt32(); + UpgradedRevLimiterPop = br.ReadUInt32(); + EngineIdleVolume_PostSubmix = br.ReadInt32(); + ExhaustIdleVolume_PostSubmix = br.ReadInt32(); + StartupRevsVolumeBoostEngine_PostSubmix = br.ReadInt32(); + StartupRevsVolumeBoostExhaust_PostSubmix = br.ReadInt32(); - - switch (this.Flags) - { - case 0xAAAAA905: - case 0xAAAAA955: - case 0xAAAAA954: - case 0xAAAAA914: - case 0xAAAAA904: - case 0xAAAAA805: - case 0xAAAAA915: - case 0xAAAAA945: - case 0xAAAAA815: - case 0xAAAAA944: - case 0xAAAAA854: - break; - default: - break; - } - switch (this.Unk40) - { - case 1225003942: - break; - default: - break; - } - switch (this.Unk41) - { - case 1479769906: - break; - default: - break; - } - switch (this.Unk43) - { - case 5: - case 3: - case 4: - case 2: - case 6: - case 1: - break; - default: - break; - } - switch (this.Unk44) - { - case 2: - case 1: - case 3: - case 4: - break; - default: - break; - } - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - switch (bytesleft) //any other way to tell?? + switch (bytesleft) // Check for any left over bytes { - case 0: + case 0: // if 0 bytes left, end break; - case 8: - Unk58 = br.ReadInt32(); - Unk59 = br.ReadSingle(); - switch (Unk58) - { - case 1: - case 2: - case 0: - break; - default: - break;//no hit here - } - if ((Unk58 == 0) && (Unk59 == 0)) - { }//no hit here + case 8: // if 8 bytes left, read additional values + RevLimiterApplyType = br.ReadInt32(); + RevLimiterVolumeCut = br.ReadSingle(); break; default: - break;//no hit here + break; } - - if (bytesleft != 0) - { } - - if (Unk04 != 0) - { } - if (Unk09 != 0) - { } - if (Unk10 != 0) - { } - if (Unk11 != 0) - { } - if (Unk12 != 0) - { } - if (Unk38 != 0) - { } - if (Unk39 != 0) - { } - if (Unk47 != 0) - { } - if (Unk48 != 0) - { } - if (Unk50 != 0) - { } - if (Unk51 != 0) - { } - - } public override void Write(BinaryWriter bw) { @@ -10691,64 +10256,64 @@ namespace CodeWalker.GameFiles bw.Write(MasterVolume); bw.Write(EngineAccel); bw.Write(ExhaustAccel); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(EngineVolume); - bw.Write(ExhaustVolume); - bw.Write(EngineIdleVolume); - bw.Write(ExhaustIdleVolume); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(EngineAccelVolume); - bw.Write(ExhaustAccelVolume); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Unk24); - bw.Write(Unk25); - bw.Write(Unk26); - bw.Write(Unk27); - bw.Write(Unk28); - bw.Write(Unk29); - bw.Write(Unk30); - bw.Write(EngineSubmix); - bw.Write(EngineSubmixPreset); - bw.Write(ExhaustSubmix); - bw.Write(ExhaustSubmixPreset); - bw.Write(EngineAccelNPC); - bw.Write(ExhaustAccelNPC); - bw.Write(LimiterPops); - bw.Write(Unk38); - bw.Write(Unk39); - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(Unk42); - bw.Write(Unk43); - bw.Write(Unk44); - bw.Write(IdleSub); - bw.Write(Unk46); - bw.Write(Unk47); - bw.Write(Unk48); - bw.Write(Unk49); - bw.Write(Unk50); - bw.Write(Unk51); - bw.Write(EngineDamage); - bw.Write(LimiterPopsUpgraded); - bw.Write(Unk54); - bw.Write(Unk55); - bw.Write(Unk56); - bw.Write(Unk57); - if ((Unk58 != 0) || (Unk59 != 0))//how else to know?? seems hacky! + bw.Write(EngineVolume_PreSubmix); + bw.Write(ExhaustVolume_PreSubmix); + bw.Write(AccelVolume_PreSubmix); + bw.Write(DecelVolume_PreSubmix); + bw.Write(IdleVolume_PreSubmix); + bw.Write(EngineRevsVolume_PreSubmix); + bw.Write(ExhaustRevsVolume_PreSubmix); + bw.Write(EngineThrottleVolume_PreSubmix); + bw.Write(ExhaustThrottleVolume_PreSubmix); + bw.Write(EngineVolume_PostSubmix); + bw.Write(ExhaustVolume_PostSubmix); + bw.Write(EngineMaxConeAttenuation); + bw.Write(ExhaustMaxConeAttenuation); + bw.Write(EngineRevsVolume_PostSubmix); + bw.Write(ExhaustRevsVolume_PostSubmix); + bw.Write(EngineThrottleVolume_PostSubmix); + bw.Write(ExhaustThrottleVolume_PostSubmix); + bw.Write(GearChangeWobbleLength); + bw.Write(GearChangeWobbleLengthVariance); + bw.Write(GearChangeWobbleSpeed); + bw.Write(GearChangeWobbleSpeedVariance); + bw.Write(GearChangeWobblePitch); + bw.Write(GearChangeWobblePitchVariance); + bw.Write(GearChangeWobbleVolume); + bw.Write(GearChangeWobbleVolumeVariance); + bw.Write(EngineClutchAttenuation_PostSubmix); + bw.Write(ExhaustClutchAttenuation_PostSubmix); + bw.Write(EngineSynthDef); + bw.Write(EngineSynthPreset); + bw.Write(ExhaustSynthDef); + bw.Write(ExhaustSynthPreset); + bw.Write(NPCEngineAccel); + bw.Write(NPCExhaustAccel); + bw.Write(RevLimiterPopSound); + bw.Write(MinRPMOverride); + bw.Write(MaxRPMOverride); + bw.Write(EngineSubmixVoice); + bw.Write(ExhaustSubmixVoice); + bw.Write(ExhaustProximityVolume_PostSubmix); + bw.Write(RevLimiterGrainsToPlay); + bw.Write(RevLimiterGrainsToSkip); + bw.Write(SynchronisedSynth); + bw.Write(UpgradedEngineVolumeBoost_PostSubmix); + bw.Write(UpgradedEngineSynthDef); + bw.Write(UpgradedEngineSynthPreset); + bw.Write(UpgradedExhaustVolumeBoost_PostSubmix); + bw.Write(UpgradedExhaustSynthDef); + bw.Write(UpgradedExhaustSynthPreset); + bw.Write(DamageSynthHashList); + bw.Write(UpgradedRevLimiterPop); + bw.Write(EngineIdleVolume_PostSubmix); + bw.Write(ExhaustIdleVolume_PostSubmix); + bw.Write(StartupRevsVolumeBoostEngine_PostSubmix); + bw.Write(StartupRevsVolumeBoostExhaust_PostSubmix); + if ((RevLimiterApplyType != 0) || (RevLimiterVolumeCut != 0)) // if values arent 0, Write them. { - bw.Write(Unk58); - bw.Write(Unk59); + bw.Write(RevLimiterApplyType); + bw.Write(RevLimiterVolumeCut); } } public override void WriteXml(StringBuilder sb, int indent) @@ -10757,62 +10322,62 @@ namespace CodeWalker.GameFiles RelXml.ValueTag(sb, indent, "MasterVolume", MasterVolume.ToString()); RelXml.StringTag(sb, indent, "EngineAccel", RelXml.HashString(EngineAccel)); RelXml.StringTag(sb, indent, "ExhaustAccel", RelXml.HashString(ExhaustAccel)); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "EngineVolume", EngineVolume.ToString()); - RelXml.ValueTag(sb, indent, "ExhaustVolume", ExhaustVolume.ToString()); - RelXml.ValueTag(sb, indent, "EngineIdleVolume", EngineIdleVolume.ToString()); - RelXml.ValueTag(sb, indent, "ExhaustIdleVolume", ExhaustIdleVolume.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.ValueTag(sb, indent, "Unk18", Unk18.ToString()); - RelXml.ValueTag(sb, indent, "EngineAccelVolume", EngineAccelVolume.ToString()); - RelXml.ValueTag(sb, indent, "ExhaustAccelVolume", ExhaustAccelVolume.ToString()); - RelXml.ValueTag(sb, indent, "Unk21", Unk21.ToString()); - RelXml.ValueTag(sb, indent, "Unk22", FloatUtil.ToString(Unk22)); - RelXml.ValueTag(sb, indent, "Unk23", FloatUtil.ToString(Unk23)); - RelXml.ValueTag(sb, indent, "Unk24", FloatUtil.ToString(Unk24)); - RelXml.ValueTag(sb, indent, "Unk25", FloatUtil.ToString(Unk25)); - RelXml.ValueTag(sb, indent, "Unk26", FloatUtil.ToString(Unk26)); - RelXml.ValueTag(sb, indent, "Unk27", FloatUtil.ToString(Unk27)); - RelXml.ValueTag(sb, indent, "Unk28", FloatUtil.ToString(Unk28)); - RelXml.ValueTag(sb, indent, "Unk29", Unk29.ToString()); - RelXml.ValueTag(sb, indent, "Unk30", Unk30.ToString()); - RelXml.StringTag(sb, indent, "EngineSubmix", RelXml.HashString(EngineSubmix)); - RelXml.StringTag(sb, indent, "EngineSubmixPreset", RelXml.HashString(EngineSubmixPreset)); - RelXml.StringTag(sb, indent, "ExhaustSubmix", RelXml.HashString(ExhaustSubmix)); - RelXml.StringTag(sb, indent, "ExhaustSubmixPreset", RelXml.HashString(ExhaustSubmixPreset)); - RelXml.StringTag(sb, indent, "EngineAccelNPC", RelXml.HashString(EngineAccelNPC)); - RelXml.StringTag(sb, indent, "ExhaustAccelNPC", RelXml.HashString(ExhaustAccelNPC)); - RelXml.StringTag(sb, indent, "LimiterPops", RelXml.HashString(LimiterPops)); - RelXml.ValueTag(sb, indent, "Unk38", Unk38.ToString()); - RelXml.ValueTag(sb, indent, "Unk39", Unk39.ToString()); - RelXml.StringTag(sb, indent, "Unk40", RelXml.HashString(Unk40)); - RelXml.StringTag(sb, indent, "Unk41", RelXml.HashString(Unk41)); - RelXml.ValueTag(sb, indent, "Unk42", Unk42.ToString()); - RelXml.ValueTag(sb, indent, "Unk43", Unk43.ToString()); - RelXml.ValueTag(sb, indent, "Unk44", Unk44.ToString()); - RelXml.StringTag(sb, indent, "IdleSub", RelXml.HashString(IdleSub)); - RelXml.ValueTag(sb, indent, "Unk46", Unk46.ToString()); - RelXml.ValueTag(sb, indent, "Unk47", Unk47.ToString()); - RelXml.ValueTag(sb, indent, "Unk48", Unk48.ToString()); - RelXml.ValueTag(sb, indent, "Unk49", Unk49.ToString()); - RelXml.StringTag(sb, indent, "Unk50", RelXml.HashString(Unk50)); - RelXml.StringTag(sb, indent, "Unk51", RelXml.HashString(Unk51)); - RelXml.StringTag(sb, indent, "EngineDamage", RelXml.HashString(EngineDamage)); - RelXml.StringTag(sb, indent, "LimiterPopsUpgraded", RelXml.HashString(LimiterPopsUpgraded)); - RelXml.ValueTag(sb, indent, "Unk54", Unk54.ToString()); - RelXml.ValueTag(sb, indent, "Unk55", Unk55.ToString()); - RelXml.ValueTag(sb, indent, "Unk56", Unk56.ToString()); - RelXml.ValueTag(sb, indent, "Unk57", Unk57.ToString()); - RelXml.ValueTag(sb, indent, "Unk58", Unk58.ToString()); - RelXml.ValueTag(sb, indent, "Unk59", FloatUtil.ToString(Unk59)); + RelXml.ValueTag(sb, indent, "EngineVolume_PreSubmix", EngineVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustVolume_PreSubmix", ExhaustVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "AccelVolume_PreSubmix", AccelVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "DecelVolume_PreSubmix", DecelVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "IdleVolume_PreSubmix", IdleVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "EngineRevsVolume_PreSubmix", EngineRevsVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustRevsVolume_PreSubmix", ExhaustRevsVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "EngineThrottleVolume_PreSubmix", EngineThrottleVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustThrottleVolume_PreSubmix", ExhaustThrottleVolume_PreSubmix.ToString()); + RelXml.ValueTag(sb, indent, "EngineVolume_PostSubmix", EngineVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustVolume_PostSubmix", ExhaustVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "EngineMaxConeAttenuation", EngineMaxConeAttenuation.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustMaxConeAttenuation", ExhaustMaxConeAttenuation.ToString()); + RelXml.ValueTag(sb, indent, "EngineRevsVolume_PostSubmix", EngineRevsVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustRevsVolume_PostSubmix", ExhaustRevsVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "EngineThrottleVolume_PostSubmix", EngineThrottleVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustThrottleVolume_PostSubmix", ExhaustThrottleVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "GearChangeWobbleLength", GearChangeWobbleLength.ToString()); + RelXml.ValueTag(sb, indent, "GearChangeWobbleLengthVariance", FloatUtil.ToString(GearChangeWobbleLengthVariance)); + RelXml.ValueTag(sb, indent, "GearChangeWobbleSpeed", FloatUtil.ToString(GearChangeWobbleSpeed)); + RelXml.ValueTag(sb, indent, "GearChangeWobbleSpeedVariance", FloatUtil.ToString(GearChangeWobbleSpeedVariance)); + RelXml.ValueTag(sb, indent, "GearChangeWobblePitch", FloatUtil.ToString(GearChangeWobblePitch)); + RelXml.ValueTag(sb, indent, "GearChangeWobblePitchVariance", FloatUtil.ToString(GearChangeWobblePitchVariance)); + RelXml.ValueTag(sb, indent, "GearChangeWobbleVolume", FloatUtil.ToString(GearChangeWobbleVolume)); + RelXml.ValueTag(sb, indent, "GearChangeWobbleVolumeVariance", FloatUtil.ToString(GearChangeWobbleVolumeVariance)); + RelXml.ValueTag(sb, indent, "EngineClutchAttenuation_PostSubmix", EngineClutchAttenuation_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustClutchAttenuation_PostSubmix", ExhaustClutchAttenuation_PostSubmix.ToString()); + RelXml.StringTag(sb, indent, "EngineSynthDef", RelXml.HashString(EngineSynthDef)); + RelXml.StringTag(sb, indent, "EngineSynthPreset", RelXml.HashString(EngineSynthPreset)); + RelXml.StringTag(sb, indent, "ExhaustSynthDef", RelXml.HashString(ExhaustSynthDef)); + RelXml.StringTag(sb, indent, "ExhaustSynthPreset", RelXml.HashString(ExhaustSynthPreset)); + RelXml.StringTag(sb, indent, "NPCEngineAccel", RelXml.HashString(NPCEngineAccel)); + RelXml.StringTag(sb, indent, "NPCExhaustAccel", RelXml.HashString(NPCExhaustAccel)); + RelXml.StringTag(sb, indent, "RevLimiterPopSound", RelXml.HashString(RevLimiterPopSound)); + RelXml.ValueTag(sb, indent, "MinRPMOverride", MinRPMOverride.ToString()); + RelXml.ValueTag(sb, indent, "MaxRPMOverride", MaxRPMOverride.ToString()); + RelXml.StringTag(sb, indent, "EngineSubmixVoice", RelXml.HashString(EngineSubmixVoice)); + RelXml.StringTag(sb, indent, "ExhaustSubmixVoice", RelXml.HashString(ExhaustSubmixVoice)); + RelXml.ValueTag(sb, indent, "ExhaustProximityVolume_PostSubmix", ExhaustProximityVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "RevLimiterGrainsToPlay", RevLimiterGrainsToPlay.ToString()); + RelXml.ValueTag(sb, indent, "RevLimiterGrainsToSkip", RevLimiterGrainsToSkip.ToString()); + RelXml.StringTag(sb, indent, "SynchronisedSynth", RelXml.HashString(SynchronisedSynth)); + RelXml.ValueTag(sb, indent, "UpgradedEngineVolumeBoost_PostSubmix", UpgradedEngineVolumeBoost_PostSubmix.ToString()); + RelXml.StringTag(sb, indent, "UpgradedEngineSynthDef", RelXml.HashString(UpgradedEngineSynthDef)); + RelXml.StringTag(sb, indent, "UpgradedEngineSynthPreset", RelXml.HashString(UpgradedEngineSynthPreset)); + RelXml.ValueTag(sb, indent, "UpgradedExhaustVolumeBoost_PostSubmix", UpgradedExhaustVolumeBoost_PostSubmix.ToString()); + RelXml.StringTag(sb, indent, "UpgradedExhaustSynthDef", RelXml.HashString(UpgradedExhaustSynthDef)); + RelXml.StringTag(sb, indent, "UpgradedExhaustSynthPreset", RelXml.HashString(UpgradedExhaustSynthPreset)); + RelXml.StringTag(sb, indent, "DamageSynthHashList", RelXml.HashString(DamageSynthHashList)); + RelXml.StringTag(sb, indent, "UpgradedRevLimiterPop", RelXml.HashString(UpgradedRevLimiterPop)); + RelXml.ValueTag(sb, indent, "EngineIdleVolume_PostSubmix", EngineIdleVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustIdleVolume_PostSubmix", ExhaustIdleVolume_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "StartupRevsVolumeBoostEngine_PostSubmix", StartupRevsVolumeBoostEngine_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "StartupRevsVolumeBoostExhaust_PostSubmix", StartupRevsVolumeBoostExhaust_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "RevLimiterApplyType", RevLimiterApplyType.ToString()); + RelXml.ValueTag(sb, indent, "RevLimiterVolumeCut", FloatUtil.ToString(RevLimiterVolumeCut)); } public override void ReadXml(XmlNode node) { @@ -10820,407 +10385,351 @@ namespace CodeWalker.GameFiles MasterVolume = Xml.GetChildIntAttribute(node, "MasterVolume", "value"); EngineAccel = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineAccel")); ExhaustAccel = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustAccel")); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildIntAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildIntAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); - EngineVolume = Xml.GetChildIntAttribute(node, "EngineVolume", "value"); - ExhaustVolume = Xml.GetChildIntAttribute(node, "ExhaustVolume", "value"); - EngineIdleVolume = Xml.GetChildIntAttribute(node, "EngineIdleVolume", "value"); - ExhaustIdleVolume = Xml.GetChildIntAttribute(node, "ExhaustIdleVolume", "value"); - Unk17 = Xml.GetChildIntAttribute(node, "Unk17", "value"); - Unk18 = Xml.GetChildIntAttribute(node, "Unk18", "value"); - EngineAccelVolume = Xml.GetChildIntAttribute(node, "EngineAccelVolume", "value"); - ExhaustAccelVolume = Xml.GetChildIntAttribute(node, "ExhaustAccelVolume", "value"); - Unk21 = Xml.GetChildIntAttribute(node, "Unk21", "value"); - Unk22 = Xml.GetChildFloatAttribute(node, "Unk22", "value"); - Unk23 = Xml.GetChildFloatAttribute(node, "Unk23", "value"); - Unk24 = Xml.GetChildFloatAttribute(node, "Unk24", "value"); - Unk25 = Xml.GetChildFloatAttribute(node, "Unk25", "value"); - Unk26 = Xml.GetChildFloatAttribute(node, "Unk26", "value"); - Unk27 = Xml.GetChildFloatAttribute(node, "Unk27", "value"); - Unk28 = Xml.GetChildFloatAttribute(node, "Unk28", "value"); - Unk29 = Xml.GetChildIntAttribute(node, "Unk29", "value"); - Unk30 = Xml.GetChildIntAttribute(node, "Unk30", "value"); - EngineSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmix")); - EngineSubmixPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixPreset")); - ExhaustSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmix")); - ExhaustSubmixPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixPreset")); - EngineAccelNPC = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineAccelNPC")); - ExhaustAccelNPC = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustAccelNPC")); - LimiterPops = XmlRel.GetHash(Xml.GetChildInnerText(node, "LimiterPops")); - Unk38 = Xml.GetChildIntAttribute(node, "Unk38", "value"); - Unk39 = Xml.GetChildIntAttribute(node, "Unk39", "value"); - Unk40 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk40")); - Unk41 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk41")); - Unk42 = Xml.GetChildIntAttribute(node, "Unk42", "value"); - Unk43 = Xml.GetChildIntAttribute(node, "Unk43", "value"); - Unk44 = Xml.GetChildIntAttribute(node, "Unk44", "value"); - IdleSub = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleSub")); - Unk46 = Xml.GetChildIntAttribute(node, "Unk46", "value"); - Unk47 = Xml.GetChildIntAttribute(node, "Unk47", "value"); - Unk48 = Xml.GetChildIntAttribute(node, "Unk48", "value"); - Unk49 = Xml.GetChildIntAttribute(node, "Unk49", "value"); - Unk50 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk50")); - Unk51 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk51")); - EngineDamage = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineDamage")); - LimiterPopsUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "LimiterPopsUpgraded")); - Unk54 = Xml.GetChildIntAttribute(node, "Unk54", "value"); - Unk55 = Xml.GetChildIntAttribute(node, "Unk55", "value"); - Unk56 = Xml.GetChildIntAttribute(node, "Unk56", "value"); - Unk57 = Xml.GetChildIntAttribute(node, "Unk57", "value"); - Unk58 = Xml.GetChildIntAttribute(node, "Unk58", "value"); - Unk59 = Xml.GetChildFloatAttribute(node, "Unk59", "value"); + EngineVolume_PreSubmix = Xml.GetChildIntAttribute(node, "EngineVolume_PreSubmix", "value"); + ExhaustVolume_PreSubmix = Xml.GetChildIntAttribute(node, "ExhaustVolume_PreSubmix", "value"); + AccelVolume_PreSubmix = Xml.GetChildIntAttribute(node, "AccelVolume_PreSubmix", "value"); + DecelVolume_PreSubmix = Xml.GetChildIntAttribute(node, "DecelVolume_PreSubmix", "value"); + IdleVolume_PreSubmix = Xml.GetChildIntAttribute(node, "IdleVolume_PreSubmix", "value"); + EngineRevsVolume_PreSubmix = Xml.GetChildIntAttribute(node, "EngineRevsVolume_PreSubmix", "value"); + ExhaustRevsVolume_PreSubmix = Xml.GetChildIntAttribute(node, "ExhaustRevsVolume_PreSubmix", "value"); + EngineThrottleVolume_PreSubmix = Xml.GetChildIntAttribute(node, "EngineThrottleVolume_PreSubmix", "value"); + ExhaustThrottleVolume_PreSubmix = Xml.GetChildIntAttribute(node, "ExhaustThrottleVolume_PreSubmix", "value"); + EngineVolume_PostSubmix = Xml.GetChildIntAttribute(node, "EngineVolume_PostSubmix", "value"); + ExhaustVolume_PostSubmix = Xml.GetChildIntAttribute(node, "ExhaustVolume_PostSubmix", "value"); + EngineMaxConeAttenuation = Xml.GetChildIntAttribute(node, "EngineMaxConeAttenuation", "value"); + ExhaustMaxConeAttenuation = Xml.GetChildIntAttribute(node, "ExhaustMaxConeAttenuation", "value"); + EngineRevsVolume_PostSubmix = Xml.GetChildIntAttribute(node, "EngineRevsVolume_PostSubmix", "value"); + ExhaustRevsVolume_PostSubmix = Xml.GetChildIntAttribute(node, "ExhaustRevsVolume_PostSubmix", "value"); + EngineThrottleVolume_PostSubmix = Xml.GetChildIntAttribute(node, "EngineThrottleVolume_PostSubmix", "value"); + ExhaustThrottleVolume_PostSubmix = Xml.GetChildIntAttribute(node, "ExhaustThrottleVolume_PostSubmix", "value"); + GearChangeWobbleLength = Xml.GetChildUIntAttribute(node, "GearChangeWobbleLength", "value"); + GearChangeWobbleLengthVariance = Xml.GetChildFloatAttribute(node, "GearChangeWobbleLengthVariance", "value"); + GearChangeWobbleSpeed = Xml.GetChildFloatAttribute(node, "GearChangeWobbleSpeed", "value"); + GearChangeWobbleSpeedVariance = Xml.GetChildFloatAttribute(node, "GearChangeWobbleSpeedVariance", "value"); + GearChangeWobblePitch = Xml.GetChildFloatAttribute(node, "GearChangeWobblePitch", "value"); + GearChangeWobblePitchVariance = Xml.GetChildFloatAttribute(node, "GearChangeWobblePitchVariance", "value"); + GearChangeWobbleVolume = Xml.GetChildFloatAttribute(node, "GearChangeWobbleVolume", "value"); + GearChangeWobbleVolumeVariance = Xml.GetChildFloatAttribute(node, "GearChangeWobbleVolumeVariance", "value"); + EngineClutchAttenuation_PostSubmix = Xml.GetChildIntAttribute(node, "EngineClutchAttenuation_PostSubmix", "value"); + ExhaustClutchAttenuation_PostSubmix = Xml.GetChildIntAttribute(node, "ExhaustClutchAttenuation_PostSubmix", "value"); + EngineSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthDef")); + EngineSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthPreset")); + ExhaustSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthDef")); + ExhaustSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthPreset")); + NPCEngineAccel = XmlRel.GetHash(Xml.GetChildInnerText(node, "NPCEngineAccel")); + NPCExhaustAccel = XmlRel.GetHash(Xml.GetChildInnerText(node, "NPCExhaustAccel")); + RevLimiterPopSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RevLimiterPopSound")); + MinRPMOverride = Xml.GetChildUIntAttribute(node, "MinRPMOverride", "value"); + MaxRPMOverride = Xml.GetChildUIntAttribute(node, "MaxRPMOverride", "value"); + EngineSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixVoice")); + ExhaustSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixVoice")); + ExhaustProximityVolume_PostSubmix = Xml.GetChildIntAttribute(node, "ExhaustProximityVolume_PostSubmix", "value"); + RevLimiterGrainsToPlay = Xml.GetChildUIntAttribute(node, "RevLimiterGrainsToPlay", "value"); + RevLimiterGrainsToSkip = Xml.GetChildUIntAttribute(node, "RevLimiterGrainsToSkip", "value"); + SynchronisedSynth = XmlRel.GetHash(Xml.GetChildInnerText(node, "SynchronisedSynth")); + UpgradedEngineVolumeBoost_PostSubmix = Xml.GetChildIntAttribute(node, "UpgradedEngineVolumeBoost_PostSubmix", "value"); + UpgradedEngineSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedEngineSynthDef")); + UpgradedEngineSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedEngineSynthPreset")); + UpgradedExhaustVolumeBoost_PostSubmix = Xml.GetChildIntAttribute(node, "UpgradedExhaustVolumeBoost_PostSubmix", "value"); + UpgradedExhaustSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedExhaustSynthDef")); + UpgradedExhaustSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedExhaustSynthPreset")); + DamageSynthHashList = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageSynthHashList")); + UpgradedRevLimiterPop = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedRevLimiterPop")); + EngineIdleVolume_PostSubmix = Xml.GetChildIntAttribute(node, "EngineIdleVolume_PostSubmix", "value"); + ExhaustIdleVolume_PostSubmix = Xml.GetChildIntAttribute(node, "ExhaustIdleVolume_PostSubmix", "value"); + StartupRevsVolumeBoostEngine_PostSubmix = Xml.GetChildIntAttribute(node, "StartupRevsVolumeBoostEngine_PostSubmix", "value"); + StartupRevsVolumeBoostExhaust_PostSubmix = Xml.GetChildIntAttribute(node, "StartupRevsVolumeBoostExhaust_PostSubmix", "value"); + RevLimiterApplyType = Xml.GetChildIntAttribute(node, "RevLimiterApplyType", "value"); + RevLimiterVolumeCut = Xml.GetChildFloatAttribute(node, "RevLimiterVolumeCut", "value"); } public override MetaHash[] GetSynthHashes() { - return new[] { EngineSubmix, EngineSubmixPreset, ExhaustSubmix, ExhaustSubmixPreset, Unk50, Unk51 }; + return new[] { EngineSynthDef, EngineSynthPreset, ExhaustSynthDef, ExhaustSynthPreset, UpgradedExhaustSynthDef, + UpgradedExhaustSynthPreset, UpgradedEngineSynthDef, UpgradedEngineSynthPreset }; } public override MetaHash[] GetSoundHashes() { - return new[] { EngineAccel, ExhaustAccel, EngineAccelNPC, ExhaustAccelNPC, LimiterPops, Unk40, Unk41, IdleSub, EngineDamage, LimiterPopsUpgraded }; + return new[] { EngineAccel, ExhaustAccel, NPCEngineAccel, NPCExhaustAccel, RevLimiterPopSound, EngineSubmixVoice, ExhaustSubmixVoice, + SynchronisedSynth, DamageSynthHashList, UpgradedRevLimiterPop }; } } - [TC(typeof(EXP))] public class Dat151Vehicle : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151CarAudioSettings : Dat151RelData { - public FlagsUint Flags { get; set; } //2432719400 0x91005A28 + public FlagsUint Flags { get; set; } public MetaHash Engine { get; set; } - public MetaHash EngineGranular { get; set; } - public MetaHash Horns { get; set; } - public MetaHash DoorOpen { get; set; } - public MetaHash DoorClose { get; set; } - public MetaHash TrunkOpen { get; set; } - public MetaHash TrunkClose { get; set; } - public MetaHash Unk08 { get; set; } - public float Unk09 { get; set; } + public MetaHash GranularEngine { get; set; } + public MetaHash HornSounds { get; set; } + public MetaHash DoorOpenSound { get; set; } + public MetaHash DoorCloseSound { get; set; } + public MetaHash BootOpenSound { get; set; } + public MetaHash BootCloseSound { get; set; } + public MetaHash RollSound { get; set; } + public float BrakeSqueekFactor { get; set; } public MetaHash SuspensionUp { get; set; } public MetaHash SuspensionDown { get; set; } - public float SuspensionUpFrequency { get; set; } - public float SuspensionDownFrequency { get; set; } - public MetaHash Collision { get; set; } - public int Unk15 { get; set; } - public int Unk16 { get; set; } - public int Unk17 { get; set; } - public MetaHash PoliceScannerParams { get; set; } - public MetaHash JumpLandIntact { get; set; } - public MetaHash JumpLandLoose { get; set; } - public int Unk21 { get; set; } - public int Unk22 { get; set; } - public FlagsUint RadioFlags { get; set; } + public float MinSuspCompThresh { get; set; } + public float MaxSuspCompThresh { get; set; } + public MetaHash VehicleCollisions { get; set; } + public uint CarMake { get; set; } + public uint CarModel { get; set; } + public uint CarCategory { get; set; } + public MetaHash ScannerVehicleSettings { get; set; } + public MetaHash JumpLandSound { get; set; } + public MetaHash DamagedJumpLandSound { get; set; } + public uint JumpLandMinThresh { get; set; } + public uint JumpLandMaxThresh { get; set; } + public byte VolumeCategory { get; set; } + public byte GPSType { get; set; } + public byte RadioType { get; set; } + public byte RadioGenre { get; set; } public MetaHash IndicatorOn { get; set; } public MetaHash IndicatorOff { get; set; } public MetaHash Handbrake { get; set; } - public ushort Unk27 { get; set; } - public ushort Unk28 { get; set; } - public MetaHash ParkingTones { get; set; } - public MetaHash Unk29 { get; set; } - public MetaHash Unk30 { get; set; } - public MetaHash Unk31 { get; set; } - public MetaHash Fire { get; set; } - public MetaHash StartupSequence { get; set; } - public MetaHash Unk34 { get; set; }// 0xE38FCF16 - public MetaHash Unk35 { get; set; } - public MetaHash Unk36 { get; set; } - public float Unk37 { get; set; } - public float Unk38 { get; set; } - public MetaHash Unk39 { get; set; } - public int Unk40 { get; set; } - public MetaHash Sirens { get; set; }// sirens - public int Unk42 { get; set; } - public int Unk43 { get; set; } - public int Unk44 { get; set; } - public MetaHash Unk45 { get; set; } - public MetaHash Unk46 { get; set; } - public MetaHash Fork { get; set; }// forklift forks - public MetaHash Turret { get; set; } //moving turrets - public int Unk49 { get; set; } - public MetaHash Scoop { get; set; }// digger scoops - public MetaHash TowArm { get; set; }// towtruck arms - public int Unk52 { get; set; } - public MetaHash ElectricEngine { get; set; }//_electric_engine - public float Unk54 { get; set; } + public byte GPSVoice { get; set; } + public byte AmbientRadioVol { get; set; } + public byte RadioLeakage { get; set; } + public byte padding00 { get; set; } + public MetaHash ParkingTone { get; set; } + public MetaHash RoofStuckSound { get; set; } + public MetaHash FreewayPassbyTyreBumpFront { get; set; } + public MetaHash FreewayPassbyTyreBumpBack { get; set; } + public MetaHash FireAudio { get; set; } + public MetaHash StartupRevs { get; set; } + public MetaHash WindNoise { get; set; } + public MetaHash FreewayPassbyTyreBumpFrontSide { get; set; } + public MetaHash FreewayPassbyTyreBumpBackSide { get; set; } + public float MaxRollOffScalePlayer { get; set; } + public float MaxRollOffScaleNPC { get; set; } + public MetaHash ConvertibleRoofSoundSet { get; set; } + public int OffRoadRumbleSoundVolume { get; set; } + public MetaHash SirenSounds { get; set; } + public MetaHash AlternativeGranularEngines { get; set; } + public float AlternativeGranularEngineProbability { get; set; } + public uint StopStartProb { get; set; } + public MetaHash NPCRoadNoise { get; set; } + public MetaHash NPCRoadNoiseHighway { get; set; } + public MetaHash ForkliftSounds { get; set; } + public MetaHash TurretSounds { get; set; } + public int ClatterType { get; set; } + public MetaHash DiggerSounds { get; set; } + public MetaHash TowTruckSounds { get; set; } + public int EngineType { get; set; } + public MetaHash ElectricEngine { get; set; } + public float Openness { get; set; } public MetaHash ReverseWarning { get; set; } - public int EngineHealth { get; set; } - public MetaHash Cloth { get; set; }// flag/cloth/tarp sounds for cloth drawables - public MetaHash ShutdownBeep { get; set; } - public float Unk59 { get; set; } - public int Unk60 { get; set; } - public float Unk61 { get; set; } - public int Unk62 { get; set; } - public MetaHash Unk63 { get; set; } - public int Unk64 { get; set; } - public ushort Unk65 { get; set; } - public ushort Unk66 { get; set; } - public MetaHash ConvertibleRoof { get; set; } - public MetaHash Unk68 { get; set; } - public MetaHash InteriorTones { get; set; } - public int Unk70 { get; set; } - public MetaHash Unk71 { get; set; } - public MetaHash Unk72 { get; set; } + public int RandomDamage { get; set; } + public MetaHash WindClothSound { get; set; } + public MetaHash CarSpecificShutdownSound { get; set; } + public float ClatterSensitivityScalar { get; set; } + public int ClatterVolumeBoost { get; set; } + public float ChassisStressSensitivityScalar { get; set; } + public int ChassisStressVolumeBoost { get; set; } + public MetaHash VehicleRainSound { get; set; } + public ushort AdditionalRevsIncreaseSmoothing { get; set; } + public ushort AdditionalRevsDecreaseSmoothing { get; set; } + public ushort AdditionalGearChangeSmoothing { get; set; } + public ushort AdditionalGearChangeSmoothingTime { get; set; } + public MetaHash ConvertibleRoofInteriorSoundSet { get; set; } + public MetaHash VehicleRainSoundInterior { get; set; } + public MetaHash CabinToneLoop { get; set; } + public float InteriorViewEngineOpenness { get; set; } + public MetaHash JumpLandSoundInterior { get; set; } + public MetaHash DamagedJumpLandSoundInterior { get; set; } - public Dat151Vehicle(RelFile rel) : base(rel) + public Dat151CarAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Vehicle; + Type = Dat151RelType.CarAudioSettings; TypeID = (byte)Type; } - public Dat151Vehicle(RelData d, BinaryReader br) : base(d, br) + public Dat151CarAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Flags = br.ReadUInt32(); //2432719400 0x91005A28 + Flags = br.ReadUInt32(); Engine = br.ReadUInt32(); - EngineGranular = br.ReadUInt32(); - Horns = br.ReadUInt32(); - DoorOpen = br.ReadUInt32(); - DoorClose = br.ReadUInt32(); - TrunkOpen = br.ReadUInt32(); - TrunkClose = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - Unk09 = br.ReadSingle(); + GranularEngine = br.ReadUInt32(); + HornSounds = br.ReadUInt32(); + DoorOpenSound = br.ReadUInt32(); + DoorCloseSound = br.ReadUInt32(); + BootOpenSound = br.ReadUInt32(); + BootCloseSound = br.ReadUInt32(); + RollSound = br.ReadUInt32(); + BrakeSqueekFactor = br.ReadSingle(); SuspensionUp = br.ReadUInt32(); SuspensionDown = br.ReadUInt32(); - SuspensionUpFrequency = br.ReadSingle(); - SuspensionDownFrequency = br.ReadSingle(); - Collision = br.ReadUInt32(); - Unk15 = br.ReadInt32(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadInt32(); - PoliceScannerParams = br.ReadUInt32(); - JumpLandIntact = br.ReadUInt32(); - JumpLandLoose = br.ReadUInt32(); - Unk21 = br.ReadInt32(); - Unk22 = br.ReadInt32(); - RadioFlags = br.ReadUInt32(); + MinSuspCompThresh = br.ReadSingle(); + MaxSuspCompThresh = br.ReadSingle(); + VehicleCollisions = br.ReadUInt32(); + CarMake = br.ReadUInt32(); + CarModel = br.ReadUInt32(); + CarCategory = br.ReadUInt32(); + ScannerVehicleSettings = br.ReadUInt32(); + JumpLandSound = br.ReadUInt32(); + DamagedJumpLandSound = br.ReadUInt32(); + JumpLandMinThresh = br.ReadUInt32(); + JumpLandMaxThresh = br.ReadUInt32(); + VolumeCategory = br.ReadByte(); + GPSType = br.ReadByte(); + RadioType = br.ReadByte(); + RadioGenre = br.ReadByte(); IndicatorOn = br.ReadUInt32(); IndicatorOff = br.ReadUInt32(); Handbrake = br.ReadUInt32(); - Unk27 = br.ReadUInt16(); - Unk28 = br.ReadUInt16(); - ParkingTones = br.ReadUInt32(); - Unk29 = br.ReadUInt32(); - Unk30 = br.ReadUInt32(); - Unk31 = br.ReadUInt32(); - Fire = br.ReadUInt32(); - StartupSequence = br.ReadUInt32(); - Unk34 = br.ReadUInt32(); - Unk35 = br.ReadUInt32(); - Unk36 = br.ReadUInt32(); - Unk37 = br.ReadSingle(); - Unk38 = br.ReadSingle(); - Unk39 = br.ReadUInt32(); - Unk40 = br.ReadInt32(); - Sirens = br.ReadUInt32(); - Unk42 = br.ReadInt32(); - Unk43 = br.ReadInt32(); - Unk44 = br.ReadInt32(); - Unk45 = br.ReadUInt32(); - Unk46 = br.ReadUInt32(); - Fork = br.ReadUInt32(); - Turret = br.ReadUInt32(); - Unk49 = br.ReadInt32(); - Scoop = br.ReadUInt32(); - TowArm = br.ReadUInt32(); - Unk52 = br.ReadInt32(); + GPSVoice = br.ReadByte(); + AmbientRadioVol = br.ReadByte(); + RadioLeakage = br.ReadByte(); + padding00 = br.ReadByte(); + ParkingTone = br.ReadUInt32(); + RoofStuckSound = br.ReadUInt32(); + FreewayPassbyTyreBumpFront = br.ReadUInt32(); + FreewayPassbyTyreBumpBack = br.ReadUInt32(); + FireAudio = br.ReadUInt32(); + StartupRevs = br.ReadUInt32(); + WindNoise = br.ReadUInt32(); + FreewayPassbyTyreBumpFrontSide = br.ReadUInt32(); + FreewayPassbyTyreBumpBackSide = br.ReadUInt32(); + MaxRollOffScalePlayer = br.ReadSingle(); + MaxRollOffScaleNPC = br.ReadSingle(); + ConvertibleRoofSoundSet = br.ReadUInt32(); + OffRoadRumbleSoundVolume = br.ReadInt32(); + SirenSounds = br.ReadUInt32(); + AlternativeGranularEngines = br.ReadUInt32(); + AlternativeGranularEngineProbability = br.ReadSingle(); + StopStartProb = br.ReadUInt32(); + NPCRoadNoise = br.ReadUInt32(); + NPCRoadNoiseHighway = br.ReadUInt32(); + ForkliftSounds = br.ReadUInt32(); + TurretSounds = br.ReadUInt32(); + ClatterType = br.ReadInt32(); + DiggerSounds = br.ReadUInt32(); + TowTruckSounds = br.ReadUInt32(); + EngineType = br.ReadInt32(); ElectricEngine = br.ReadUInt32(); - Unk54 = br.ReadSingle(); + Openness = br.ReadSingle(); ReverseWarning = br.ReadUInt32(); - EngineHealth = br.ReadInt32(); - Cloth = br.ReadUInt32(); - ShutdownBeep = br.ReadUInt32(); - Unk59 = br.ReadSingle(); - Unk60 = br.ReadInt32(); - Unk61 = br.ReadSingle(); - Unk62 = br.ReadInt32(); + RandomDamage = br.ReadInt32(); + WindClothSound = br.ReadUInt32(); + CarSpecificShutdownSound = br.ReadUInt32(); + ClatterSensitivityScalar = br.ReadSingle(); + ClatterVolumeBoost = br.ReadInt32(); + ChassisStressSensitivityScalar = br.ReadSingle(); + ChassisStressVolumeBoost = br.ReadInt32(); var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - switch (bytesleft) //any other way to tell..? + switch (bytesleft) // Check for additional left over bytes { - case 0: + case 0: // if 0 additional bytes, end break; - case 4: - Unk63 = br.ReadUInt32();//flags?? 0xE38FCF16 - if (Unk63 == 0) - { } + case 4: // if 4 additional bytes, read value + VehicleRainSound = br.ReadUInt32(); break; - case 36: - Unk63 = br.ReadUInt32();//flags?? 0xE38FCF16 - Unk64 = br.ReadInt32(); - Unk65 = br.ReadUInt16(); - Unk66 = br.ReadUInt16(); - ConvertibleRoof = br.ReadUInt32();//flags? 0x536F6CAC - Unk68 = br.ReadUInt32();//flags?? 0xE38FCF16 - InteriorTones = br.ReadUInt32();//flags? 0x7C9B8D8C - Unk70 = br.ReadInt32(); - Unk71 = br.ReadUInt32();//flags?? 0xE38FCF16 - Unk72 = br.ReadUInt32();//flags?? 0xE38FCF16 - if (Unk70 != 0) - { } - if (Unk68 == 0) - { } - if (Unk71 == 0) - { } - if (Unk72 == 0) - { } - + case 36: // if 36 additional bytes, read remaining values + VehicleRainSound = br.ReadUInt32(); + AdditionalRevsIncreaseSmoothing = br.ReadUInt16(); + AdditionalGearChangeSmoothing = br.ReadUInt16(); + AdditionalGearChangeSmoothingTime = br.ReadUInt16(); + ConvertibleRoofInteriorSoundSet = br.ReadUInt32(); + VehicleRainSoundInterior = br.ReadUInt32(); + CabinToneLoop = br.ReadUInt32(); + InteriorViewEngineOpenness = br.ReadInt32(); + JumpLandSoundInterior = br.ReadUInt32(); + DamagedJumpLandSoundInterior = br.ReadUInt32(); break; default: break; } - if (bytesleft != 0) - { } - - - - if (Unk15 != 0) - { } - if (Unk16 != 0) - { } - if (Unk17 != 0) - { } - if (Unk40 != 0) - { } - if (Unk42 != 0) - { } - if (Unk43 != 0) - { } - if (Unk44 != 0) - { } - - switch (Unk21) - { - case 31: - case 0: - break; - default: - break; - } - switch (Unk22) - { - case 36: - case 100: - case 1: - break; - default: - break; - } - switch (Unk49) - { - case 8: - case 5: - case 3: - case 1: - case 4: - case 0: - case 6: - case 7: - break; - default: - break; - } - switch (EngineHealth) - { - case 2: - case 3: - case 0: - case 1: - break; - default: - break; - } - } public override void Write(BinaryWriter bw) { - //base.Write(bw); - //return; - WriteTypeAndOffset(bw); - bw.Write(Flags); //2432719400 0x91005A28 + bw.Write(Flags); bw.Write(Engine); - bw.Write(EngineGranular); - bw.Write(Horns); - bw.Write(DoorOpen); - bw.Write(DoorClose); - bw.Write(TrunkOpen); - bw.Write(TrunkClose); - bw.Write(Unk08); - bw.Write(Unk09); + bw.Write(GranularEngine); + bw.Write(HornSounds); + bw.Write(DoorOpenSound); + bw.Write(DoorCloseSound); + bw.Write(BootOpenSound); + bw.Write(BootCloseSound); + bw.Write(RollSound); + bw.Write(BrakeSqueekFactor); bw.Write(SuspensionUp); bw.Write(SuspensionDown); - bw.Write(SuspensionUpFrequency); - bw.Write(SuspensionDownFrequency); - bw.Write(Collision); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(PoliceScannerParams); - bw.Write(JumpLandIntact); - bw.Write(JumpLandLoose); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(RadioFlags); + bw.Write(MinSuspCompThresh); + bw.Write(MaxSuspCompThresh); + bw.Write(VehicleCollisions); + bw.Write(CarMake); + bw.Write(CarModel); + bw.Write(CarCategory); + bw.Write(ScannerVehicleSettings); + bw.Write(JumpLandSound); + bw.Write(DamagedJumpLandSound); + bw.Write(JumpLandMinThresh); + bw.Write(JumpLandMaxThresh); + bw.Write(VolumeCategory); + bw.Write(GPSType); + bw.Write(RadioType); + bw.Write(RadioGenre); bw.Write(IndicatorOn); bw.Write(IndicatorOff); bw.Write(Handbrake); - bw.Write(Unk27); - bw.Write(Unk28); - bw.Write(ParkingTones); - bw.Write(Unk29); - bw.Write(Unk30); - bw.Write(Unk31); - bw.Write(Fire); - bw.Write(StartupSequence); - bw.Write(Unk34);//flags?? 0xE38FCF16 - bw.Write(Unk35); - bw.Write(Unk36); - bw.Write(Unk37); - bw.Write(Unk38); - bw.Write(Unk39); - bw.Write(Unk40); - bw.Write(Sirens); - bw.Write(Unk42); - bw.Write(Unk43); - bw.Write(Unk44); - bw.Write(Unk45); - bw.Write(Unk46); - bw.Write(Fork); - bw.Write(Turret); - bw.Write(Unk49); - bw.Write(Scoop);//flags? 0x65A95A8B, 0x85439DAD - bw.Write(TowArm);//flags? 0x6213618E, 0x990D0483 - bw.Write(Unk52); - bw.Write(ElectricEngine);//flags? 0x04D73241, 0x7F471776 - bw.Write(Unk54); + bw.Write(GPSVoice); + bw.Write(AmbientRadioVol); + bw.Write(RadioLeakage); + bw.Write(padding00); + bw.Write(ParkingTone); + bw.Write(RoofStuckSound); + bw.Write(FreewayPassbyTyreBumpFront); + bw.Write(FreewayPassbyTyreBumpBack); + bw.Write(FireAudio); + bw.Write(StartupRevs); + bw.Write(WindNoise); + bw.Write(FreewayPassbyTyreBumpFrontSide); + bw.Write(FreewayPassbyTyreBumpBackSide); + bw.Write(MaxRollOffScalePlayer); + bw.Write(MaxRollOffScaleNPC); + bw.Write(ConvertibleRoofSoundSet); + bw.Write(OffRoadRumbleSoundVolume); + bw.Write(SirenSounds); + bw.Write(AlternativeGranularEngines); + bw.Write(AlternativeGranularEngineProbability); + bw.Write(StopStartProb); + bw.Write(NPCRoadNoise); + bw.Write(NPCRoadNoiseHighway); + bw.Write(ForkliftSounds); + bw.Write(TurretSounds); + bw.Write(ClatterType); + bw.Write(DiggerSounds); + bw.Write(TowTruckSounds); + bw.Write(EngineType); + bw.Write(ElectricEngine); + bw.Write(Openness); bw.Write(ReverseWarning); - bw.Write(EngineHealth); - bw.Write(Cloth); - bw.Write(ShutdownBeep); - bw.Write(Unk59); - bw.Write(Unk60); - bw.Write(Unk61); - bw.Write(Unk62); + bw.Write(RandomDamage); + bw.Write(WindClothSound); + bw.Write(CarSpecificShutdownSound); + bw.Write(ClatterSensitivityScalar); + bw.Write(ClatterVolumeBoost); + bw.Write(ChassisStressSensitivityScalar); + bw.Write(ChassisStressVolumeBoost); - if (Unk63 != 0)//any better way? + if (VehicleRainSound != 0) // if RainSound is not 0, Write value, then check for additional values { - bw.Write(Unk63); + bw.Write(VehicleRainSound); - if ((Unk68 != 0)||(Unk71 != 0) ||(Unk72 != 0))//any better way? + if ((VehicleRainSoundInterior != 0) || (JumpLandSoundInterior != 0) || (DamagedJumpLandSoundInterior != 0)) { - bw.Write(Unk64); - bw.Write(Unk65); - bw.Write(Unk66); - bw.Write(ConvertibleRoof);//flags? 0x536F6CAC - bw.Write(Unk68);//flags?? 0xE38FCF16 - bw.Write(InteriorTones);//flags? 0x7C9B8D8C - bw.Write(Unk70); - bw.Write(Unk71);//flags?? 0xE38FCF16 - bw.Write(Unk72);//flags?? 0xE38FCF16 + bw.Write(AdditionalRevsIncreaseSmoothing); + bw.Write(AdditionalGearChangeSmoothing); + bw.Write(AdditionalGearChangeSmoothingTime); + bw.Write(ConvertibleRoofInteriorSoundSet); + bw.Write(VehicleRainSoundInterior); + bw.Write(CabinToneLoop); + bw.Write(InteriorViewEngineOpenness); + bw.Write(JumpLandSoundInterior); + bw.Write(DamagedJumpLandSoundInterior); } } @@ -11229,504 +10738,503 @@ namespace CodeWalker.GameFiles { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); RelXml.StringTag(sb, indent, "Engine", RelXml.HashString(Engine)); - RelXml.StringTag(sb, indent, "EngineGranular", RelXml.HashString(EngineGranular)); - RelXml.StringTag(sb, indent, "Horns", RelXml.HashString(Horns)); - RelXml.StringTag(sb, indent, "DoorOpen", RelXml.HashString(DoorOpen)); - RelXml.StringTag(sb, indent, "DoorClose", RelXml.HashString(DoorClose)); - RelXml.StringTag(sb, indent, "TrunkOpen", RelXml.HashString(TrunkOpen)); - RelXml.StringTag(sb, indent, "TrunkClose", RelXml.HashString(TrunkClose)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); + RelXml.StringTag(sb, indent, "GranularEngine", RelXml.HashString(GranularEngine)); + RelXml.StringTag(sb, indent, "HornSounds", RelXml.HashString(HornSounds)); + RelXml.StringTag(sb, indent, "DoorOpenSound", RelXml.HashString(DoorOpenSound)); + RelXml.StringTag(sb, indent, "DoorCloseSound", RelXml.HashString(DoorCloseSound)); + RelXml.StringTag(sb, indent, "BootOpenSound", RelXml.HashString(BootOpenSound)); + RelXml.StringTag(sb, indent, "BootCloseSound", RelXml.HashString(BootCloseSound)); + RelXml.StringTag(sb, indent, "RollSound", RelXml.HashString(RollSound)); + RelXml.ValueTag(sb, indent, "BrakeSqueekFactor", FloatUtil.ToString(BrakeSqueekFactor)); RelXml.StringTag(sb, indent, "SuspensionUp", RelXml.HashString(SuspensionUp)); RelXml.StringTag(sb, indent, "SuspensionDown", RelXml.HashString(SuspensionDown)); - RelXml.ValueTag(sb, indent, "SuspensionUpFrequency", FloatUtil.ToString(SuspensionUpFrequency)); - RelXml.ValueTag(sb, indent, "SuspensionDownFrequency", FloatUtil.ToString(SuspensionDownFrequency)); - RelXml.StringTag(sb, indent, "Collision", RelXml.HashString(Collision)); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.StringTag(sb, indent, "PoliceScannerParams", RelXml.HashString(PoliceScannerParams)); - RelXml.StringTag(sb, indent, "JumpLandIntact", RelXml.HashString(JumpLandIntact)); - RelXml.StringTag(sb, indent, "JumpLandLoose", RelXml.HashString(JumpLandLoose)); - RelXml.ValueTag(sb, indent, "Unk21", Unk21.ToString()); - RelXml.ValueTag(sb, indent, "Unk22", Unk22.ToString()); - RelXml.ValueTag(sb, indent, "RadioFlags", "0x" + RadioFlags.Hex); + RelXml.ValueTag(sb, indent, "MinSuspCompThresh", FloatUtil.ToString(MinSuspCompThresh)); + RelXml.ValueTag(sb, indent, "MaxSuspCompThresh", FloatUtil.ToString(MaxSuspCompThresh)); + RelXml.StringTag(sb, indent, "VehicleCollisions", RelXml.HashString(VehicleCollisions)); + RelXml.ValueTag(sb, indent, "CarMake", CarMake.ToString()); + RelXml.ValueTag(sb, indent, "CarModel", CarModel.ToString()); + RelXml.ValueTag(sb, indent, "CarCategory", CarCategory.ToString()); + RelXml.StringTag(sb, indent, "ScannerVehicleSettings", RelXml.HashString(ScannerVehicleSettings)); + RelXml.StringTag(sb, indent, "JumpLandSound", RelXml.HashString(JumpLandSound)); + RelXml.StringTag(sb, indent, "DamagedJumpLandSound", RelXml.HashString(DamagedJumpLandSound)); + RelXml.ValueTag(sb, indent, "JumpLandMinThresh", JumpLandMinThresh.ToString()); + RelXml.ValueTag(sb, indent, "JumpLandMaxThresh", JumpLandMaxThresh.ToString()); + RelXml.ValueTag(sb, indent, "VolumeCategory", VolumeCategory.ToString()); + RelXml.ValueTag(sb, indent, "GPSType", GPSType.ToString()); + RelXml.ValueTag(sb, indent, "RadioType", RadioType.ToString()); + RelXml.ValueTag(sb, indent, "RadioGenre", RadioGenre.ToString()); RelXml.StringTag(sb, indent, "IndicatorOn", RelXml.HashString(IndicatorOn)); RelXml.StringTag(sb, indent, "IndicatorOff", RelXml.HashString(IndicatorOff)); RelXml.StringTag(sb, indent, "Handbrake", RelXml.HashString(Handbrake)); - RelXml.ValueTag(sb, indent, "Unk27", Unk27.ToString()); - RelXml.ValueTag(sb, indent, "Unk28", Unk28.ToString()); - RelXml.StringTag(sb, indent, "ParkingTones", RelXml.HashString(ParkingTones)); - RelXml.StringTag(sb, indent, "Unk29", RelXml.HashString(Unk29)); - RelXml.StringTag(sb, indent, "Unk30", RelXml.HashString(Unk30)); - RelXml.StringTag(sb, indent, "Unk31", RelXml.HashString(Unk31)); - RelXml.StringTag(sb, indent, "Fire", RelXml.HashString(Fire)); - RelXml.StringTag(sb, indent, "StartupSequence", RelXml.HashString(StartupSequence)); - RelXml.StringTag(sb, indent, "Unk34", RelXml.HashString(Unk34)); - RelXml.StringTag(sb, indent, "Unk35", RelXml.HashString(Unk35)); - RelXml.StringTag(sb, indent, "Unk36", RelXml.HashString(Unk36)); - RelXml.ValueTag(sb, indent, "Unk37", FloatUtil.ToString(Unk37)); - RelXml.ValueTag(sb, indent, "Unk38", FloatUtil.ToString(Unk38)); - RelXml.StringTag(sb, indent, "Unk39", RelXml.HashString(Unk39)); - RelXml.ValueTag(sb, indent, "Unk40", Unk40.ToString()); - RelXml.StringTag(sb, indent, "Sirens", RelXml.HashString(Sirens)); - RelXml.ValueTag(sb, indent, "Unk42", Unk42.ToString()); - RelXml.ValueTag(sb, indent, "Unk43", Unk43.ToString()); - RelXml.ValueTag(sb, indent, "Unk44", Unk44.ToString()); - RelXml.StringTag(sb, indent, "Unk45", RelXml.HashString(Unk45)); - RelXml.StringTag(sb, indent, "Unk46", RelXml.HashString(Unk46)); - RelXml.StringTag(sb, indent, "Fork", RelXml.HashString(Fork)); - RelXml.StringTag(sb, indent, "Turret", RelXml.HashString(Turret)); - RelXml.ValueTag(sb, indent, "Unk49", Unk49.ToString()); - RelXml.StringTag(sb, indent, "Scoop", RelXml.HashString(Scoop)); - RelXml.StringTag(sb, indent, "TowArm", RelXml.HashString(TowArm)); - RelXml.ValueTag(sb, indent, "Unk52", Unk52.ToString()); + RelXml.ValueTag(sb, indent, "GPSVoice", GPSVoice.ToString()); + RelXml.ValueTag(sb, indent, "AmbientRadioVol", AmbientRadioVol.ToString()); + RelXml.ValueTag(sb, indent, "RadioLeakage", RadioLeakage.ToString()); + RelXml.StringTag(sb, indent, "ParkingTone", RelXml.HashString(ParkingTone)); + RelXml.StringTag(sb, indent, "RoofStuckSound", RelXml.HashString(RoofStuckSound)); + RelXml.StringTag(sb, indent, "FreewayPassbyTyreBumpFront", RelXml.HashString(FreewayPassbyTyreBumpFront)); + RelXml.StringTag(sb, indent, "FreewayPassbyTyreBumpBack", RelXml.HashString(FreewayPassbyTyreBumpBack)); + RelXml.StringTag(sb, indent, "FireAudio", RelXml.HashString(FireAudio)); + RelXml.StringTag(sb, indent, "StartupRevs", RelXml.HashString(StartupRevs)); + RelXml.StringTag(sb, indent, "WindNoise", RelXml.HashString(WindNoise)); + RelXml.StringTag(sb, indent, "FreewayPassbyTyreBumpFrontSide", RelXml.HashString(FreewayPassbyTyreBumpFrontSide)); + RelXml.StringTag(sb, indent, "FreewayPassbyTyreBumpBackSide", RelXml.HashString(FreewayPassbyTyreBumpBackSide)); + RelXml.ValueTag(sb, indent, "MaxRollOffScalePlayer", FloatUtil.ToString(MaxRollOffScalePlayer)); + RelXml.ValueTag(sb, indent, "MaxRollOffScaleNPC", FloatUtil.ToString(MaxRollOffScaleNPC)); + RelXml.StringTag(sb, indent, "ConvertibleRoofSoundSet", RelXml.HashString(ConvertibleRoofSoundSet)); + RelXml.ValueTag(sb, indent, "OffRoadRumbleSoundVolume", OffRoadRumbleSoundVolume.ToString()); + RelXml.StringTag(sb, indent, "SirenSounds", RelXml.HashString(SirenSounds)); + RelXml.StringTag(sb, indent, "AlternativeGranularEngines", RelXml.HashString(AlternativeGranularEngines)); + RelXml.ValueTag(sb, indent, "AlternativeGranularEngineProbability", FloatUtil.ToString(AlternativeGranularEngineProbability)); + RelXml.ValueTag(sb, indent, "StopStartProb", StopStartProb.ToString()); + RelXml.StringTag(sb, indent, "NPCRoadNoise", RelXml.HashString(NPCRoadNoise)); + RelXml.StringTag(sb, indent, "NPCRoadNoiseHighway", RelXml.HashString(NPCRoadNoiseHighway)); + RelXml.StringTag(sb, indent, "ForkliftSounds", RelXml.HashString(ForkliftSounds)); + RelXml.StringTag(sb, indent, "TurretSounds", RelXml.HashString(TurretSounds)); + RelXml.ValueTag(sb, indent, "ClatterType", ClatterType.ToString()); + RelXml.StringTag(sb, indent, "DiggerSounds", RelXml.HashString(DiggerSounds)); + RelXml.StringTag(sb, indent, "TowTruckSounds", RelXml.HashString(TowTruckSounds)); + RelXml.ValueTag(sb, indent, "EngineType", EngineType.ToString()); RelXml.StringTag(sb, indent, "ElectricEngine", RelXml.HashString(ElectricEngine)); - RelXml.ValueTag(sb, indent, "Unk54", FloatUtil.ToString(Unk54)); + RelXml.ValueTag(sb, indent, "Openness", FloatUtil.ToString(Openness)); RelXml.StringTag(sb, indent, "ReverseWarning", RelXml.HashString(ReverseWarning)); - RelXml.ValueTag(sb, indent, "EngineHealth", EngineHealth.ToString()); - RelXml.StringTag(sb, indent, "Cloth", RelXml.HashString(Cloth)); - RelXml.StringTag(sb, indent, "ShutdownBeep", RelXml.HashString(ShutdownBeep)); - RelXml.ValueTag(sb, indent, "Unk59", FloatUtil.ToString(Unk59)); - RelXml.ValueTag(sb, indent, "Unk60", Unk60.ToString()); - RelXml.ValueTag(sb, indent, "Unk61", FloatUtil.ToString(Unk61)); - RelXml.ValueTag(sb, indent, "Unk62", Unk62.ToString()); - RelXml.StringTag(sb, indent, "Unk63", RelXml.HashString(Unk63)); - RelXml.ValueTag(sb, indent, "Unk64", Unk64.ToString()); - RelXml.ValueTag(sb, indent, "Unk65", Unk65.ToString()); - RelXml.ValueTag(sb, indent, "Unk66", Unk66.ToString()); - RelXml.StringTag(sb, indent, "ConvertibleRoof", RelXml.HashString(ConvertibleRoof)); - RelXml.StringTag(sb, indent, "Unk68", RelXml.HashString(Unk68)); - RelXml.StringTag(sb, indent, "InteriorTones", RelXml.HashString(InteriorTones)); - RelXml.ValueTag(sb, indent, "Unk70", Unk70.ToString()); - RelXml.StringTag(sb, indent, "Unk71", RelXml.HashString(Unk71)); - RelXml.StringTag(sb, indent, "Unk72", RelXml.HashString(Unk72)); + RelXml.ValueTag(sb, indent, "RandomDamage", RandomDamage.ToString()); + RelXml.StringTag(sb, indent, "WindClothSound", RelXml.HashString(WindClothSound)); + RelXml.StringTag(sb, indent, "CarSpecificShutdownSound", RelXml.HashString(CarSpecificShutdownSound)); + RelXml.ValueTag(sb, indent, "ClatterSensitivityScalar", FloatUtil.ToString(ClatterSensitivityScalar)); + RelXml.ValueTag(sb, indent, "ClatterVolumeBoost", ClatterVolumeBoost.ToString()); + RelXml.ValueTag(sb, indent, "ChassisStressSensitivityScalar", FloatUtil.ToString(ChassisStressSensitivityScalar)); + RelXml.ValueTag(sb, indent, "ChassisStressVolumeBoost", ChassisStressVolumeBoost.ToString()); + RelXml.StringTag(sb, indent, "VehicleRainSound", RelXml.HashString(VehicleRainSound)); + RelXml.ValueTag(sb, indent, "AdditionalRevsIncreaseSmoothing", AdditionalRevsIncreaseSmoothing.ToString()); + RelXml.ValueTag(sb, indent, "AdditionalRevsDecreaseSmoothing", AdditionalRevsDecreaseSmoothing.ToString()); + RelXml.ValueTag(sb, indent, "AdditionalGearChangeSmoothing", AdditionalGearChangeSmoothing.ToString()); + RelXml.ValueTag(sb, indent, "AdditionalGearChangeSmoothingTime", AdditionalGearChangeSmoothingTime.ToString()); + RelXml.StringTag(sb, indent, "ConvertibleRoofInteriorSoundSet", RelXml.HashString(ConvertibleRoofInteriorSoundSet)); + RelXml.StringTag(sb, indent, "VehicleRainSoundInterior", RelXml.HashString(VehicleRainSoundInterior)); + RelXml.StringTag(sb, indent, "CabinToneLoop", RelXml.HashString(CabinToneLoop)); + RelXml.ValueTag(sb, indent, "InteriorViewEngineOpenness", InteriorViewEngineOpenness.ToString()); + RelXml.StringTag(sb, indent, "JumpLandSoundInterior", RelXml.HashString(JumpLandSoundInterior)); + RelXml.StringTag(sb, indent, "DamagedJumpLandSoundInterior", RelXml.HashString(DamagedJumpLandSoundInterior)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Engine = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine")); - EngineGranular = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineGranular")); - Horns = XmlRel.GetHash(Xml.GetChildInnerText(node, "Horns")); - DoorOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorOpen")); - DoorClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorClose")); - TrunkOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrunkOpen")); - TrunkClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrunkClose")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); + GranularEngine = XmlRel.GetHash(Xml.GetChildInnerText(node, "GranularEngine")); + HornSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "HornSounds")); + DoorOpenSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorOpenSound")); + DoorCloseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorCloseSound")); + BootOpenSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BootOpenSound")); + BootCloseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BootCloseSound")); + RollSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RollSound")); + BrakeSqueekFactor = Xml.GetChildFloatAttribute(node, "BrakeSqueekFactor", "value"); SuspensionUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionUp")); SuspensionDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionDown")); - SuspensionUpFrequency = Xml.GetChildFloatAttribute(node, "SuspensionUpFrequency", "value"); - SuspensionDownFrequency = Xml.GetChildFloatAttribute(node, "SuspensionDownFrequency", "value"); - Collision = XmlRel.GetHash(Xml.GetChildInnerText(node, "Collision")); - Unk15 = Xml.GetChildIntAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildIntAttribute(node, "Unk17", "value"); - PoliceScannerParams = XmlRel.GetHash(Xml.GetChildInnerText(node, "PoliceScannerParams")); - JumpLandIntact = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandIntact")); - JumpLandLoose = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandLoose")); - Unk21 = Xml.GetChildIntAttribute(node, "Unk21", "value"); - Unk22 = Xml.GetChildIntAttribute(node, "Unk22", "value"); - RadioFlags = Xml.GetChildUIntAttribute(node, "RadioFlags", "value"); + MinSuspCompThresh = Xml.GetChildFloatAttribute(node, "MinSuspCompThresh", "value"); + MaxSuspCompThresh = Xml.GetChildFloatAttribute(node, "MaxSuspCompThresh", "value"); + VehicleCollisions = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCollisions")); + CarMake = Xml.GetChildUIntAttribute(node, "CarMake", "value"); + CarModel = Xml.GetChildUIntAttribute(node, "CarModel", "value"); + CarCategory = Xml.GetChildUIntAttribute(node, "CarCategory", "value"); + ScannerVehicleSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerVehicleSettings")); + JumpLandSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandSound")); + DamagedJumpLandSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamagedJumpLandSound")); + JumpLandMinThresh = Xml.GetChildUIntAttribute(node, "JumpLandMinThresh", "value"); + JumpLandMaxThresh = Xml.GetChildUIntAttribute(node, "JumpLandMaxThresh", "value"); + VolumeCategory = (byte)Xml.GetChildUIntAttribute(node, "VolumeCategory", "value"); + GPSType = (byte)Xml.GetChildUIntAttribute(node, "GPSType", "value"); + RadioType = (byte)Xml.GetChildUIntAttribute(node, "RadioType", "value"); + RadioGenre = (byte)Xml.GetChildUIntAttribute(node, "RadioGenre", "value"); IndicatorOn = XmlRel.GetHash(Xml.GetChildInnerText(node, "IndicatorOn")); IndicatorOff = XmlRel.GetHash(Xml.GetChildInnerText(node, "IndicatorOff")); Handbrake = XmlRel.GetHash(Xml.GetChildInnerText(node, "Handbrake")); - Unk27 = (ushort)Xml.GetChildUIntAttribute(node, "Unk27", "value"); - Unk28 = (ushort)Xml.GetChildUIntAttribute(node, "Unk28", "value"); - ParkingTones = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParkingTones")); - Unk29 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk29")); - Unk30 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk30")); - Unk31 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk31")); - Fire = XmlRel.GetHash(Xml.GetChildInnerText(node, "Fire")); - StartupSequence = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartupSequence")); - Unk34 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk34")); - Unk35 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk35")); - Unk36 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk36")); - Unk37 = Xml.GetChildFloatAttribute(node, "Unk37", "value"); - Unk38 = Xml.GetChildFloatAttribute(node, "Unk38", "value"); - Unk39 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk39")); - Unk40 = Xml.GetChildIntAttribute(node, "Unk40", "value"); - Sirens = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sirens")); - Unk42 = Xml.GetChildIntAttribute(node, "Unk42", "value"); - Unk43 = Xml.GetChildIntAttribute(node, "Unk43", "value"); - Unk44 = Xml.GetChildIntAttribute(node, "Unk44", "value"); - Unk45 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk45")); - Unk46 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk46")); - Fork = XmlRel.GetHash(Xml.GetChildInnerText(node, "Fork")); - Turret = XmlRel.GetHash(Xml.GetChildInnerText(node, "Turret")); - Unk49 = Xml.GetChildIntAttribute(node, "Unk49", "value"); - Scoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scoop")); - TowArm = XmlRel.GetHash(Xml.GetChildInnerText(node, "TowArm")); - Unk52 = Xml.GetChildIntAttribute(node, "Unk52", "value"); + GPSVoice = (byte)Xml.GetChildUIntAttribute(node, "AmbientRadioVol", "value"); + AmbientRadioVol = (byte)Xml.GetChildUIntAttribute(node, "GPSVoice", "value"); + RadioLeakage = (byte)Xml.GetChildUIntAttribute(node, "RadioLeakage", "value"); + ParkingTone = XmlRel.GetHash(Xml.GetChildInnerText(node, "ParkingTone")); + RoofStuckSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RoofStuckSound")); + FreewayPassbyTyreBumpFront = XmlRel.GetHash(Xml.GetChildInnerText(node, "FreewayPassbyTyreBumpFront")); + FreewayPassbyTyreBumpBack = XmlRel.GetHash(Xml.GetChildInnerText(node, "FreewayPassbyTyreBumpBack")); + FireAudio = XmlRel.GetHash(Xml.GetChildInnerText(node, "FireAudio")); + StartupRevs = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartupRevs")); + WindNoise = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindNoise")); + FreewayPassbyTyreBumpFrontSide = XmlRel.GetHash(Xml.GetChildInnerText(node, "FreewayPassbyTyreBumpFrontSide")); + FreewayPassbyTyreBumpBackSide = XmlRel.GetHash(Xml.GetChildInnerText(node, "FreewayPassbyTyreBumpBackSide")); + MaxRollOffScalePlayer = Xml.GetChildFloatAttribute(node, "MaxRollOffScalePlayer", "value"); + MaxRollOffScaleNPC = Xml.GetChildFloatAttribute(node, "MaxRollOffScaleNPC", "value"); + ConvertibleRoofSoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "ConvertibleRoofSoundSet")); + OffRoadRumbleSoundVolume = Xml.GetChildIntAttribute(node, "OffRoadRumbleSoundVolume", "value"); + SirenSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "SirenSounds")); + AlternativeGranularEngines = XmlRel.GetHash(Xml.GetChildInnerText(node, "AlternativeGranularEngines")); + AlternativeGranularEngineProbability = Xml.GetChildFloatAttribute(node, "AlternativeGranularEngineProbability", "value"); + StopStartProb = Xml.GetChildUIntAttribute(node, "StopStartProb", "value"); + NPCRoadNoise = XmlRel.GetHash(Xml.GetChildInnerText(node, "NPCRoadNoise")); + NPCRoadNoiseHighway = XmlRel.GetHash(Xml.GetChildInnerText(node, "NPCRoadNoiseHighway")); + ForkliftSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "ForkliftSounds")); + TurretSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurretSounds")); + ClatterType = Xml.GetChildIntAttribute(node, "ClatterType", "value"); + DiggerSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "DiggerSounds")); + TowTruckSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "TowTruckSounds")); + EngineType = Xml.GetChildIntAttribute(node, "EngineType", "value"); ElectricEngine = XmlRel.GetHash(Xml.GetChildInnerText(node, "ElectricEngine")); - Unk54 = Xml.GetChildFloatAttribute(node, "Unk54", "value"); + Openness = Xml.GetChildFloatAttribute(node, "Openness", "value"); ReverseWarning = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReverseWarning")); - EngineHealth = Xml.GetChildIntAttribute(node, "EngineHealth", "value"); - Cloth = XmlRel.GetHash(Xml.GetChildInnerText(node, "Cloth")); - ShutdownBeep = XmlRel.GetHash(Xml.GetChildInnerText(node, "ShutdownBeep")); - Unk59 = Xml.GetChildFloatAttribute(node, "Unk59", "value"); - Unk60 = Xml.GetChildIntAttribute(node, "Unk60", "value"); - Unk61 = Xml.GetChildFloatAttribute(node, "Unk61", "value"); - Unk62 = Xml.GetChildIntAttribute(node, "Unk62", "value"); - Unk63 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk63")); - Unk64 = Xml.GetChildIntAttribute(node, "Unk64", "value"); - Unk65 = (ushort)Xml.GetChildUIntAttribute(node, "Unk65", "value"); - Unk66 = (ushort)Xml.GetChildUIntAttribute(node, "Unk66", "value"); - ConvertibleRoof = XmlRel.GetHash(Xml.GetChildInnerText(node, "ConvertibleRoof")); - Unk68 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk68")); - InteriorTones = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorTones")); - Unk70 = Xml.GetChildIntAttribute(node, "Unk70", "value"); - Unk71 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk71")); - Unk72 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk72")); + RandomDamage = Xml.GetChildIntAttribute(node, "RandomDamage", "value"); + WindClothSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindClothSound")); + CarSpecificShutdownSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "CarSpecificShutdownSound")); + ClatterSensitivityScalar = Xml.GetChildFloatAttribute(node, "ClatterSensitivityScalar", "value"); + ClatterVolumeBoost = Xml.GetChildIntAttribute(node, "ClatterVolumeBoost", "value"); + ChassisStressSensitivityScalar = Xml.GetChildFloatAttribute(node, "ChassisStressSensitivityScalar", "value"); + ChassisStressVolumeBoost = Xml.GetChildIntAttribute(node, "ChassisStressVolumeBoost", "value"); + VehicleRainSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSound")); + AdditionalRevsIncreaseSmoothing = (ushort)Xml.GetChildUIntAttribute(node, "AdditionalRevsIncreaseSmoothing", "value"); + AdditionalRevsDecreaseSmoothing = (ushort)Xml.GetChildUIntAttribute(node, "AdditionalRevsDecreaseSmoothing", "value"); + AdditionalGearChangeSmoothing = (ushort)Xml.GetChildUIntAttribute(node, "AdditionalGearChangeSmoothing", "value"); + AdditionalGearChangeSmoothingTime = (ushort)Xml.GetChildUIntAttribute(node, "AdditionalGearChangeSmoothingTime", "value"); + ConvertibleRoofInteriorSoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "ConvertibleRoofInteriorSoundSet")); + VehicleRainSoundInterior = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSoundInterior")); + CabinToneLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "CabinToneLoop")); + InteriorViewEngineOpenness = Xml.GetChildIntAttribute(node, "InteriorViewEngineOpenness", "value"); + JumpLandSoundInterior = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandSoundInterior")); + DamagedJumpLandSoundInterior = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamagedJumpLandSoundInterior")); } public override MetaHash[] GetSoundHashes() { - return new[] { Horns, DoorOpen, DoorClose, TrunkOpen, TrunkClose, Unk08, SuspensionUp, SuspensionDown, JumpLandIntact, JumpLandLoose, - IndicatorOn, IndicatorOff, Handbrake, ParkingTones, Unk29, Unk30, Unk31, Fire, StartupSequence, Unk34, Unk35, Unk36, Unk39, - Sirens, Unk45, Unk46, Fork, Turret, Scoop, TowArm, ReverseWarning, Cloth, ShutdownBeep, - Unk63, ConvertibleRoof, Unk68, InteriorTones, Unk71, Unk72 }; + return new[] { HornSounds, DoorOpenSound, DoorCloseSound, BootOpenSound, BootCloseSound, RollSound, SuspensionUp, SuspensionDown, JumpLandSound, DamagedJumpLandSound, + IndicatorOn, IndicatorOff, Handbrake, ParkingTone, RoofStuckSound, FreewayPassbyTyreBumpFront, FreewayPassbyTyreBumpBack, FireAudio, StartupRevs, WindNoise, FreewayPassbyTyreBumpFrontSide, FreewayPassbyTyreBumpBackSide, ConvertibleRoofSoundSet, + SirenSounds, NPCRoadNoise, NPCRoadNoiseHighway, ForkliftSounds, TurretSounds, DiggerSounds, TowTruckSounds, ReverseWarning, WindClothSound, CarSpecificShutdownSound, + VehicleRainSound, ConvertibleRoofInteriorSoundSet, VehicleRainSoundInterior, CabinToneLoop, JumpLandSoundInterior, DamagedJumpLandSoundInterior, AlternativeGranularEngines }; } public override MetaHash[] GetGameHashes() { - return new[] { Engine, EngineGranular, Collision, PoliceScannerParams, ElectricEngine }; + return new[] { Engine, GranularEngine, VehicleCollisions, ScannerVehicleSettings, ElectricEngine }; } } - [TC(typeof(EXP))] public class Dat151VehicleEngine : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151VehicleEngineAudioSettings : Dat151RelData { public int MasterVolume { get; set; } - public int EngineLowVolume { get; set; } - public int EngineHighVolume { get; set; } - public int EngineNPCVolume { get; set; } - public MetaHash EngineLow { get; set; } - public MetaHash EngineHigh { get; set; } - public MetaHash ExhaustLow { get; set; } - public MetaHash ExhaustHigh { get; set; } - public MetaHash RevsOff { get; set; } - public int Unk09 { get; set; } - public int Unk10 { get; set; } - public MetaHash EngineIdleLoop { get; set; } - public MetaHash ExhaustIdleLoop { get; set; } - public int Unk13 { get; set; } - public int Unk14 { get; set; } - public MetaHash AirIntake { get; set; } - public int Unk16 { get; set; } - public int Unk17 { get; set; } - public MetaHash Turbo { get; set; } - public int EngineLowPitch { get; set; } - public int EngineHighPitch { get; set; } + public int MaxConeAttenuation { get; set; } + public int FXCompensation { get; set; } + public int NonPlayerFXComp { get; set; } + public MetaHash LowEngineLoop { get; set; } + public MetaHash HighEngineLoop { get; set; } + public MetaHash LowExhaustLoop { get; set; } + public MetaHash HighExhaustLoop { get; set; } + public MetaHash RevsOffLoop { get; set; } + public int MinPitch { get; set; } + public int MaxPitch { get; set; } + public MetaHash IdleEngineSimpleLoop { get; set; } + public MetaHash IdleExhaustSimpleLoop { get; set; } + public int IdleMinPitch { get; set; } + public int IdleMaxPitch { get; set; } + public MetaHash InductionLoop { get; set; } + public int InductionMinPitch { get; set; } + public int InductionMaxPitch { get; set; } + public MetaHash TurboWhine { get; set; } + public int TurboMinPitch { get; set; } + public int TurboMaxPitch { get; set; } public MetaHash DumpValve { get; set; } - public int Unk22 { get; set; } - public int Unk23 { get; set; } - public MetaHash Transmission { get; set; } - public int TransmissionPitchMin { get; set; } - public int TransmissionPitchMax { get; set; } - public int TransmissionVolume { get; set; } + public uint DumpValveProb { get; set; } + public uint TurboSpinupSpeed { get; set; } + public MetaHash GearTransLoop { get; set; } + public int GearTransMinPitch { get; set; } + public int GearTransMaxPitch { get; set; } + public int GTThrottleVol { get; set; } public MetaHash Ignition { get; set; } - public MetaHash ShutDown { get; set; } - public MetaHash EngineCoolingFan { get; set; } + public MetaHash EngineShutdown { get; set; } + public MetaHash CoolingFan { get; set; } public MetaHash ExhaustPops { get; set; } - public MetaHash DistantStart { get; set; } - public int Unk33 { get; set; } - public int GearStickVolume { get; set; } - public MetaHash StartupMaster { get; set; } - public MetaHash EngineSubmix { get; set; } - public MetaHash EngineSubmixPreset { get; set; } - public MetaHash ExhaustSubmix { get; set; } - public MetaHash ExhaustSubmixPreset { get; set; } - public MetaHash Unk40 { get; set; } - public MetaHash Unk41 { get; set; } - public int Unk42 { get; set; } - public MetaHash GearShiftInteriorUpgraded { get; set; } - public MetaHash GearShiftExteriorUpgraded { get; set; } - public int Unk45 { get; set; } - public int Unk46 { get; set; } - public int Unk47 { get; set; } - public int Unk48 { get; set; } - public int Unk49 { get; set; } - public int Unk50 { get; set; } - public MetaHash DumpValveUpgraded { get; set; } - public int DumpValveUpgradedVolume { get; set; } - public MetaHash TransmissionUpgraded { get; set; } - public MetaHash TurboUpgraded { get; set; } - public MetaHash AirIntakeUpgraded { get; set; } - public MetaHash ExhaustPopsUpgraded { get; set; } + public MetaHash StartLoop { get; set; } + public int MasterTurboVolume { get; set; } + public int MasterTransmissionVolume { get; set; } + public MetaHash EngineStartUp { get; set; } + public MetaHash EngineSynthDef { get; set; } + public MetaHash EngineSynthPreset { get; set; } + public MetaHash ExhaustSynthDef { get; set; } + public MetaHash ExhaustSynthPreset { get; set; } + public MetaHash EngineSubmixVoice { get; set; } + public MetaHash ExhaustSubmixVoice { get; set; } + public int UpgradedTransmissionVolumeBoost { get; set; } + public MetaHash UpgradedGearChangeInt { get; set; } + public MetaHash UpgradedGearChangeExt { get; set; } + public int UpgradedEngineVolumeBoost_PostSubmix { get; set; } + public uint UpgradedEngineSynthDef { get; set; } + public uint UpgradedEngineSynthPreset { get; set; } + public int UpgradedExhaustVolumeBoost_PostSubmix { get; set; } + public uint UpgradedExhaustSynthDef { get; set; } + public uint UpgradedExhaustSynthPreset { get; set; } + public MetaHash UpgradedDumpValve { get; set; } + public int UpgradedTurboVolumeBoost { get; set; } + public MetaHash UpgradedGearTransLoop { get; set; } + public MetaHash UpgradedTurboWhine { get; set; } + public MetaHash UpgradedInductionLoop { get; set; } + public MetaHash UpgradedExhaustPops { get; set; } - public Dat151VehicleEngine(RelFile rel) : base(rel) + public Dat151VehicleEngineAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleEngine; + Type = Dat151RelType.VehicleEngineAudioSettings; TypeID = (byte)Type; } - public Dat151VehicleEngine(RelData d, BinaryReader br) : base(d, br) + public Dat151VehicleEngineAudioSettings(RelData d, BinaryReader br) : base(d, br) { MasterVolume = br.ReadInt32(); - EngineLowVolume = br.ReadInt32(); - EngineHighVolume = br.ReadInt32(); - EngineNPCVolume = br.ReadInt32(); - EngineLow = br.ReadUInt32(); - EngineHigh = br.ReadUInt32(); - ExhaustLow = br.ReadUInt32(); - ExhaustHigh = br.ReadUInt32(); - RevsOff = br.ReadUInt32(); - Unk09 = br.ReadInt32(); - Unk10 = br.ReadInt32(); - EngineIdleLoop = br.ReadUInt32(); - ExhaustIdleLoop = br.ReadUInt32(); - Unk13 = br.ReadInt32(); - Unk14 = br.ReadInt32(); - AirIntake = br.ReadUInt32(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadInt32(); - Turbo = br.ReadUInt32(); - EngineLowPitch = br.ReadInt32(); - EngineHighPitch = br.ReadInt32(); + MaxConeAttenuation = br.ReadInt32(); + FXCompensation = br.ReadInt32(); + NonPlayerFXComp = br.ReadInt32(); + LowEngineLoop = br.ReadUInt32(); + HighEngineLoop = br.ReadUInt32(); + LowExhaustLoop = br.ReadUInt32(); + HighExhaustLoop = br.ReadUInt32(); + RevsOffLoop = br.ReadUInt32(); + MinPitch = br.ReadInt32(); + MaxPitch = br.ReadInt32(); + IdleEngineSimpleLoop = br.ReadUInt32(); + IdleExhaustSimpleLoop = br.ReadUInt32(); + IdleMinPitch = br.ReadInt32(); + IdleMaxPitch = br.ReadInt32(); + InductionLoop = br.ReadUInt32(); + InductionMinPitch = br.ReadInt32(); + InductionMaxPitch = br.ReadInt32(); + TurboWhine = br.ReadUInt32(); + TurboMinPitch = br.ReadInt32(); + TurboMaxPitch = br.ReadInt32(); DumpValve = br.ReadUInt32(); - Unk22 = br.ReadInt32(); - Unk23 = br.ReadInt32(); - Transmission = br.ReadUInt32(); - TransmissionPitchMin = br.ReadInt32(); - TransmissionPitchMax = br.ReadInt32(); - TransmissionVolume = br.ReadInt32(); + DumpValveProb = br.ReadUInt32(); + TurboSpinupSpeed = br.ReadUInt32(); + GearTransLoop = br.ReadUInt32(); + GearTransMinPitch = br.ReadInt32(); + GearTransMaxPitch = br.ReadInt32(); + GTThrottleVol = br.ReadInt32(); Ignition = br.ReadUInt32(); - ShutDown = br.ReadUInt32(); - EngineCoolingFan = br.ReadUInt32(); + EngineShutdown = br.ReadUInt32(); + CoolingFan = br.ReadUInt32(); ExhaustPops = br.ReadUInt32(); - DistantStart = br.ReadUInt32(); - Unk33 = br.ReadInt32(); - GearStickVolume = br.ReadInt32(); - StartupMaster = br.ReadUInt32(); - EngineSubmix = br.ReadUInt32(); - EngineSubmixPreset = br.ReadUInt32(); - ExhaustSubmix = br.ReadUInt32(); - ExhaustSubmixPreset = br.ReadUInt32();//flags? separate? - Unk40 = br.ReadUInt32(); - Unk41 = br.ReadUInt32(); - Unk42 = br.ReadInt32(); - GearShiftInteriorUpgraded = br.ReadUInt32(); - GearShiftExteriorUpgraded = br.ReadUInt32();//flags? separate? - Unk45 = br.ReadInt32(); - Unk46 = br.ReadInt32(); - Unk47 = br.ReadInt32(); - Unk48 = br.ReadInt32(); - Unk49 = br.ReadInt32(); - Unk50 = br.ReadInt32(); - DumpValveUpgraded = br.ReadUInt32();//float? - DumpValveUpgradedVolume = br.ReadInt32(); - TransmissionUpgraded = br.ReadUInt32(); - TurboUpgraded = br.ReadUInt32(); - AirIntakeUpgraded = br.ReadUInt32(); - ExhaustPopsUpgraded = br.ReadUInt32(); - - - if (Unk46 != 0) - { } - if (Unk47 != 0) - { } - if (Unk49 != 0) - { } - if (Unk50 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - + StartLoop = br.ReadUInt32(); + MasterTurboVolume = br.ReadInt32(); + MasterTransmissionVolume = br.ReadInt32(); + EngineStartUp = br.ReadUInt32(); + EngineSynthDef = br.ReadUInt32(); + EngineSynthPreset = br.ReadUInt32(); + ExhaustSynthDef = br.ReadUInt32(); + ExhaustSynthPreset = br.ReadUInt32(); + EngineSubmixVoice = br.ReadUInt32(); + ExhaustSubmixVoice = br.ReadUInt32(); + UpgradedTransmissionVolumeBoost = br.ReadInt32(); + UpgradedGearChangeInt = br.ReadUInt32(); + UpgradedGearChangeExt = br.ReadUInt32(); + UpgradedEngineVolumeBoost_PostSubmix = br.ReadInt32(); + UpgradedEngineSynthDef = br.ReadUInt32(); + UpgradedEngineSynthPreset = br.ReadUInt32(); + UpgradedExhaustVolumeBoost_PostSubmix = br.ReadInt32(); + UpgradedExhaustSynthDef = br.ReadUInt32(); + UpgradedExhaustSynthPreset = br.ReadUInt32(); + UpgradedDumpValve = br.ReadUInt32(); + UpgradedTurboVolumeBoost = br.ReadInt32(); + UpgradedGearTransLoop = br.ReadUInt32(); + UpgradedTurboWhine = br.ReadUInt32(); + UpgradedInductionLoop = br.ReadUInt32(); + UpgradedExhaustPops = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(MasterVolume); - bw.Write(EngineLowVolume); - bw.Write(EngineHighVolume); - bw.Write(EngineNPCVolume); - bw.Write(EngineLow); - bw.Write(EngineHigh); - bw.Write(ExhaustLow); - bw.Write(ExhaustHigh); - bw.Write(RevsOff); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(EngineIdleLoop); - bw.Write(ExhaustIdleLoop); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(AirIntake); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Turbo); - bw.Write(EngineLowPitch); - bw.Write(EngineHighPitch); + bw.Write(MaxConeAttenuation); + bw.Write(FXCompensation); + bw.Write(NonPlayerFXComp); + bw.Write(LowEngineLoop); + bw.Write(HighEngineLoop); + bw.Write(LowExhaustLoop); + bw.Write(HighExhaustLoop); + bw.Write(RevsOffLoop); + bw.Write(MinPitch); + bw.Write(MaxPitch); + bw.Write(IdleEngineSimpleLoop); + bw.Write(IdleExhaustSimpleLoop); + bw.Write(IdleMinPitch); + bw.Write(IdleMaxPitch); + bw.Write(InductionLoop); + bw.Write(InductionMinPitch); + bw.Write(InductionMaxPitch); + bw.Write(TurboWhine); + bw.Write(TurboMinPitch); + bw.Write(TurboMaxPitch); bw.Write(DumpValve); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Transmission); - bw.Write(TransmissionPitchMin); - bw.Write(TransmissionPitchMax); - bw.Write(TransmissionVolume); + bw.Write(DumpValveProb); + bw.Write(TurboSpinupSpeed); + bw.Write(GearTransLoop); + bw.Write(GearTransMinPitch); + bw.Write(GearTransMaxPitch); + bw.Write(GTThrottleVol); bw.Write(Ignition); - bw.Write(ShutDown); - bw.Write(EngineCoolingFan); + bw.Write(EngineShutdown); + bw.Write(CoolingFan); bw.Write(ExhaustPops); - bw.Write(DistantStart); - bw.Write(Unk33); - bw.Write(GearStickVolume); - bw.Write(StartupMaster); - bw.Write(EngineSubmix); - bw.Write(EngineSubmixPreset); - bw.Write(ExhaustSubmix); - bw.Write(ExhaustSubmixPreset);//flags? separate? - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(Unk42); - bw.Write(GearShiftInteriorUpgraded); - bw.Write(GearShiftExteriorUpgraded);//flags? separate? - bw.Write(Unk45); - bw.Write(Unk46); - bw.Write(Unk47); - bw.Write(Unk48); - bw.Write(Unk49); - bw.Write(Unk50); - bw.Write(DumpValveUpgraded);//float? - bw.Write(DumpValveUpgradedVolume); - bw.Write(TransmissionUpgraded); - bw.Write(TurboUpgraded); - bw.Write(AirIntakeUpgraded); - bw.Write(ExhaustPopsUpgraded); + bw.Write(StartLoop); + bw.Write(MasterTurboVolume); + bw.Write(MasterTransmissionVolume); + bw.Write(EngineStartUp); + bw.Write(EngineSynthDef); + bw.Write(EngineSynthPreset); + bw.Write(ExhaustSynthDef); + bw.Write(ExhaustSynthPreset); + bw.Write(EngineSubmixVoice); + bw.Write(ExhaustSubmixVoice); + bw.Write(UpgradedTransmissionVolumeBoost); + bw.Write(UpgradedGearChangeInt); + bw.Write(UpgradedGearChangeExt); + bw.Write(UpgradedEngineVolumeBoost_PostSubmix); + bw.Write(UpgradedEngineSynthDef); + bw.Write(UpgradedEngineSynthPreset); + bw.Write(UpgradedExhaustVolumeBoost_PostSubmix); + bw.Write(UpgradedExhaustSynthDef); + bw.Write(UpgradedExhaustSynthPreset); + bw.Write(UpgradedDumpValve); + bw.Write(UpgradedTurboVolumeBoost); + bw.Write(UpgradedGearTransLoop); + bw.Write(UpgradedTurboWhine); + bw.Write(UpgradedInductionLoop); + bw.Write(UpgradedExhaustPops); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "MasterVolume", MasterVolume.ToString()); - RelXml.ValueTag(sb, indent, "EngineLowVolume", EngineLowVolume.ToString()); - RelXml.ValueTag(sb, indent, "EngineHighVolume", EngineHighVolume.ToString()); - RelXml.ValueTag(sb, indent, "EngineNPCVolume", EngineNPCVolume.ToString()); - RelXml.StringTag(sb, indent, "EngineLow", RelXml.HashString(EngineLow)); - RelXml.StringTag(sb, indent, "EngineHigh", RelXml.HashString(EngineHigh)); - RelXml.StringTag(sb, indent, "ExhaustLow", RelXml.HashString(ExhaustLow)); - RelXml.StringTag(sb, indent, "ExhaustHigh", RelXml.HashString(ExhaustHigh)); - RelXml.StringTag(sb, indent, "RevsOff", RelXml.HashString(RevsOff)); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.StringTag(sb, indent, "EngineIdleLoop", RelXml.HashString(EngineIdleLoop)); - RelXml.StringTag(sb, indent, "ExhaustIdleLoop", RelXml.HashString(ExhaustIdleLoop)); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.StringTag(sb, indent, "AirIntake", RelXml.HashString(AirIntake)); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.StringTag(sb, indent, "Turbo", RelXml.HashString(Turbo)); - RelXml.ValueTag(sb, indent, "EngineLowPitch", EngineLowPitch.ToString()); - RelXml.ValueTag(sb, indent, "EngineHighPitch", EngineHighPitch.ToString()); + RelXml.ValueTag(sb, indent, "MaxConeAttenuation", MaxConeAttenuation.ToString()); + RelXml.ValueTag(sb, indent, "FXCompensation", FXCompensation.ToString()); + RelXml.ValueTag(sb, indent, "NonPlayerFXComp", NonPlayerFXComp.ToString()); + RelXml.StringTag(sb, indent, "LowEngineLoop", RelXml.HashString(LowEngineLoop)); + RelXml.StringTag(sb, indent, "HighEngineLoop", RelXml.HashString(HighEngineLoop)); + RelXml.StringTag(sb, indent, "LowExhaustLoop", RelXml.HashString(LowExhaustLoop)); + RelXml.StringTag(sb, indent, "HighExhaustLoop", RelXml.HashString(HighExhaustLoop)); + RelXml.StringTag(sb, indent, "RevsOffLoop", RelXml.HashString(RevsOffLoop)); + RelXml.ValueTag(sb, indent, "MinPitch", MinPitch.ToString()); + RelXml.ValueTag(sb, indent, "MaxPitch", MaxPitch.ToString()); + RelXml.StringTag(sb, indent, "IdleEngineSimpleLoop", RelXml.HashString(IdleEngineSimpleLoop)); + RelXml.StringTag(sb, indent, "IdleExhaustSimpleLoop", RelXml.HashString(IdleExhaustSimpleLoop)); + RelXml.ValueTag(sb, indent, "IdleMinPitch", IdleMinPitch.ToString()); + RelXml.ValueTag(sb, indent, "IdleMaxPitch", IdleMaxPitch.ToString()); + RelXml.StringTag(sb, indent, "InductionLoop", RelXml.HashString(InductionLoop)); + RelXml.ValueTag(sb, indent, "InductionMinPitch", InductionMinPitch.ToString()); + RelXml.ValueTag(sb, indent, "InductionMaxPitch", InductionMaxPitch.ToString()); + RelXml.StringTag(sb, indent, "TurboWhine", RelXml.HashString(TurboWhine)); + RelXml.ValueTag(sb, indent, "TurboMinPitch", TurboMinPitch.ToString()); + RelXml.ValueTag(sb, indent, "TurboMaxPitch", TurboMaxPitch.ToString()); RelXml.StringTag(sb, indent, "DumpValve", RelXml.HashString(DumpValve)); - RelXml.ValueTag(sb, indent, "Unk22", Unk22.ToString()); - RelXml.ValueTag(sb, indent, "Unk23", Unk23.ToString()); - RelXml.StringTag(sb, indent, "Transmission", RelXml.HashString(Transmission)); - RelXml.ValueTag(sb, indent, "TransmissionPitchMin", TransmissionPitchMin.ToString()); - RelXml.ValueTag(sb, indent, "TransmissionPitchMax", TransmissionPitchMax.ToString()); - RelXml.ValueTag(sb, indent, "TransmissionVolume", TransmissionVolume.ToString()); + RelXml.ValueTag(sb, indent, "DumpValveProb", DumpValveProb.ToString()); + RelXml.ValueTag(sb, indent, "TurboSpinupSpeed", TurboSpinupSpeed.ToString()); + RelXml.StringTag(sb, indent, "GearTransLoop", RelXml.HashString(GearTransLoop)); + RelXml.ValueTag(sb, indent, "GearTransMinPitch", GearTransMinPitch.ToString()); + RelXml.ValueTag(sb, indent, "GearTransMaxPitch", GearTransMaxPitch.ToString()); + RelXml.ValueTag(sb, indent, "GTThrottleVol", GTThrottleVol.ToString()); RelXml.StringTag(sb, indent, "Ignition", RelXml.HashString(Ignition)); - RelXml.StringTag(sb, indent, "ShutDown", RelXml.HashString(ShutDown)); - RelXml.StringTag(sb, indent, "EngineCoolingFan", RelXml.HashString(EngineCoolingFan)); + RelXml.StringTag(sb, indent, "EngineShutdown", RelXml.HashString(EngineShutdown)); + RelXml.StringTag(sb, indent, "CoolingFan", RelXml.HashString(CoolingFan)); RelXml.StringTag(sb, indent, "ExhaustPops", RelXml.HashString(ExhaustPops)); - RelXml.StringTag(sb, indent, "DistantStart", RelXml.HashString(DistantStart)); - RelXml.ValueTag(sb, indent, "Unk33", Unk33.ToString()); - RelXml.ValueTag(sb, indent, "GearStickVolume", GearStickVolume.ToString()); - RelXml.StringTag(sb, indent, "StartupMaster", RelXml.HashString(StartupMaster)); - RelXml.StringTag(sb, indent, "EngineSubmix", RelXml.HashString(EngineSubmix)); - RelXml.StringTag(sb, indent, "EngineSubmixPreset", RelXml.HashString(EngineSubmixPreset)); - RelXml.StringTag(sb, indent, "ExhaustSubmix", RelXml.HashString(ExhaustSubmix)); - RelXml.StringTag(sb, indent, "ExhaustSubmixPreset", RelXml.HashString(ExhaustSubmixPreset)); - RelXml.StringTag(sb, indent, "Unk40", RelXml.HashString(Unk40)); - RelXml.StringTag(sb, indent, "Unk41", RelXml.HashString(Unk41)); - RelXml.ValueTag(sb, indent, "Unk42", Unk42.ToString()); - RelXml.StringTag(sb, indent, "GearShiftInteriorUpgraded", RelXml.HashString(GearShiftInteriorUpgraded)); - RelXml.StringTag(sb, indent, "GearShiftExteriorUpgraded", RelXml.HashString(GearShiftExteriorUpgraded)); - RelXml.ValueTag(sb, indent, "Unk45", Unk45.ToString()); - RelXml.ValueTag(sb, indent, "Unk46", Unk46.ToString()); - RelXml.ValueTag(sb, indent, "Unk47", Unk47.ToString()); - RelXml.ValueTag(sb, indent, "Unk48", Unk48.ToString()); - RelXml.ValueTag(sb, indent, "Unk49", Unk49.ToString()); - RelXml.ValueTag(sb, indent, "Unk50", Unk50.ToString()); - RelXml.StringTag(sb, indent, "DumpValveUpgraded", RelXml.HashString(DumpValveUpgraded)); - RelXml.ValueTag(sb, indent, "DumpValveUpgradedVolume", DumpValveUpgradedVolume.ToString()); - RelXml.StringTag(sb, indent, "TransmissionUpgraded", RelXml.HashString(TransmissionUpgraded)); - RelXml.StringTag(sb, indent, "TurboUpgraded", RelXml.HashString(TurboUpgraded)); - RelXml.StringTag(sb, indent, "AirIntakeUpgraded", RelXml.HashString(AirIntakeUpgraded)); - RelXml.StringTag(sb, indent, "ExhaustPopsUpgraded", RelXml.HashString(ExhaustPopsUpgraded)); + RelXml.StringTag(sb, indent, "StartLoop", RelXml.HashString(StartLoop)); + RelXml.ValueTag(sb, indent, "MasterTurboVolume", MasterTurboVolume.ToString()); + RelXml.ValueTag(sb, indent, "MasterTransmissionVolume", MasterTransmissionVolume.ToString()); + RelXml.StringTag(sb, indent, "EngineStartUp", RelXml.HashString(EngineStartUp)); + RelXml.StringTag(sb, indent, "EngineSynthDef", RelXml.HashString(EngineSynthDef)); + RelXml.StringTag(sb, indent, "EngineSynthPreset", RelXml.HashString(EngineSynthPreset)); + RelXml.StringTag(sb, indent, "ExhaustSynthDef", RelXml.HashString(ExhaustSynthDef)); + RelXml.StringTag(sb, indent, "ExhaustSynthPreset", RelXml.HashString(ExhaustSynthPreset)); + RelXml.StringTag(sb, indent, "EngineSubmixVoice", RelXml.HashString(EngineSubmixVoice)); + RelXml.StringTag(sb, indent, "ExhaustSubmixVoice", RelXml.HashString(ExhaustSubmixVoice)); + RelXml.ValueTag(sb, indent, "UpgradedTransmissionVolumeBoost", UpgradedTransmissionVolumeBoost.ToString()); + RelXml.StringTag(sb, indent, "UpgradedGearChangeInt", RelXml.HashString(UpgradedGearChangeInt)); + RelXml.StringTag(sb, indent, "UpgradedGearChangeExt", RelXml.HashString(UpgradedGearChangeExt)); + RelXml.ValueTag(sb, indent, "UpgradedEngineVolumeBoost_PostSubmix", UpgradedEngineVolumeBoost_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "UpgradedEngineSynthDef", UpgradedEngineSynthDef.ToString()); + RelXml.ValueTag(sb, indent, "UpgradedEngineSynthPreset", UpgradedEngineSynthPreset.ToString()); + RelXml.ValueTag(sb, indent, "UpgradedExhaustVolumeBoost_PostSubmix", UpgradedExhaustVolumeBoost_PostSubmix.ToString()); + RelXml.ValueTag(sb, indent, "UpgradedExhaustSynthDef", UpgradedExhaustSynthDef.ToString()); + RelXml.ValueTag(sb, indent, "UpgradedExhaustSynthPreset", UpgradedExhaustSynthPreset.ToString()); + RelXml.StringTag(sb, indent, "UpgradedDumpValve", RelXml.HashString(UpgradedDumpValve)); + RelXml.ValueTag(sb, indent, "UpgradedTurboVolumeBoost", UpgradedTurboVolumeBoost.ToString()); + RelXml.StringTag(sb, indent, "UpgradedGearTransLoop", RelXml.HashString(UpgradedGearTransLoop)); + RelXml.StringTag(sb, indent, "UpgradedTurboWhine", RelXml.HashString(UpgradedTurboWhine)); + RelXml.StringTag(sb, indent, "UpgradedInductionLoop", RelXml.HashString(UpgradedInductionLoop)); + RelXml.StringTag(sb, indent, "UpgradedExhaustPops", RelXml.HashString(UpgradedExhaustPops)); } public override void ReadXml(XmlNode node) { MasterVolume = Xml.GetChildIntAttribute(node, "MasterVolume", "value"); - EngineLowVolume = Xml.GetChildIntAttribute(node, "EngineLowVolume", "value"); - EngineHighVolume = Xml.GetChildIntAttribute(node, "EngineHighVolume", "value"); - EngineNPCVolume = Xml.GetChildIntAttribute(node, "EngineNPCVolume", "value"); - EngineLow = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineLow")); - EngineHigh = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineHigh")); - ExhaustLow = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustLow")); - ExhaustHigh = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustHigh")); - RevsOff = XmlRel.GetHash(Xml.GetChildInnerText(node, "RevsOff")); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - EngineIdleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineIdleLoop")); - ExhaustIdleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustIdleLoop")); - Unk13 = Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildIntAttribute(node, "Unk14", "value"); - AirIntake = XmlRel.GetHash(Xml.GetChildInnerText(node, "AirIntake")); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildIntAttribute(node, "Unk17", "value"); - Turbo = XmlRel.GetHash(Xml.GetChildInnerText(node, "Turbo")); - EngineLowPitch = Xml.GetChildIntAttribute(node, "EngineLowPitch", "value"); - EngineHighPitch = Xml.GetChildIntAttribute(node, "EngineHighPitch", "value"); + MaxConeAttenuation = Xml.GetChildIntAttribute(node, "MaxConeAttenuation", "value"); + FXCompensation = Xml.GetChildIntAttribute(node, "FXCompensation", "value"); + NonPlayerFXComp = Xml.GetChildIntAttribute(node, "NonPlayerFXComp", "value"); + LowEngineLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "LowEngineLoop")); + HighEngineLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "HighEngineLoop")); + LowExhaustLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "LowExhaustLoop")); + HighExhaustLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "HighExhaustLoop")); + RevsOffLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "RevsOffLoop")); + MinPitch = Xml.GetChildIntAttribute(node, "MinPitch", "value"); + MaxPitch = Xml.GetChildIntAttribute(node, "MaxPitch", "value"); + IdleEngineSimpleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleEngineSimpleLoop")); + IdleExhaustSimpleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleExhaustSimpleLoop")); + IdleMinPitch = Xml.GetChildIntAttribute(node, "IdleMinPitch", "value"); + IdleMaxPitch = Xml.GetChildIntAttribute(node, "IdleMaxPitch", "value"); + InductionLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "InductionLoop")); + InductionMinPitch = Xml.GetChildIntAttribute(node, "InductionMinPitch", "value"); + InductionMaxPitch = Xml.GetChildIntAttribute(node, "InductionMaxPitch", "value"); + TurboWhine = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurboWhine")); + TurboMinPitch = Xml.GetChildIntAttribute(node, "TurboMinPitch", "value"); + TurboMaxPitch = Xml.GetChildIntAttribute(node, "TurboMaxPitch", "value"); DumpValve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DumpValve")); - Unk22 = Xml.GetChildIntAttribute(node, "Unk22", "value"); - Unk23 = Xml.GetChildIntAttribute(node, "Unk23", "value"); - Transmission = XmlRel.GetHash(Xml.GetChildInnerText(node, "Transmission")); - TransmissionPitchMin = Xml.GetChildIntAttribute(node, "TransmissionPitchMin", "value"); - TransmissionPitchMax = Xml.GetChildIntAttribute(node, "TransmissionPitchMax", "value"); - TransmissionVolume = Xml.GetChildIntAttribute(node, "TransmissionVolume", "value"); + DumpValveProb = Xml.GetChildUIntAttribute(node, "DumpValveProb", "value"); + TurboSpinupSpeed = Xml.GetChildUIntAttribute(node, "TurboSpinupSpeed", "value"); + GearTransLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearTransLoop")); + GearTransMinPitch = Xml.GetChildIntAttribute(node, "GearTransMinPitch", "value"); + GearTransMaxPitch = Xml.GetChildIntAttribute(node, "GearTransMaxPitch", "value"); + GTThrottleVol = Xml.GetChildIntAttribute(node, "GTThrottleVol", "value"); Ignition = XmlRel.GetHash(Xml.GetChildInnerText(node, "Ignition")); - ShutDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "ShutDown")); - EngineCoolingFan = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineCoolingFan")); + EngineShutdown = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineShutdown")); + CoolingFan = XmlRel.GetHash(Xml.GetChildInnerText(node, "CoolingFan")); ExhaustPops = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustPops")); - DistantStart = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistantStart")); - Unk33 = Xml.GetChildIntAttribute(node, "Unk33", "value"); - GearStickVolume = Xml.GetChildIntAttribute(node, "GearStickVolume", "value"); - StartupMaster = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartupMaster")); - EngineSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmix")); - EngineSubmixPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixPreset")); - ExhaustSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmix")); - ExhaustSubmixPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixPreset")); - Unk40 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk40")); - Unk41 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk41")); - Unk42 = Xml.GetChildIntAttribute(node, "Unk42", "value"); - GearShiftInteriorUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearShiftInteriorUpgraded")); - GearShiftExteriorUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearShiftExteriorUpgraded")); - Unk45 = Xml.GetChildIntAttribute(node, "Unk45", "value"); - Unk46 = Xml.GetChildIntAttribute(node, "Unk46", "value"); - Unk47 = Xml.GetChildIntAttribute(node, "Unk47", "value"); - Unk48 = Xml.GetChildIntAttribute(node, "Unk48", "value"); - Unk49 = Xml.GetChildIntAttribute(node, "Unk49", "value"); - Unk50 = Xml.GetChildIntAttribute(node, "Unk50", "value"); - DumpValveUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "DumpValveUpgraded")); - DumpValveUpgradedVolume = Xml.GetChildIntAttribute(node, "DumpValveUpgradedVolume", "value"); - TransmissionUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "TransmissionUpgraded")); - TurboUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurboUpgraded")); - AirIntakeUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "AirIntakeUpgraded")); - ExhaustPopsUpgraded = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustPopsUpgraded")); + StartLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartLoop")); + MasterTurboVolume = Xml.GetChildIntAttribute(node, "MasterTurboVolume", "value"); + MasterTransmissionVolume = Xml.GetChildIntAttribute(node, "MasterTransmissionVolume", "value"); + EngineStartUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineStartUp")); + EngineSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthDef")); + EngineSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthPreset")); + ExhaustSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthDef")); + ExhaustSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthPreset")); + EngineSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixVoice")); + ExhaustSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixVoice")); + UpgradedTransmissionVolumeBoost = Xml.GetChildIntAttribute(node, "UpgradedTransmissionVolumeBoost", "value"); + UpgradedGearChangeInt = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedGearChangeInt")); + UpgradedGearChangeExt = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedGearChangeExt")); + UpgradedEngineVolumeBoost_PostSubmix = Xml.GetChildIntAttribute(node, "UpgradedEngineVolumeBoost_PostSubmix", "value"); + UpgradedEngineSynthDef = Xml.GetChildUIntAttribute(node, "UpgradedEngineSynthDef", "value"); + UpgradedEngineSynthPreset = Xml.GetChildUIntAttribute(node, "UpgradedEngineSynthPreset", "value"); + UpgradedExhaustVolumeBoost_PostSubmix = Xml.GetChildIntAttribute(node, "UpgradedExhaustVolumeBoost_PostSubmix", "value"); + UpgradedExhaustSynthDef = Xml.GetChildUIntAttribute(node, "UpgradedExhaustSynthDef", "value"); + UpgradedExhaustSynthPreset = Xml.GetChildUIntAttribute(node, "UpgradedExhaustSynthPreset", "value"); + UpgradedDumpValve = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedDumpValve")); + UpgradedTurboVolumeBoost = Xml.GetChildIntAttribute(node, "UpgradedTurboVolumeBoost", "value"); + UpgradedGearTransLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedGearTransLoop")); + UpgradedTurboWhine = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedTurboWhine")); + UpgradedInductionLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedInductionLoop")); + UpgradedExhaustPops = XmlRel.GetHash(Xml.GetChildInnerText(node, "UpgradedExhaustPops")); } public override MetaHash[] GetSynthHashes() { - return new[] { EngineSubmix, EngineSubmixPreset, ExhaustSubmix, ExhaustSubmixPreset }; + return new[] { EngineSynthDef, EngineSynthPreset, ExhaustSynthDef, ExhaustSynthPreset }; } public override MetaHash[] GetSoundHashes() { - return new[] { EngineLow, EngineHigh, ExhaustLow, ExhaustHigh, RevsOff, EngineIdleLoop, ExhaustIdleLoop, AirIntake, Turbo, DumpValve, - Transmission, Ignition, ShutDown, EngineCoolingFan, ExhaustPops, DistantStart, StartupMaster, Unk40, Unk41, - GearShiftInteriorUpgraded, GearShiftExteriorUpgraded, DumpValveUpgraded, TransmissionUpgraded, - TurboUpgraded, AirIntakeUpgraded, ExhaustPopsUpgraded }; + return new[] { LowEngineLoop, HighEngineLoop, LowExhaustLoop, HighExhaustLoop, RevsOffLoop, IdleEngineSimpleLoop, IdleExhaustSimpleLoop, InductionLoop, TurboWhine, DumpValve, + GearTransLoop, Ignition, EngineShutdown, CoolingFan, ExhaustPops, StartLoop, EngineStartUp, EngineSubmixVoice, ExhaustSubmixVoice, + UpgradedGearChangeInt, UpgradedGearChangeExt, UpgradedDumpValve, UpgradedGearTransLoop, + UpgradedTurboWhine, UpgradedInductionLoop, UpgradedExhaustPops }; } } - [TC(typeof(EXP))] public class Dat151VehicleScannerParams : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ScannerVehicleParams : Dat151RelData { public FlagsUint Flags { get; set; } public int ParamCount { get; set; } @@ -11771,12 +11279,12 @@ namespace CodeWalker.GameFiles } } - public Dat151VehicleScannerParams(RelFile rel) : base(rel) + public Dat151ScannerVehicleParams(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleScannerParams; + Type = Dat151RelType.ScannerVehicleParams; TypeID = (byte)Type; } - public Dat151VehicleScannerParams(RelData d, BinaryReader br) : base(d, br) + public Dat151ScannerVehicleParams(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); ParamCount = br.ReadInt32(); @@ -11785,10 +11293,6 @@ namespace CodeWalker.GameFiles { Params[i] = new Param(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -11826,283 +11330,263 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151Weapon : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151WeaponAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash SingleFire { get; set; } - public MetaHash SuppressedFire { get; set; } - public MetaHash RapidFire { get; set; } - public MetaHash Report { get; set; } - public float Unk05 { get; set; } - public int Unk06 { get; set; } - public float Unk07 { get; set; } - public MetaHash Echo { get; set; } - public MetaHash SuppressedEcho { get; set; } - public MetaHash Unk10 { get; set; } - public MetaHash MeleeSwipe { get; set; } - public MetaHash MeleeCollision { get; set; } - public MetaHash MeleeHitPed { get; set; }//eg 0xBB0A8AE1 - public MetaHash Unk14 { get; set; } - public MetaHash Unk15 { get; set; } - public MetaHash Unk16 { get; set; } - public MetaHash Unk17 { get; set; } - public MetaHash PickUpWeapon { get; set; } - public int Unk19 { get; set; }//0,1,2 - public MetaHash Unk20 { get; set; } - public MetaHash Unk21 { get; set; } - public MetaHash FuelCan { get; set; }//eg fuel_can_soundset - public MetaHash Unk23 { get; set; } - public MetaHash InteriorFire { get; set; } - public MetaHash Reload { get; set; }//soundset - public MetaHash Unk26 { get; set; } - public MetaHash Unk27 { get; set; } - public int Unk28 { get; set; }//0,50 - public int Unk29 { get; set; }//0 - public MetaHash Aim { get; set; } - public MetaHash Unk31 { get; set; } - public MetaHash Unk32 { get; set; } - public MetaHash SlowMotionFire { get; set; } - public MetaHash StunGun { get; set; } - - public MetaHash Unk35 { get; set; } - public MetaHash SlowMotionSuppressedFire { get; set; } - public MetaHash Unk37 { get; set; } - public MetaHash SlowMotionReport { get; set; } - public MetaHash Unk39 { get; set; } - public MetaHash Unk40 { get; set; } - public MetaHash Unk41 { get; set; } - public MetaHash Unk42 { get; set; } - public MetaHash Unk43 { get; set; } - public MetaHash Unk44 { get; set; } - public MetaHash Unk45 { get; set; } - public MetaHash Unk46 { get; set; }//100, 30, null_sound ... both int (v3) and sound (v1)... TODO: fix this! - public MetaHash Unk47 { get; set; }//20, null_sound ... both int (v3) and sound (v1)... - - public int Unk48 { get; set; } - public int Unk49 { get; set; } - public int Unk50 { get; set; } - - public MetaHash SuperSlowMotionFire { get; set; } - public MetaHash Unk52 { get; set; } - public MetaHash SuperSlowMotionSuppressedFire { get; set; } - public MetaHash Unk54 { get; set; } - public MetaHash SuperSlowMotionReport { get; set; } - public MetaHash Unk56 { get; set; } - public MetaHash Unk57 { get; set; } - public MetaHash Unk58 { get; set; } - public MetaHash Unk59 { get; set; } - public MetaHash Unk60 { get; set; } - public MetaHash Unk61 { get; set; } - public MetaHash Unk62 { get; set; } - public int Unk63 { get; set; } - public int Unk64 { get; set; } - public int Unk65 { get; set; } - public int Unk66 { get; set; } - public int Unk67 { get; set; } + public MetaHash FireSound { get; set; } + public MetaHash SuppressedFireSound { get; set; } + public MetaHash AutoSound { get; set; } + public MetaHash ReportSound { get; set; } + public float ReportVolumeDelta { get; set; } + public int ReportPredelayDelta { get; set; } + public float TailEnergyValue { get; set; } + public MetaHash EchoSound { get; set; } + public MetaHash SuppressedEchoSound { get; set; } + public MetaHash ShellCasingSound { get; set; } + public MetaHash SwipeSound { get; set; } + public MetaHash GeneralStrikeSound { get; set; } + public MetaHash PedStrikeSound { get; set; } + public MetaHash HeftSound { get; set; } + public MetaHash PutDownSound { get; set; } + public MetaHash RattleSound { get; set; } + public MetaHash RattleLandSound { get; set; } + public MetaHash PickupSound { get; set; } + public int ShellCasing { get; set; } + public MetaHash SafetyOn { get; set; } + public MetaHash SafetyOff { get; set; } + public MetaHash SpecialWeaponSoundSet { get; set; } + public MetaHash BankSound { get; set; } + public MetaHash InteriorShotSound { get; set; } + public MetaHash ReloadSounds { get; set; } + public MetaHash IntoCoverSound { get; set; } + public MetaHash OutOfCoverSound { get; set; } + public int BulletImpactTimeFilter { get; set; } + public int LastBulletImpactTime { get; set; } + public MetaHash RattleAimSound { get; set; } + public MetaHash SmallAnimalStrikeSound { get; set; } + public MetaHash BigAnimalStrikeSound { get; set; } + public MetaHash SlowMoFireSound { get; set; } + public MetaHash HitPedSound { get; set; } + public MetaHash SlowMoFireSoundPresuck { get; set; } + public MetaHash SlowMoSuppressedFireSound { get; set; } + public MetaHash SlowMoSuppressedFireSoundPresuck { get; set; } + public MetaHash SlowMoReportSound { get; set; } + public MetaHash SlowMoInteriorShotSound { get; set; } + public MetaHash SlowMoPedStrikeSound { get; set; } + public MetaHash SlowMoPedStrikeSoundPresuck { get; set; } + public MetaHash SlowMoBigAnimalStrikeSound { get; set; } + public MetaHash SlowMoBigAnimalStrikeSoundPresuck { get; set; } + public MetaHash SlowMoSmallAnimalStrikeSound { get; set; } + public MetaHash SlowMoSmallAnimalStrikeSoundPresuck { get; set; } + public MetaHash SlowMoFireSoundPresuckTime { get; set; } + public MetaHash SlowMoSuppressedFireSoundPresuckTime { get; set; } + public int SlowMoPedStrikeSoundPresuckTime { get; set; } + public int SlowMoBigAnimalStrikeSoundPresuckTime { get; set; } + public int SlowMoSmallAnimalStrikeSoundPresuckTime { get; set; } + public MetaHash SuperSlowMoFireSound { get; set; } + public MetaHash SuperSlowMoFireSoundPresuck { get; set; } + public MetaHash SuperSlowMoSuppressedFireSound { get; set; } + public MetaHash SuperSlowMoSuppressedFireSoundPresuck { get; set; } + public MetaHash SuperSlowMoReportSound { get; set; } + public MetaHash SuperSlowMoInteriorShotSound { get; set; } + public MetaHash SuperSlowMoPedStrikeSound { get; set; } + public MetaHash SuperSlowMoPedStrikeSoundPresuck { get; set; } + public MetaHash SuperSlowMoBigAnimalStrikeSound { get; set; } + public MetaHash SuperSlowMoBigAnimalStrikeSoundPresuck { get; set; } + public MetaHash SuperSlowMoSmallAnimalStrikeSound { get; set; } + public MetaHash SuperSlowMoSmallAnimalStrikeSoundPresuck { get; set; } + public int SuperSlowMoFireSoundPresuckTime { get; set; } + public int SuperSlowMoSuppressedFireSoundPresuckTime { get; set; } + public int SuperSlowMoPedStrikeSoundPresuckTime { get; set; } + public int SuperSlowMoBigAnimalStrikeSoundPresuckTime { get; set; } + public int SuperSlowMoSmallAnimalStrikeSoundPresuckTime { get; set; } public int Version { get; set; } - public Dat151Weapon(RelFile rel) : base(rel) + public Dat151WeaponAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Weapon; + Type = Dat151RelType.WeaponAudioSettings; TypeID = (byte)Type; } - public Dat151Weapon(RelData d, BinaryReader br) : base(d, br) + public Dat151WeaponAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - SingleFire = br.ReadUInt32(); - SuppressedFire = br.ReadUInt32(); - RapidFire = br.ReadUInt32(); - Report = br.ReadUInt32(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadInt32(); - Unk07 = br.ReadSingle(); - Echo = br.ReadUInt32(); - SuppressedEcho = br.ReadUInt32(); - Unk10 = br.ReadUInt32(); - MeleeSwipe = br.ReadUInt32(); - MeleeCollision = br.ReadUInt32(); - MeleeHitPed = br.ReadUInt32();//eg 0xBB0A8AE1 - Unk14 = br.ReadUInt32(); - Unk15 = br.ReadUInt32(); - Unk16 = br.ReadUInt32(); - Unk17 = br.ReadUInt32(); - PickUpWeapon = br.ReadUInt32(); - Unk19 = br.ReadInt32();//0,1,2 - Unk20 = br.ReadUInt32(); - Unk21 = br.ReadUInt32(); - FuelCan = br.ReadUInt32(); - Unk23 = br.ReadUInt32(); - InteriorFire = br.ReadUInt32(); - Reload = br.ReadUInt32(); - Unk26 = br.ReadUInt32(); - Unk27 = br.ReadUInt32(); - Unk28 = br.ReadInt32();//0,50 - Unk29 = br.ReadInt32();//0 - Aim = br.ReadUInt32(); - Unk31 = br.ReadUInt32(); - Unk32 = br.ReadUInt32(); - SlowMotionFire = br.ReadUInt32(); - StunGun = br.ReadUInt32(); + FireSound = br.ReadUInt32(); + SuppressedFireSound = br.ReadUInt32(); + AutoSound = br.ReadUInt32(); + ReportSound = br.ReadUInt32(); + ReportVolumeDelta = br.ReadSingle(); + ReportPredelayDelta = br.ReadInt32(); + TailEnergyValue = br.ReadSingle(); + EchoSound = br.ReadUInt32(); + SuppressedEchoSound = br.ReadUInt32(); + ShellCasingSound = br.ReadUInt32(); + SwipeSound = br.ReadUInt32(); + GeneralStrikeSound = br.ReadUInt32(); + PedStrikeSound = br.ReadUInt32(); + HeftSound = br.ReadUInt32(); + PutDownSound = br.ReadUInt32(); + RattleSound = br.ReadUInt32(); + RattleLandSound = br.ReadUInt32(); + PickupSound = br.ReadUInt32(); + ShellCasing = br.ReadInt32(); + SafetyOn = br.ReadUInt32(); + SafetyOff = br.ReadUInt32(); + SpecialWeaponSoundSet = br.ReadUInt32(); + BankSound = br.ReadUInt32(); + InteriorShotSound = br.ReadUInt32(); + ReloadSounds = br.ReadUInt32(); + IntoCoverSound = br.ReadUInt32(); + OutOfCoverSound = br.ReadUInt32(); + BulletImpactTimeFilter = br.ReadInt32(); + LastBulletImpactTime = br.ReadInt32(); + RattleAimSound = br.ReadUInt32(); + SmallAnimalStrikeSound = br.ReadUInt32(); + BigAnimalStrikeSound = br.ReadUInt32(); + SlowMoFireSound = br.ReadUInt32(); + HitPedSound = br.ReadUInt32(); Version = 0; var bytesleft = br.BaseStream.Length - br.BaseStream.Position; switch (bytesleft) { - case 0: + case 0: // Check for additional bytes, end if none break; - case 52: - case 64: - case 132: + case 132: // if theres 132 bytes left, read values Version = 1; - Unk35 = br.ReadUInt32(); - SlowMotionSuppressedFire = br.ReadUInt32(); - Unk37 = br.ReadUInt32(); - SlowMotionReport = br.ReadUInt32(); - Unk39 = br.ReadUInt32(); - Unk40 = br.ReadUInt32(); - Unk41 = br.ReadUInt32(); - Unk42 = br.ReadUInt32(); - Unk43 = br.ReadUInt32(); - Unk44 = br.ReadUInt32(); - Unk45 = br.ReadUInt32(); - Unk46 = br.ReadUInt32(); - Unk47 = br.ReadUInt32(); + SlowMoFireSoundPresuck = br.ReadUInt32(); + SlowMoSuppressedFireSound = br.ReadUInt32(); + SlowMoSuppressedFireSoundPresuck = br.ReadUInt32(); + SlowMoReportSound = br.ReadUInt32(); + SlowMoInteriorShotSound = br.ReadUInt32(); + SlowMoPedStrikeSound = br.ReadUInt32(); + SlowMoPedStrikeSoundPresuck = br.ReadUInt32(); + SlowMoBigAnimalStrikeSound = br.ReadUInt32(); + SlowMoBigAnimalStrikeSoundPresuck = br.ReadUInt32(); + SlowMoSmallAnimalStrikeSound = br.ReadUInt32(); + SlowMoSmallAnimalStrikeSoundPresuck = br.ReadUInt32(); + SlowMoFireSoundPresuckTime = br.ReadUInt32(); + SlowMoSuppressedFireSoundPresuckTime = br.ReadUInt32(); - if (bytesleft >= 64) + if (bytesleft >= 64) // if bytes left is greater than or equal to 64, read values { Version = 2; - Unk48 = br.ReadInt32(); - Unk49 = br.ReadInt32(); - Unk50 = br.ReadInt32(); + SlowMoPedStrikeSoundPresuckTime = br.ReadInt32(); + SlowMoBigAnimalStrikeSoundPresuckTime = br.ReadInt32(); + SlowMoSmallAnimalStrikeSoundPresuckTime = br.ReadInt32(); - if (Unk48 != 0) - { }//only rarely hit! - if (Unk49 != 0) - { }//no hit - if (Unk50 != 0) - { }//no hit - - if (bytesleft >= 132) + if (bytesleft >= 132) // if bytes left is greater than or equal to 132, read values { Version = 3; - SuperSlowMotionFire = br.ReadUInt32(); - Unk52 = br.ReadUInt32(); - SuperSlowMotionSuppressedFire = br.ReadUInt32(); - Unk54 = br.ReadUInt32(); - SuperSlowMotionReport = br.ReadUInt32(); - Unk56 = br.ReadUInt32(); - Unk57 = br.ReadUInt32(); - Unk58 = br.ReadUInt32(); - Unk59 = br.ReadUInt32(); - Unk60 = br.ReadUInt32(); - Unk61 = br.ReadUInt32(); - Unk62 = br.ReadUInt32(); - Unk63 = br.ReadInt32(); - Unk64 = br.ReadInt32(); - Unk65 = br.ReadInt32(); - Unk66 = br.ReadInt32(); - Unk67 = br.ReadInt32(); - - if (bytesleft > 132) - { }//shouldn't get here + SuperSlowMoFireSound = br.ReadUInt32(); + SuperSlowMoFireSoundPresuck = br.ReadUInt32(); + SuperSlowMoSuppressedFireSound = br.ReadUInt32(); + SuperSlowMoSuppressedFireSoundPresuck = br.ReadUInt32(); + SuperSlowMoReportSound = br.ReadUInt32(); + SuperSlowMoInteriorShotSound = br.ReadUInt32(); + SuperSlowMoPedStrikeSound = br.ReadUInt32(); + SuperSlowMoPedStrikeSoundPresuck = br.ReadUInt32(); + SuperSlowMoBigAnimalStrikeSound = br.ReadUInt32(); + SuperSlowMoBigAnimalStrikeSoundPresuck = br.ReadUInt32(); + SuperSlowMoSmallAnimalStrikeSound = br.ReadUInt32(); + SuperSlowMoSmallAnimalStrikeSoundPresuck = br.ReadUInt32(); + SuperSlowMoFireSoundPresuckTime = br.ReadInt32(); + SuperSlowMoSuppressedFireSoundPresuckTime = br.ReadInt32(); + SuperSlowMoPedStrikeSoundPresuckTime = br.ReadInt32(); + SuperSlowMoBigAnimalStrikeSoundPresuckTime = br.ReadInt32(); + SuperSlowMoSmallAnimalStrikeSoundPresuckTime = br.ReadInt32(); } } break; default: break; } - bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - - if (Unk29 != 0) - { }//no hit - } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(SingleFire); - bw.Write(SuppressedFire); - bw.Write(RapidFire); - bw.Write(Report); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Echo); - bw.Write(SuppressedEcho); - bw.Write(Unk10); - bw.Write(MeleeSwipe); - bw.Write(MeleeCollision); - bw.Write(MeleeHitPed);//eg 0xBB0A8AE1 - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(PickUpWeapon); - bw.Write(Unk19);//0,1,2 - bw.Write(Unk20); - bw.Write(Unk21); - bw.Write(FuelCan); - bw.Write(Unk23); - bw.Write(InteriorFire); - bw.Write(Reload); - bw.Write(Unk26); - bw.Write(Unk27); - bw.Write(Unk28);//0,50 - bw.Write(Unk29);//0 - bw.Write(Aim); - bw.Write(Unk31); - bw.Write(Unk32); - bw.Write(SlowMotionFire); - bw.Write(StunGun); + bw.Write(FireSound); + bw.Write(SuppressedFireSound); + bw.Write(AutoSound); + bw.Write(ReportSound); + bw.Write(ReportVolumeDelta); + bw.Write(ReportPredelayDelta); + bw.Write(TailEnergyValue); + bw.Write(EchoSound); + bw.Write(SuppressedEchoSound); + bw.Write(ShellCasingSound); + bw.Write(SwipeSound); + bw.Write(GeneralStrikeSound); + bw.Write(PedStrikeSound); + bw.Write(HeftSound); + bw.Write(PutDownSound); + bw.Write(RattleSound); + bw.Write(RattleLandSound); + bw.Write(PickupSound); + bw.Write(ShellCasing); + bw.Write(SafetyOn); + bw.Write(SafetyOff); + bw.Write(SpecialWeaponSoundSet); + bw.Write(BankSound); + bw.Write(InteriorShotSound); + bw.Write(ReloadSounds); + bw.Write(IntoCoverSound); + bw.Write(OutOfCoverSound); + bw.Write(BulletImpactTimeFilter); + bw.Write(LastBulletImpactTime); + bw.Write(RattleAimSound); + bw.Write(SmallAnimalStrikeSound); + bw.Write(BigAnimalStrikeSound); + bw.Write(SlowMoFireSound); + bw.Write(HitPedSound); - if (Version >= 1) + if (Version >= 1) // if version 1, write values (132 bytes left) { - bw.Write(Unk35); - bw.Write(SlowMotionSuppressedFire); - bw.Write(Unk37); - bw.Write(SlowMotionReport); - bw.Write(Unk39); - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(Unk42); - bw.Write(Unk43); - bw.Write(Unk44); - bw.Write(Unk45); - bw.Write(Unk46); - bw.Write(Unk47); + bw.Write(SlowMoFireSoundPresuck); + bw.Write(SlowMoSuppressedFireSound); + bw.Write(SlowMoSuppressedFireSoundPresuck); + bw.Write(SlowMoReportSound); + bw.Write(SlowMoInteriorShotSound); + bw.Write(SlowMoPedStrikeSound); + bw.Write(SlowMoPedStrikeSoundPresuck); + bw.Write(SlowMoBigAnimalStrikeSound); + bw.Write(SlowMoBigAnimalStrikeSoundPresuck); + bw.Write(SlowMoSmallAnimalStrikeSound); + bw.Write(SlowMoSmallAnimalStrikeSoundPresuck); + bw.Write(SlowMoFireSoundPresuckTime); + bw.Write(SlowMoSuppressedFireSoundPresuckTime); - if (Version >= 2) + if (Version >= 2) // if version 2, write values (greater or equal to 64) { - bw.Write(Unk48); - bw.Write(Unk49); - bw.Write(Unk50); + bw.Write(SlowMoPedStrikeSoundPresuckTime); + bw.Write(SlowMoBigAnimalStrikeSoundPresuckTime); + bw.Write(SlowMoSmallAnimalStrikeSoundPresuckTime); - if (Version >= 3) + if (Version >= 3) // if version 3, write values (greater or equal to 132) { - bw.Write(SuperSlowMotionFire); - bw.Write(Unk52); - bw.Write(SuperSlowMotionSuppressedFire); - bw.Write(Unk54); - bw.Write(SuperSlowMotionReport); - bw.Write(Unk56); - bw.Write(Unk57); - bw.Write(Unk58); - bw.Write(Unk59); - bw.Write(Unk60); - bw.Write(Unk61); - bw.Write(Unk62); - bw.Write(Unk63); - bw.Write(Unk64); - bw.Write(Unk65); - bw.Write(Unk66); - bw.Write(Unk67); + bw.Write(SuperSlowMoFireSound); + bw.Write(SuperSlowMoFireSoundPresuck); + bw.Write(SuperSlowMoSuppressedFireSound); + bw.Write(SuperSlowMoSuppressedFireSoundPresuck); + bw.Write(SuperSlowMoReportSound); + bw.Write(SuperSlowMoInteriorShotSound); + bw.Write(SuperSlowMoPedStrikeSound); + bw.Write(SuperSlowMoPedStrikeSoundPresuck); + bw.Write(SuperSlowMoBigAnimalStrikeSound); + bw.Write(SuperSlowMoBigAnimalStrikeSoundPresuck); + bw.Write(SuperSlowMoSmallAnimalStrikeSound); + bw.Write(SuperSlowMoSmallAnimalStrikeSoundPresuck); + bw.Write(SuperSlowMoFireSoundPresuckTime); + bw.Write(SuperSlowMoSuppressedFireSoundPresuckTime); + bw.Write(SuperSlowMoPedStrikeSoundPresuckTime); + bw.Write(SuperSlowMoBigAnimalStrikeSoundPresuckTime); + bw.Write(SuperSlowMoSmallAnimalStrikeSoundPresuckTime); } } } @@ -12111,83 +11595,83 @@ namespace CodeWalker.GameFiles public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Version", Version.ToString()); //CW invention, not an actual field! - RelXml.StringTag(sb, indent, "SingleFire", RelXml.HashString(SingleFire)); - RelXml.StringTag(sb, indent, "SuppressedFire", RelXml.HashString(SuppressedFire)); - RelXml.StringTag(sb, indent, "RapidFire", RelXml.HashString(RapidFire)); - RelXml.StringTag(sb, indent, "Report", RelXml.HashString(Report)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.StringTag(sb, indent, "Echo", RelXml.HashString(Echo)); - RelXml.StringTag(sb, indent, "SuppressedEcho", RelXml.HashString(SuppressedEcho)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "MeleeSwipe", RelXml.HashString(MeleeSwipe)); - RelXml.StringTag(sb, indent, "MeleeCollision", RelXml.HashString(MeleeCollision)); - RelXml.StringTag(sb, indent, "MeleeHitPed", RelXml.HashString(MeleeHitPed)); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.StringTag(sb, indent, "PickUpWeapon", RelXml.HashString(PickUpWeapon)); - RelXml.ValueTag(sb, indent, "Unk19", Unk19.ToString()); - RelXml.StringTag(sb, indent, "Unk20", RelXml.HashString(Unk20)); - RelXml.StringTag(sb, indent, "Unk21", RelXml.HashString(Unk21)); - RelXml.StringTag(sb, indent, "FuelCan", RelXml.HashString(FuelCan)); - RelXml.StringTag(sb, indent, "Unk23", RelXml.HashString(Unk23)); - RelXml.StringTag(sb, indent, "InteriorFire", RelXml.HashString(InteriorFire)); - RelXml.StringTag(sb, indent, "Reload", RelXml.HashString(Reload)); - RelXml.StringTag(sb, indent, "Unk26", RelXml.HashString(Unk26)); - RelXml.StringTag(sb, indent, "Unk27", RelXml.HashString(Unk27)); - RelXml.ValueTag(sb, indent, "Unk28", Unk28.ToString()); - RelXml.ValueTag(sb, indent, "Unk29", Unk29.ToString()); - RelXml.StringTag(sb, indent, "Aim", RelXml.HashString(Aim)); - RelXml.StringTag(sb, indent, "Unk31", RelXml.HashString(Unk31)); - RelXml.StringTag(sb, indent, "Unk32", RelXml.HashString(Unk32)); - RelXml.StringTag(sb, indent, "SlowMotionFire", RelXml.HashString(SlowMotionFire)); - RelXml.StringTag(sb, indent, "StunGun", RelXml.HashString(StunGun)); + RelXml.ValueTag(sb, indent, "Version", Version.ToString()); + RelXml.StringTag(sb, indent, "FireSound", RelXml.HashString(FireSound)); + RelXml.StringTag(sb, indent, "SuppressedFireSound", RelXml.HashString(SuppressedFireSound)); + RelXml.StringTag(sb, indent, "AutoSound", RelXml.HashString(AutoSound)); + RelXml.StringTag(sb, indent, "ReportSound", RelXml.HashString(ReportSound)); + RelXml.ValueTag(sb, indent, "ReportVolumeDelta", FloatUtil.ToString(ReportVolumeDelta)); + RelXml.ValueTag(sb, indent, "ReportPredelayDelta", ReportPredelayDelta.ToString()); + RelXml.ValueTag(sb, indent, "TailEnergyValue", FloatUtil.ToString(TailEnergyValue)); + RelXml.StringTag(sb, indent, "EchoSound", RelXml.HashString(EchoSound)); + RelXml.StringTag(sb, indent, "SuppressedEchoSound", RelXml.HashString(SuppressedEchoSound)); + RelXml.StringTag(sb, indent, "ShellCasingSound", RelXml.HashString(ShellCasingSound)); + RelXml.StringTag(sb, indent, "SwipeSound", RelXml.HashString(SwipeSound)); + RelXml.StringTag(sb, indent, "GeneralStrikeSound", RelXml.HashString(GeneralStrikeSound)); + RelXml.StringTag(sb, indent, "PedStrikeSound", RelXml.HashString(PedStrikeSound)); + RelXml.StringTag(sb, indent, "HeftSound", RelXml.HashString(HeftSound)); + RelXml.StringTag(sb, indent, "PutDownSound", RelXml.HashString(PutDownSound)); + RelXml.StringTag(sb, indent, "RattleSound", RelXml.HashString(RattleSound)); + RelXml.StringTag(sb, indent, "RattleLandSound", RelXml.HashString(RattleLandSound)); + RelXml.StringTag(sb, indent, "PickupSound", RelXml.HashString(PickupSound)); + RelXml.ValueTag(sb, indent, "ShellCasing", ShellCasing.ToString()); + RelXml.StringTag(sb, indent, "SafetyOn", RelXml.HashString(SafetyOn)); + RelXml.StringTag(sb, indent, "SafetyOff", RelXml.HashString(SafetyOff)); + RelXml.StringTag(sb, indent, "SpecialWeaponSoundSet", RelXml.HashString(SpecialWeaponSoundSet)); + RelXml.StringTag(sb, indent, "BankSound", RelXml.HashString(BankSound)); + RelXml.StringTag(sb, indent, "InteriorShotSound", RelXml.HashString(InteriorShotSound)); + RelXml.StringTag(sb, indent, "ReloadSounds", RelXml.HashString(ReloadSounds)); + RelXml.StringTag(sb, indent, "IntoCoverSound", RelXml.HashString(IntoCoverSound)); + RelXml.StringTag(sb, indent, "OutOfCoverSound", RelXml.HashString(OutOfCoverSound)); + RelXml.ValueTag(sb, indent, "BulletImpactTimeFilter", BulletImpactTimeFilter.ToString()); + RelXml.ValueTag(sb, indent, "LastBulletImpactTime", LastBulletImpactTime.ToString()); + RelXml.StringTag(sb, indent, "RattleAimSound", RelXml.HashString(RattleAimSound)); + RelXml.StringTag(sb, indent, "SmallAnimalStrikeSound", RelXml.HashString(SmallAnimalStrikeSound)); + RelXml.StringTag(sb, indent, "BigAnimalStrikeSound", RelXml.HashString(BigAnimalStrikeSound)); + RelXml.StringTag(sb, indent, "SlowMoFireSound", RelXml.HashString(SlowMoFireSound)); + RelXml.StringTag(sb, indent, "HitPedSound", RelXml.HashString(HitPedSound)); if (Version >= 1) { - RelXml.StringTag(sb, indent, "Unk35", RelXml.HashString(Unk35)); - RelXml.StringTag(sb, indent, "SlowMotionSuppressedFire", RelXml.HashString(SlowMotionSuppressedFire)); - RelXml.StringTag(sb, indent, "Unk37", RelXml.HashString(Unk37)); - RelXml.StringTag(sb, indent, "SlowMotionReport", RelXml.HashString(SlowMotionReport)); - RelXml.StringTag(sb, indent, "Unk39", RelXml.HashString(Unk39)); - RelXml.StringTag(sb, indent, "Unk40", RelXml.HashString(Unk40)); - RelXml.StringTag(sb, indent, "Unk41", RelXml.HashString(Unk41)); - RelXml.StringTag(sb, indent, "Unk42", RelXml.HashString(Unk42)); - RelXml.StringTag(sb, indent, "Unk43", RelXml.HashString(Unk43)); - RelXml.StringTag(sb, indent, "Unk44", RelXml.HashString(Unk44)); - RelXml.StringTag(sb, indent, "Unk45", RelXml.HashString(Unk45)); - RelXml.StringTag(sb, indent, "Unk46", RelXml.HashString(Unk46)); - RelXml.StringTag(sb, indent, "Unk47", RelXml.HashString(Unk47)); + RelXml.StringTag(sb, indent, "SlowMoFireSoundPresuck", RelXml.HashString(SlowMoFireSoundPresuck)); + RelXml.StringTag(sb, indent, "SlowMoSuppressedFireSound", RelXml.HashString(SlowMoSuppressedFireSound)); + RelXml.StringTag(sb, indent, "SlowMoSuppressedFireSoundPresuck", RelXml.HashString(SlowMoSuppressedFireSoundPresuck)); + RelXml.StringTag(sb, indent, "SlowMoReportSound", RelXml.HashString(SlowMoReportSound)); + RelXml.StringTag(sb, indent, "SlowMoInteriorShotSound", RelXml.HashString(SlowMoInteriorShotSound)); + RelXml.StringTag(sb, indent, "SlowMoPedStrikeSound", RelXml.HashString(SlowMoPedStrikeSound)); + RelXml.StringTag(sb, indent, "SlowMoPedStrikeSoundPresuck", RelXml.HashString(SlowMoPedStrikeSoundPresuck)); + RelXml.StringTag(sb, indent, "SlowMoBigAnimalStrikeSound", RelXml.HashString(SlowMoBigAnimalStrikeSound)); + RelXml.StringTag(sb, indent, "SlowMoBigAnimalStrikeSoundPresuck", RelXml.HashString(SlowMoBigAnimalStrikeSoundPresuck)); + RelXml.StringTag(sb, indent, "SlowMoSmallAnimalStrikeSound", RelXml.HashString(SlowMoSmallAnimalStrikeSound)); + RelXml.StringTag(sb, indent, "SlowMoSmallAnimalStrikeSoundPresuck", RelXml.HashString(SlowMoSmallAnimalStrikeSoundPresuck)); + RelXml.StringTag(sb, indent, "SlowMoFireSoundPresuckTime", RelXml.HashString(SlowMoFireSoundPresuckTime)); + RelXml.StringTag(sb, indent, "SlowMoSuppressedFireSoundPresuckTime", RelXml.HashString(SlowMoSuppressedFireSoundPresuckTime)); if (Version >= 2) { - RelXml.ValueTag(sb, indent, "Unk48", Unk48.ToString()); - RelXml.ValueTag(sb, indent, "Unk49", Unk49.ToString()); - RelXml.ValueTag(sb, indent, "Unk50", Unk50.ToString()); + RelXml.ValueTag(sb, indent, "SlowMoPedStrikeSoundPresuckTime", SlowMoPedStrikeSoundPresuckTime.ToString()); + RelXml.ValueTag(sb, indent, "SlowMoBigAnimalStrikeSoundPresuckTime", SlowMoBigAnimalStrikeSoundPresuckTime.ToString()); + RelXml.ValueTag(sb, indent, "SlowMoSmallAnimalStrikeSoundPresuckTime", SlowMoSmallAnimalStrikeSoundPresuckTime.ToString()); if (Version >= 3) { - RelXml.StringTag(sb, indent, "SuperSlowMotionFire", RelXml.HashString(SuperSlowMotionFire)); - RelXml.StringTag(sb, indent, "Unk52", RelXml.HashString(Unk52)); - RelXml.StringTag(sb, indent, "SuperSlowMotionSuppressedFire", RelXml.HashString(SuperSlowMotionSuppressedFire)); - RelXml.StringTag(sb, indent, "Unk54", RelXml.HashString(Unk54)); - RelXml.StringTag(sb, indent, "SuperSlowMotionReport", RelXml.HashString(SuperSlowMotionReport)); - RelXml.StringTag(sb, indent, "Unk56", RelXml.HashString(Unk56)); - RelXml.StringTag(sb, indent, "Unk57", RelXml.HashString(Unk57)); - RelXml.StringTag(sb, indent, "Unk58", RelXml.HashString(Unk58)); - RelXml.StringTag(sb, indent, "Unk59", RelXml.HashString(Unk59)); - RelXml.StringTag(sb, indent, "Unk60", RelXml.HashString(Unk60)); - RelXml.StringTag(sb, indent, "Unk61", RelXml.HashString(Unk61)); - RelXml.StringTag(sb, indent, "Unk62", RelXml.HashString(Unk62)); - RelXml.ValueTag(sb, indent, "Unk63", Unk63.ToString()); - RelXml.ValueTag(sb, indent, "Unk64", Unk64.ToString()); - RelXml.ValueTag(sb, indent, "Unk65", Unk65.ToString()); - RelXml.ValueTag(sb, indent, "Unk66", Unk66.ToString()); - RelXml.ValueTag(sb, indent, "Unk67", Unk67.ToString()); + RelXml.StringTag(sb, indent, "SuperSlowMoFireSound", RelXml.HashString(SuperSlowMoFireSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoFireSoundPresuck", RelXml.HashString(SuperSlowMoFireSoundPresuck)); + RelXml.StringTag(sb, indent, "SuperSlowMoSuppressedFireSound", RelXml.HashString(SuperSlowMoSuppressedFireSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoSuppressedFireSoundPresuck", RelXml.HashString(SuperSlowMoSuppressedFireSoundPresuck)); + RelXml.StringTag(sb, indent, "SuperSlowMoReportSound", RelXml.HashString(SuperSlowMoReportSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoInteriorShotSound", RelXml.HashString(SuperSlowMoInteriorShotSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoPedStrikeSound", RelXml.HashString(SuperSlowMoPedStrikeSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoPedStrikeSoundPresuck", RelXml.HashString(SuperSlowMoPedStrikeSoundPresuck)); + RelXml.StringTag(sb, indent, "SuperSlowMoBigAnimalStrikeSound", RelXml.HashString(SuperSlowMoBigAnimalStrikeSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoBigAnimalStrikeSoundPresuck", RelXml.HashString(SuperSlowMoBigAnimalStrikeSoundPresuck)); + RelXml.StringTag(sb, indent, "SuperSlowMoSmallAnimalStrikeSound", RelXml.HashString(SuperSlowMoSmallAnimalStrikeSound)); + RelXml.StringTag(sb, indent, "SuperSlowMoSmallAnimalStrikeSoundPresuck", RelXml.HashString(SuperSlowMoSmallAnimalStrikeSoundPresuck)); + RelXml.ValueTag(sb, indent, "SuperSlowMoFireSoundPresuckTime", SuperSlowMoFireSoundPresuckTime.ToString()); + RelXml.ValueTag(sb, indent, "SuperSlowMoSuppressedFireSoundPresuckTime", SuperSlowMoSuppressedFireSoundPresuckTime.ToString()); + RelXml.ValueTag(sb, indent, "SuperSlowMoPedStrikeSoundPresuckTime", SuperSlowMoPedStrikeSoundPresuckTime.ToString()); + RelXml.ValueTag(sb, indent, "SuperSlowMoBigAnimalStrikeSoundPresuckTime", SuperSlowMoBigAnimalStrikeSoundPresuckTime.ToString()); + RelXml.ValueTag(sb, indent, "SuperSlowMoSmallAnimalStrikeSoundPresuckTime", SuperSlowMoSmallAnimalStrikeSoundPresuckTime.ToString()); } } } @@ -12196,389 +11680,368 @@ namespace CodeWalker.GameFiles { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Version = Xml.GetChildIntAttribute(node, "Version", "value"); - SingleFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "SingleFire")); - SuppressedFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuppressedFire")); - RapidFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "RapidFire")); - Report = XmlRel.GetHash(Xml.GetChildInnerText(node, "Report")); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildIntAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Echo = XmlRel.GetHash(Xml.GetChildInnerText(node, "Echo")); - SuppressedEcho = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuppressedEcho")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - MeleeSwipe = XmlRel.GetHash(Xml.GetChildInnerText(node, "MeleeSwipe")); - MeleeCollision = XmlRel.GetHash(Xml.GetChildInnerText(node, "MeleeCollision")); - MeleeHitPed = XmlRel.GetHash(Xml.GetChildInnerText(node, "MeleeHitPed")); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - PickUpWeapon = XmlRel.GetHash(Xml.GetChildInnerText(node, "PickUpWeapon")); - Unk19 = Xml.GetChildIntAttribute(node, "Unk19", "value"); - Unk20 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk20")); - Unk21 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk21")); - FuelCan = XmlRel.GetHash(Xml.GetChildInnerText(node, "FuelCan")); - Unk23 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk23")); - InteriorFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorFire")); - Reload = XmlRel.GetHash(Xml.GetChildInnerText(node, "Reload")); - Unk26 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk26")); - Unk27 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk27")); - Unk28 = Xml.GetChildIntAttribute(node, "Unk28", "value"); - Unk29 = Xml.GetChildIntAttribute(node, "Unk29", "value"); - Aim = XmlRel.GetHash(Xml.GetChildInnerText(node, "Aim")); - Unk31 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk31")); - Unk32 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk32")); - SlowMotionFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMotionFire")); - StunGun = XmlRel.GetHash(Xml.GetChildInnerText(node, "StunGun")); + FireSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "FireSound")); + SuppressedFireSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuppressedFireSound")); + AutoSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "AutoSound")); + ReportSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReportSound")); + ReportVolumeDelta = Xml.GetChildFloatAttribute(node, "ReportVolumeDelta", "value"); + ReportPredelayDelta = Xml.GetChildIntAttribute(node, "ReportPredelayDelta", "value"); + TailEnergyValue = Xml.GetChildFloatAttribute(node, "TailEnergyValue", "value"); + EchoSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "EchoSound")); + SuppressedEchoSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuppressedEchoSound")); + ShellCasingSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ShellCasingSound")); + SwipeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SwipeSound")); + GeneralStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "GeneralStrikeSound")); + PedStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "PedStrikeSound")); + HeftSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "HeftSound")); + PutDownSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "PutDownSound")); + RattleSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RattleSound")); + RattleLandSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RattleLandSound")); + PickupSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "PickupSound")); + ShellCasing = Xml.GetChildIntAttribute(node, "ShellCasing", "value"); + SafetyOn = XmlRel.GetHash(Xml.GetChildInnerText(node, "SafetyOn")); + SafetyOff = XmlRel.GetHash(Xml.GetChildInnerText(node, "SafetyOff")); + SpecialWeaponSoundSet = XmlRel.GetHash(Xml.GetChildInnerText(node, "SpecialWeaponSoundSet")); + BankSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankSound")); + InteriorShotSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorShotSound")); + ReloadSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReloadSounds")); + IntoCoverSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "IntoCoverSound")); + OutOfCoverSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "OutOfCoverSound")); + BulletImpactTimeFilter = Xml.GetChildIntAttribute(node, "BulletImpactTimeFilter", "value"); + LastBulletImpactTime = Xml.GetChildIntAttribute(node, "LastBulletImpactTime", "value"); + RattleAimSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RattleAimSound")); + SmallAnimalStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SmallAnimalStrikeSound")); + BigAnimalStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BigAnimalStrikeSound")); + SlowMoFireSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoFireSound")); + HitPedSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "HitPedSound")); if (Version >= 1) { - Unk35 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk35")); - SlowMotionSuppressedFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMotionSuppressedFire")); - Unk37 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk37")); - SlowMotionReport = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMotionReport")); - Unk39 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk39")); - Unk40 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk40")); - Unk41 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk41")); - Unk42 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk42")); - Unk43 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk43")); - Unk44 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk44")); - Unk45 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk45")); - Unk46 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk46")); - Unk47 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk47")); + SlowMoFireSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoFireSoundPresuck")); + SlowMoSuppressedFireSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSuppressedFireSound")); + SlowMoSuppressedFireSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSuppressedFireSoundPresuck")); + SlowMoReportSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoReportSound")); + SlowMoInteriorShotSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoInteriorShotSound")); + SlowMoPedStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoPedStrikeSound")); + SlowMoPedStrikeSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoPedStrikeSoundPresuck")); + SlowMoBigAnimalStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoBigAnimalStrikeSound")); + SlowMoBigAnimalStrikeSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoBigAnimalStrikeSoundPresuck")); + SlowMoSmallAnimalStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSmallAnimalStrikeSound")); + SlowMoSmallAnimalStrikeSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSmallAnimalStrikeSoundPresuck")); + SlowMoFireSoundPresuckTime = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoFireSoundPresuckTime")); + SlowMoSuppressedFireSoundPresuckTime = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSuppressedFireSoundPresuckTime")); if (Version >= 2) { - Unk48 = Xml.GetChildIntAttribute(node, "Unk48", "value"); - Unk49 = Xml.GetChildIntAttribute(node, "Unk49", "value"); - Unk50 = Xml.GetChildIntAttribute(node, "Unk50", "value"); + SlowMoPedStrikeSoundPresuckTime = Xml.GetChildIntAttribute(node, "SlowMoPedStrikeSoundPresuckTime", "value"); + SlowMoBigAnimalStrikeSoundPresuckTime = Xml.GetChildIntAttribute(node, "SlowMoBigAnimalStrikeSoundPresuckTime", "value"); + SlowMoSmallAnimalStrikeSoundPresuckTime = Xml.GetChildIntAttribute(node, "SlowMoSmallAnimalStrikeSoundPresuckTime", "value"); if (Version >= 3) { - SuperSlowMotionFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMotionFire")); - Unk52 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk52")); - SuperSlowMotionSuppressedFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMotionSuppressedFire")); - Unk54 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk54")); - SuperSlowMotionReport = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMotionReport")); - Unk56 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk56")); - Unk57 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk57")); - Unk58 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk58")); - Unk59 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk59")); - Unk60 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk60")); - Unk61 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk61")); - Unk62 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk62")); - Unk63 = Xml.GetChildIntAttribute(node, "Unk63", "value"); - Unk64 = Xml.GetChildIntAttribute(node, "Unk64", "value"); - Unk65 = Xml.GetChildIntAttribute(node, "Unk65", "value"); - Unk66 = Xml.GetChildIntAttribute(node, "Unk66", "value"); - Unk67 = Xml.GetChildIntAttribute(node, "Unk67", "value"); + SuperSlowMoFireSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoFireSound")); + SuperSlowMoFireSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoFireSoundPresuck")); + SuperSlowMoSuppressedFireSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoSuppressedFireSound")); + SuperSlowMoSuppressedFireSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoSuppressedFireSoundPresuck")); + SuperSlowMoReportSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoReportSound")); + SuperSlowMoInteriorShotSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoInteriorShotSound")); + SuperSlowMoPedStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoPedStrikeSound")); + SuperSlowMoPedStrikeSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoPedStrikeSoundPresuck")); + SuperSlowMoBigAnimalStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoBigAnimalStrikeSound")); + SuperSlowMoBigAnimalStrikeSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoBigAnimalStrikeSoundPresuck")); + SuperSlowMoSmallAnimalStrikeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoSmallAnimalStrikeSound")); + SuperSlowMoSmallAnimalStrikeSoundPresuck = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuperSlowMoSmallAnimalStrikeSoundPresuck")); + SuperSlowMoFireSoundPresuckTime = Xml.GetChildIntAttribute(node, "SuperSlowMoFireSoundPresuckTime", "value"); + SuperSlowMoSuppressedFireSoundPresuckTime = Xml.GetChildIntAttribute(node, "SuperSlowMoSuppressedFireSoundPresuckTime", "value"); + SuperSlowMoPedStrikeSoundPresuckTime = Xml.GetChildIntAttribute(node, "SuperSlowMoPedStrikeSoundPresuckTime", "value"); + SuperSlowMoBigAnimalStrikeSoundPresuckTime = Xml.GetChildIntAttribute(node, "SuperSlowMoBigAnimalStrikeSoundPresuckTime", "value"); + SuperSlowMoSmallAnimalStrikeSoundPresuckTime = Xml.GetChildIntAttribute(node, "SuperSlowMoSmallAnimalStrikeSoundPresuckTime", "value"); } } } } public override MetaHash[] GetSoundHashes() { - return new[] { SingleFire, SuppressedFire, RapidFire, Report, Echo, SuppressedEcho, Unk10, MeleeSwipe, MeleeCollision, MeleeHitPed, Unk14, Unk15, Unk16, Unk17, PickUpWeapon, - Unk20, Unk21, FuelCan, Unk23, InteriorFire, Reload, Unk26, Unk27, Aim, Unk31, Unk32, SlowMotionFire, StunGun, Unk35, SlowMotionSuppressedFire, Unk37, SlowMotionReport, - Unk39, Unk40, Unk41, Unk42, Unk43, Unk44, Unk45, Unk46, Unk47, SuperSlowMotionFire, Unk52, SuperSlowMotionSuppressedFire, Unk54, SuperSlowMotionReport, Unk56, Unk57, Unk58, Unk59, Unk60, Unk61, Unk62 }; + return new[] { FireSound, SuppressedFireSound, AutoSound, ReportSound, EchoSound, SuppressedEchoSound, ShellCasingSound, SwipeSound, GeneralStrikeSound, PedStrikeSound, HeftSound, PutDownSound, RattleSound, RattleLandSound, PickupSound, + SafetyOn, SafetyOff, SpecialWeaponSoundSet, BankSound, InteriorShotSound, ReloadSounds, IntoCoverSound, OutOfCoverSound, RattleAimSound, SmallAnimalStrikeSound, BigAnimalStrikeSound, SlowMoFireSound, HitPedSound, SlowMoFireSoundPresuck, SlowMoSuppressedFireSound, SlowMoSuppressedFireSoundPresuck, SlowMoReportSound, + SlowMoInteriorShotSound, SlowMoPedStrikeSound, SlowMoPedStrikeSoundPresuck, SlowMoBigAnimalStrikeSound, SlowMoBigAnimalStrikeSoundPresuck, SlowMoSmallAnimalStrikeSound, SlowMoSmallAnimalStrikeSoundPresuck, SlowMoFireSoundPresuckTime, SlowMoSuppressedFireSoundPresuckTime, SuperSlowMoFireSound, SuperSlowMoFireSoundPresuck, SuperSlowMoSuppressedFireSound, SuperSlowMoSuppressedFireSoundPresuck, SuperSlowMoReportSound, SuperSlowMoInteriorShotSound, SuperSlowMoPedStrikeSound, SuperSlowMoPedStrikeSoundPresuck, SuperSlowMoBigAnimalStrikeSound, SuperSlowMoBigAnimalStrikeSoundPresuck, SuperSlowMoSmallAnimalStrikeSound, SuperSlowMoSmallAnimalStrikeSoundPresuck }; } } - [TC(typeof(EXP))] public class Dat151Explosion : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ExplosionAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Main { get; set; } - public MetaHash Debris { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public float Unk08 { get; set; } - public MetaHash SlowMotion { get; set; } - public MetaHash Unk10 { get; set; } - public int Unk11 { get; set; } - public int Unk12 { get; set; } + public MetaHash ExplosionSound { get; set; } + public MetaHash DebrisSound { get; set; } + public float DeafeningVolume { get; set; } + public float DebrisTimeScale { get; set; } + public float DebrisVolume { get; set; } + public float ShockwaveIntensity { get; set; } + public float ShockwaveDelay { get; set; } + public MetaHash SlowMoExplosionSound { get; set; } + public MetaHash SlowMoExplosionPreSuckSound { get; set; } + public int SlowMoExplosionPreSuckSoundTime { get; set; } + public uint SlowMoExplosionPreSuckMixerScene { get; set; } - public Dat151Explosion(RelFile rel) : base(rel) + public Dat151ExplosionAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Explosion; + Type = Dat151RelType.ExplosionAudioSettings; TypeID = (byte)Type; } - public Dat151Explosion(RelData d, BinaryReader br) : base(d, br) + public Dat151ExplosionAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Flags = br.ReadUInt32();//flags - Main = br.ReadUInt32();//hash - Debris = br.ReadUInt32();//hash - Unk04 = br.ReadSingle();//float - Unk05 = br.ReadSingle();//float - Unk06 = br.ReadSingle();//float - Unk07 = br.ReadSingle();//float - Unk08 = br.ReadSingle();//float - SlowMotion = br.ReadUInt32();//hash - Unk10 = br.ReadUInt32();//hash - Unk11 = br.ReadInt32();//0 - Unk12 = br.ReadInt32();//0 - - if (Unk11 != 0) - { } - if (Unk12 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Flags = br.ReadUInt32(); + ExplosionSound = br.ReadUInt32(); + DebrisSound = br.ReadUInt32(); + DeafeningVolume = br.ReadSingle(); + DebrisTimeScale = br.ReadSingle(); + DebrisVolume = br.ReadSingle(); + ShockwaveIntensity = br.ReadSingle(); + ShockwaveDelay = br.ReadSingle(); + SlowMoExplosionSound = br.ReadUInt32(); + SlowMoExplosionPreSuckSound = br.ReadUInt32(); + SlowMoExplosionPreSuckSoundTime = br.ReadInt32(); + SlowMoExplosionPreSuckMixerScene = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Flags);//flags - bw.Write(Main);//hash - bw.Write(Debris);//hash - bw.Write(Unk04);//float - bw.Write(Unk05);//float - bw.Write(Unk06);//float - bw.Write(Unk07);//float - bw.Write(Unk08);//float - bw.Write(SlowMotion);//hash - bw.Write(Unk10);//hash - bw.Write(Unk11);//0 - bw.Write(Unk12);//0 + bw.Write(Flags); + bw.Write(ExplosionSound); + bw.Write(DebrisSound); + bw.Write(DeafeningVolume); + bw.Write(DebrisTimeScale); + bw.Write(DebrisVolume); + bw.Write(ShockwaveIntensity); + bw.Write(ShockwaveDelay); + bw.Write(SlowMoExplosionSound); + bw.Write(SlowMoExplosionPreSuckSound); + bw.Write(SlowMoExplosionPreSuckSoundTime); + bw.Write(SlowMoExplosionPreSuckMixerScene); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "Main", RelXml.HashString(Main)); - RelXml.StringTag(sb, indent, "Debris", RelXml.HashString(Debris)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.StringTag(sb, indent, "SlowMotion", RelXml.HashString(SlowMotion)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); + RelXml.StringTag(sb, indent, "ExplosionSound", RelXml.HashString(ExplosionSound)); + RelXml.StringTag(sb, indent, "DebrisSound", RelXml.HashString(DebrisSound)); + RelXml.ValueTag(sb, indent, "DeafeningVolume", FloatUtil.ToString(DeafeningVolume)); + RelXml.ValueTag(sb, indent, "DebrisTimeScale", FloatUtil.ToString(DebrisTimeScale)); + RelXml.ValueTag(sb, indent, "DebrisVolume", FloatUtil.ToString(DebrisVolume)); + RelXml.ValueTag(sb, indent, "ShockwaveIntensity", FloatUtil.ToString(ShockwaveIntensity)); + RelXml.ValueTag(sb, indent, "ShockwaveDelay", FloatUtil.ToString(ShockwaveDelay)); + RelXml.StringTag(sb, indent, "SlowMoExplosionSound", RelXml.HashString(SlowMoExplosionSound)); + RelXml.StringTag(sb, indent, "SlowMoExplosionPreSuckSound", RelXml.HashString(SlowMoExplosionPreSuckSound)); + RelXml.ValueTag(sb, indent, "SlowMoExplosionPreSuckSoundTime", SlowMoExplosionPreSuckSoundTime.ToString()); + RelXml.ValueTag(sb, indent, "SlowMoExplosionPreSuckMixerScene", SlowMoExplosionPreSuckMixerScene.ToString()); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Main = XmlRel.GetHash(Xml.GetChildInnerText(node, "Main")); - Debris = XmlRel.GetHash(Xml.GetChildInnerText(node, "Debris")); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - SlowMotion = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMotion")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); + ExplosionSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExplosionSound")); + DebrisSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DebrisSound")); + DeafeningVolume = Xml.GetChildFloatAttribute(node, "DeafeningVolume", "value"); + DebrisTimeScale = Xml.GetChildFloatAttribute(node, "DebrisTimeScale", "value"); + DebrisVolume = Xml.GetChildFloatAttribute(node, "DebrisVolume", "value"); + ShockwaveIntensity = Xml.GetChildFloatAttribute(node, "ShockwaveIntensity", "value"); + ShockwaveDelay = Xml.GetChildFloatAttribute(node, "ShockwaveDelay", "value"); + SlowMoExplosionSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoExplosionSound")); + SlowMoExplosionPreSuckSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoExplosionPreSuckSound")); + SlowMoExplosionPreSuckSoundTime = Xml.GetChildIntAttribute(node, "SlowMoExplosionPreSuckSoundTime", "value"); + SlowMoExplosionPreSuckMixerScene = Xml.GetChildUIntAttribute(node, "SlowMoExplosionPreSuckMixerScene", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { Main, Debris, SlowMotion, Unk10 }; + return new[] { ExplosionSound, DebrisSound, SlowMoExplosionSound, SlowMoExplosionPreSuckSound }; } } - [TC(typeof(EXP))] public class Dat151PedVoiceGroupItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151PedVoiceGroupsItem : IMetaXmlItem { - public MetaHash Name { get; set; } - public FlagsUint Unk1 { get; set; } - public FlagsUint Unk2 { get; set; } + public MetaHash VoiceName { get; set; } + public FlagsUint ReferenceCount { get; set; } + public FlagsUint RunningTab { get; set; } - public Dat151PedVoiceGroupItem() + public Dat151PedVoiceGroupsItem() { } - public Dat151PedVoiceGroupItem(BinaryReader br) + public Dat151PedVoiceGroupsItem(BinaryReader br) { - Name = br.ReadUInt32(); - Unk1 = br.ReadUInt32(); - Unk2 = br.ReadUInt32(); - - if (Unk1 != 0) - { }//no hit - if (Unk2 != 0) - { }//no hit + VoiceName = br.ReadUInt32(); + ReferenceCount = br.ReadUInt32(); + RunningTab = br.ReadUInt32(); } public void Write(BinaryWriter bw) { - bw.Write(Name); - bw.Write(Unk1); - bw.Write(Unk2); + bw.Write(VoiceName); + bw.Write(ReferenceCount); + bw.Write(RunningTab); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); - RelXml.ValueTag(sb, indent, "Unk1", Unk1.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk2", Unk2.Value.ToString()); + RelXml.StringTag(sb, indent, "VoiceName", RelXml.HashString(VoiceName)); + RelXml.ValueTag(sb, indent, "ReferenceCount", ReferenceCount.Value.ToString()); + RelXml.ValueTag(sb, indent, "RunningTab", RunningTab.Value.ToString()); } public void ReadXml(XmlNode node) { - Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); - Unk1 = Xml.GetChildUIntAttribute(node, "Unk1", "value"); - Unk2 = Xml.GetChildUIntAttribute(node, "Unk2", "value"); + VoiceName = XmlRel.GetHash(Xml.GetChildInnerText(node, "VoiceName")); + ReferenceCount = Xml.GetChildUIntAttribute(node, "ReferenceCount", "value"); + RunningTab = Xml.GetChildUIntAttribute(node, "RunningTab", "value"); } public override string ToString() { - return Name.ToString() + ", " + Unk1.Value.ToString() + ", " + Unk2.Value.ToString(); + return VoiceName.ToString() + ", " + ReferenceCount.Value.ToString() + ", " + RunningTab.Value.ToString(); } } - [TC(typeof(EXP))] public class Dat151PedVoiceGroup : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151PedVoiceGroups : Dat151RelData { - public FlagsUint Unk00 { get; set; }//flags? - public byte Unk01 { get; set; } = 94; - public byte Unk02 { get; set; } = 57; - public byte Unk03 { get; set; } = 245; - public byte FullCount { get; set; } - public Dat151PedVoiceGroupItem[] Full { get; set; } - public byte MiniCount { get; set; } - public Dat151PedVoiceGroupItem[] Mini { get; set; } - public byte UnkItemsCount { get; set; } - public Dat151PedVoiceGroupItem[] UnkItems { get; set; } - public byte Unk07 { get; set; } //item count4? (=0) + public byte PVGType { get; set; } + public byte PVGBits { get; set; } + public byte VoicePriority { get; set; } + public MetaHash RingtoneSounds { get; set; } + public byte PrimaryVoicesCount { get; set; } + public Dat151PedVoiceGroupsItem[] PrimaryVoices { get; set; } + public byte MiniVoicesCount { get; set; } + public Dat151PedVoiceGroupsItem[] MiniVoices { get; set; } + public byte GangVoicesCount { get; set; } + public Dat151PedVoiceGroupsItem[] GangVoices { get; set; } + public byte BackupPVGs { get; set; } - - public Dat151PedVoiceGroup(RelFile rel) : base(rel) + public Dat151PedVoiceGroups(RelFile rel) : base(rel) { - Type = Dat151RelType.PedVoiceGroup; + Type = Dat151RelType.PedVoiceGroups; TypeID = (byte)Type; } - public Dat151PedVoiceGroup(RelData d, BinaryReader br) : base(d, br) + public Dat151PedVoiceGroups(RelData d, BinaryReader br) : base(d, br) { - Unk00 = br.ReadUInt32();//flags? - Unk01 = br.ReadByte();//94 - Unk02 = br.ReadByte();//57 - Unk03 = br.ReadByte();//245 + PVGType = br.ReadByte(); + PVGBits = br.ReadByte(); + VoicePriority = br.ReadByte(); + RingtoneSounds = br.ReadUInt32(); - FullCount = br.ReadByte(); - Full = new Dat151PedVoiceGroupItem[FullCount]; - for (int i = 0; i < FullCount; i++) + PrimaryVoicesCount = br.ReadByte(); + PrimaryVoices = new Dat151PedVoiceGroupsItem[PrimaryVoicesCount]; + for (int i = 0; i < PrimaryVoicesCount; i++) { - Full[i] = new Dat151PedVoiceGroupItem(br); + PrimaryVoices[i] = new Dat151PedVoiceGroupsItem(br); } - MiniCount = br.ReadByte(); - Mini = new Dat151PedVoiceGroupItem[MiniCount]; - for (int i = 0; i < MiniCount; i++) + MiniVoicesCount = br.ReadByte(); + MiniVoices = new Dat151PedVoiceGroupsItem[MiniVoicesCount]; + for (int i = 0; i < MiniVoicesCount; i++) { - Mini[i] = new Dat151PedVoiceGroupItem(br); + MiniVoices[i] = new Dat151PedVoiceGroupsItem(br); } - UnkItemsCount = br.ReadByte(); - UnkItems = new Dat151PedVoiceGroupItem[UnkItemsCount]; - for (int i = 0; i < UnkItemsCount; i++) + GangVoicesCount = br.ReadByte(); + GangVoices = new Dat151PedVoiceGroupsItem[GangVoicesCount]; + for (int i = 0; i < GangVoicesCount; i++) { - UnkItems[i] = new Dat151PedVoiceGroupItem(br); + GangVoices[i] = new Dat151PedVoiceGroupsItem(br); } - Unk07 = br.ReadByte(); - //Items4 = new UnkStruct[Unk07]; - //for (int i = 0; i < Unk07; i++) - //{ - // Items4[i] = new UnkStruct(br); - //} - - - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - //if (Unk06 != 0) - //{ } - //if (Unk04 != 0) - //{ } - + BackupPVGs = br.ReadByte(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk00);//flags? - bw.Write(Unk01);//94 - bw.Write(Unk02);//57 - bw.Write(Unk03);//245 - bw.Write(FullCount); - for (int i = 0; i < FullCount; i++) + bw.Write(PVGType); + bw.Write(PVGBits); + bw.Write(VoicePriority); + bw.Write(RingtoneSounds); + bw.Write(PrimaryVoicesCount); + for (int i = 0; i < PrimaryVoicesCount; i++) { - Full[i].Write(bw); + PrimaryVoices[i].Write(bw); } - bw.Write(MiniCount); - for (int i = 0; i < MiniCount; i++) + bw.Write(MiniVoicesCount); + for (int i = 0; i < MiniVoicesCount; i++) { - Mini[i].Write(bw); + MiniVoices[i].Write(bw); } - bw.Write(UnkItemsCount); - for (int i = 0; i < UnkItemsCount; i++) + bw.Write(GangVoicesCount); + for (int i = 0; i < GangVoicesCount; i++) { - UnkItems[i].Write(bw); + GangVoices[i].Write(bw); } - bw.Write(Unk07); + bw.Write(BackupPVGs); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk00", "0x" + Unk00.Hex); - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.WriteItemArray(sb, Full, indent, "Full"); - RelXml.WriteItemArray(sb, Mini, indent, "Mini"); - RelXml.WriteItemArray(sb, UnkItems, indent, "UnkItems"); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); + RelXml.ValueTag(sb, indent, "PVGType", PVGType.ToString()); + RelXml.ValueTag(sb, indent, "PVGBits", PVGBits.ToString()); + RelXml.ValueTag(sb, indent, "VoicePriority", VoicePriority.ToString()); + RelXml.StringTag(sb, indent, "RingtoneSounds", RelXml.HashString(RingtoneSounds)); + RelXml.WriteItemArray(sb, PrimaryVoices, indent, "PrimaryVoices"); + RelXml.WriteItemArray(sb, MiniVoices, indent, "MiniVoices"); + RelXml.WriteItemArray(sb, GangVoices, indent, "GangVoices"); + RelXml.ValueTag(sb, indent, "BackupPVGs", BackupPVGs.ToString()); } public override void ReadXml(XmlNode node) { - Unk00 = Xml.GetChildUIntAttribute(node, "Unk00", "value"); - Unk01 = (byte)Xml.GetChildUIntAttribute(node, "Unk01", "value"); - Unk02 = (byte)Xml.GetChildUIntAttribute(node, "Unk02", "value"); - Unk03 = (byte)Xml.GetChildUIntAttribute(node, "Unk03", "value"); - Full = XmlRel.ReadItemArray(node, "Full"); - FullCount = (byte)(Full?.Length ?? 0); - Mini = XmlRel.ReadItemArray(node, "Mini"); - MiniCount = (byte)(Mini?.Length ?? 0); - UnkItems = XmlRel.ReadItemArray(node, "UnkItems"); - UnkItemsCount = (byte)(UnkItems?.Length ?? 0); - Unk07 = (byte)Xml.GetChildUIntAttribute(node, "Unk07", "value"); + PVGType = (byte)Xml.GetChildUIntAttribute(node, "PVGType", "value"); + PVGBits = (byte)Xml.GetChildUIntAttribute(node, "PVGBits", "value"); + VoicePriority = (byte)Xml.GetChildUIntAttribute(node, "VoicePriority", "value"); + RingtoneSounds = XmlRel.GetHash(Xml.GetChildInnerText(node, "RingtoneSounds")); + PrimaryVoices = XmlRel.ReadItemArray(node, "PrimaryVoices"); + PrimaryVoicesCount = (byte)(PrimaryVoices?.Length ?? 0); + MiniVoices = XmlRel.ReadItemArray(node, "MiniVoices"); + MiniVoicesCount = (byte)(MiniVoices?.Length ?? 0); + GangVoices = XmlRel.ReadItemArray(node, "GangVoices"); + GangVoicesCount = (byte)(GangVoices?.Length ?? 0); + BackupPVGs = (byte)Xml.GetChildUIntAttribute(node, "BackupPVGs", "value"); } public override MetaHash[] GetSpeechHashes() { var list = new List(); - if (Full != null) + if (PrimaryVoices != null) { - foreach (var item in Full) + foreach (var item in PrimaryVoices) { - list.Add(item.Name); + list.Add(item.VoiceName); } } - if (Mini != null) + if (MiniVoices != null) { - foreach (var item in Mini) + foreach (var item in MiniVoices) { - list.Add(item.Name); + list.Add(item.VoiceName); } } - if (UnkItems != null) + if (GangVoices != null) { - foreach (var item in UnkItems) + foreach (var item in GangVoices) { - list.Add(item.Name); + list.Add(item.VoiceName); } } return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151EntityEmitter : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151EntityEmitter : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash ChildSound { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public float Unk08 { get; set; } - public MetaHash Unk09 { get; set; }//always 0 - public int Unk10 { get; set; } - public float Unk11 { get; set; } + public MetaHash Sound { get; set; } + public float MaxDistance { get; set; } + public float BusinessHoursProb { get; set; } + public float EveningProb { get; set; } + public float NightProb { get; set; } + public float ConeInnerAngle { get; set; } + public float ConeOuterAngle { get; set; } + public float ConeMaxAtten { get; set; } + public MetaHash StopAfterLoudSound { get; set; } + public byte MaxPathDepth { get; set; } + public byte padding00 { get; set; } + public short padding01 { get; set; } + public float BrokenHealth { get; set; } public Dat151EntityEmitter(RelFile rel) : base(rel) { @@ -12588,1008 +12051,1000 @@ namespace CodeWalker.GameFiles public Dat151EntityEmitter(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - ChildSound = br.ReadUInt32(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadInt32(); - Unk11 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Sound = br.ReadUInt32(); + MaxDistance = br.ReadSingle(); + BusinessHoursProb = br.ReadSingle(); + EveningProb = br.ReadSingle(); + NightProb = br.ReadSingle(); + ConeInnerAngle = br.ReadSingle(); + ConeOuterAngle = br.ReadSingle(); + ConeMaxAtten = br.ReadSingle(); + StopAfterLoudSound = br.ReadUInt32(); + MaxPathDepth = br.ReadByte(); + padding00 = br.ReadByte(); + padding01 = br.ReadInt16(); + BrokenHealth = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(ChildSound); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); + bw.Write(Sound); + bw.Write(MaxDistance); + bw.Write(BusinessHoursProb); + bw.Write(EveningProb); + bw.Write(NightProb); + bw.Write(ConeInnerAngle); + bw.Write(ConeOuterAngle); + bw.Write(ConeMaxAtten); + bw.Write(StopAfterLoudSound); + bw.Write(MaxPathDepth); + bw.Write(padding00); + bw.Write(padding01); + bw.Write(BrokenHealth); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "ChildSound", RelXml.HashString(ChildSound)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", FloatUtil.ToString(Unk11)); + RelXml.StringTag(sb, indent, "Sound", RelXml.HashString(Sound)); + RelXml.ValueTag(sb, indent, "MaxDistance", FloatUtil.ToString(MaxDistance)); + RelXml.ValueTag(sb, indent, "BusinessHoursProb", FloatUtil.ToString(BusinessHoursProb)); + RelXml.ValueTag(sb, indent, "EveningProb", FloatUtil.ToString(EveningProb)); + RelXml.ValueTag(sb, indent, "NightProb", FloatUtil.ToString(NightProb)); + RelXml.ValueTag(sb, indent, "ConeInnerAngle", FloatUtil.ToString(ConeInnerAngle)); + RelXml.ValueTag(sb, indent, "ConeOuterAngle", FloatUtil.ToString(ConeOuterAngle)); + RelXml.ValueTag(sb, indent, "ConeMaxAtten", FloatUtil.ToString(ConeMaxAtten)); + RelXml.StringTag(sb, indent, "StopAfterLoudSound", RelXml.HashString(StopAfterLoudSound)); + RelXml.ValueTag(sb, indent, "MaxPathDepth", MaxPathDepth.ToString()); + RelXml.ValueTag(sb, indent, "BrokenHealth", FloatUtil.ToString(BrokenHealth)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - ChildSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound")); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildFloatAttribute(node, "Unk11", "value"); + Sound = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sound")); + MaxDistance = Xml.GetChildFloatAttribute(node, "MaxDistance", "value"); + BusinessHoursProb = Xml.GetChildFloatAttribute(node, "BusinessHoursProb", "value"); + EveningProb = Xml.GetChildFloatAttribute(node, "EveningProb", "value"); + NightProb = Xml.GetChildFloatAttribute(node, "NightProb", "value"); + ConeInnerAngle = Xml.GetChildFloatAttribute(node, "ConeInnerAngle", "value"); + ConeOuterAngle = Xml.GetChildFloatAttribute(node, "ConeOuterAngle", "value"); + ConeMaxAtten = Xml.GetChildFloatAttribute(node, "ConeMaxAtten", "value"); + StopAfterLoudSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "StopAfterLoudSound")); + MaxPathDepth = (byte)Xml.GetChildUIntAttribute(node, "MaxPathDepth", "value"); + BrokenHealth = Xml.GetChildFloatAttribute(node, "BrokenHealth", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { ChildSound }; + return new[] { Sound }; } } - [TC(typeof(EXP))] public class Dat151Boat : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151BoatAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Engine { get; set; } - public MetaHash EngineVolume { get; set; } - public MetaHash EnginePitch { get; set; } - public MetaHash Engine2 { get; set; } - public MetaHash Engine2Volume { get; set; } + public MetaHash Engine1Loop { get; set; } + public MetaHash Engine1Vol { get; set; } + public MetaHash Engine1Pitch { get; set; } + public MetaHash Engine2Loop { get; set; } + public MetaHash Engine2Vol { get; set; } public MetaHash Engine2Pitch { get; set; } - public MetaHash EngineLowReso { get; set; } - public MetaHash EngineLowResoVolume { get; set; } - public MetaHash EngineLowResoPitch { get; set; } - public MetaHash EngineIdleLoop { get; set; } - public MetaHash EngineIdleVolume { get; set; } - public MetaHash EngineIdlePitch { get; set; } - public MetaHash WaterTurbulence { get; set; } - public MetaHash WaterTurbulenceVolume { get; set; } - public MetaHash Unk15 { get; set; }//doesn't seem to match anything? always 0x6B3DC4A2 - public MetaHash Unk16 { get; set; } - public MetaHash Unk17 { get; set; } - public MetaHash Unk18 { get; set; } - public MetaHash PoliceScannerParams { get; set; }//scanner params - public FlagsUint RadioFlags { get; set; } - public MetaHash Horn { get; set; } - public MetaHash Ignition { get; set; } - public MetaHash Shutdown { get; set; } - public MetaHash Unk24 { get; set; }//0 - public MetaHash EngineSubmix { get; set; }//engine submix - public MetaHash EngineSubmixPreset { get; set; }//engine submix preset - public MetaHash ExhaustSubmix { get; set; }//exhaust submix - public MetaHash ExhaustSubmixPreset { get; set; }//exhaust submix preset - public MetaHash Collision { get; set; } - public MetaHash Unk30 { get; set; }//engine environment - public MetaHash Unk31 { get; set; }//exhaust environment? - public MetaHash WaveHitMedium { get; set; }//wave hit (medium?) - public MetaHash Unk33 { get; set; }//0 - public MetaHash IdleHullSlap { get; set; } - public MetaHash Unk35 { get; set; }//curve - public MetaHash EngineGranular { get; set; }//granular engine - public MetaHash BankSpray { get; set; } - public MetaHash Ignition2 { get; set; } - public MetaHash Startup { get; set; }//startup - public MetaHash SubTurnVolume { get; set; }//curve - public MetaHash SubTurn { get; set; } - public MetaHash Unk42 { get; set; }//constant_one (curve) - public MetaHash Unk43 { get; set; }//curve - public MetaHash Unk44 { get; set; }//curve - public MetaHash SandSkid { get; set; } - public float Unk46 { get; set; } - public float Unk47 { get; set; } - public float Unk48 { get; set; } - public MetaHash Unk49 { get; set; } - public MetaHash Hull { get; set; } - public MetaHash Cloth { get; set; } - public MetaHash Fire { get; set; } + public MetaHash LowResoLoop { get; set; } + public MetaHash LowResoLoopVol { get; set; } + public MetaHash LowResoPitch { get; set; } + public MetaHash ResoLoop { get; set; } + public MetaHash ResoLoopVol { get; set; } + public MetaHash ResoPitch { get; set; } + public MetaHash WaterTurbulance { get; set; } + public MetaHash WaterTurbulanceVol { get; set; } + public MetaHash WaterTurbulancePitch { get; set; } + public MetaHash ScannerMake { get; set; } + public MetaHash ScannerModel { get; set; } + public MetaHash ScannerCategory { get; set; } + public MetaHash ScannerVehicleSettings { get; set; } + public byte RadioType { get; set; } + public byte RadioGenre { get; set; } + public short padding00 { get; set; } + public MetaHash HornLoop { get; set; } + public MetaHash IgnitionOneShot { get; set; } + public MetaHash ShutdownOneShot { get; set; } + public MetaHash EngineVolPostSubmix { get; set; } + public MetaHash ExhaustVolPostSubmix { get; set; } + public MetaHash EngineSynthDef { get; set; } + public MetaHash EngineSynthPreset { get; set; } + public MetaHash ExhaustSynthDef { get; set; } + public MetaHash ExhaustSynthPreset { get; set; } + public MetaHash VehicleCollisions { get; set; } + public MetaHash EngineSubmixVoice { get; set; } + public MetaHash ExhaustSubmixVoice { get; set; } + public MetaHash WaveHitSound { get; set; } + public MetaHash LeftWaterSound { get; set; } + public MetaHash IdleHullSlapLoop { get; set; } + public MetaHash IdleHullSlapSpeedToVol { get; set; } + public MetaHash GranularEngine { get; set; } + public MetaHash BankSpraySound { get; set; } + public MetaHash IgnitionLoop { get; set; } + public MetaHash EngineStartUp { get; set; } + public MetaHash SubTurningEnginePitchModifier { get; set; } + public MetaHash SubTurningSweetenerSound { get; set; } + public MetaHash RevsToSweetenerVolume { get; set; } + public MetaHash TurningToSweetenerVolume { get; set; } + public MetaHash TurningToSweetenerPitch { get; set; } + public MetaHash DryLandScrape { get; set; } + public float MaxRollOffScalePlayer { get; set; } + public float MaxRollOffScaleNPC { get; set; } + public float Openness { get; set; } + public MetaHash DryLandHardScrape { get; set; } + public MetaHash DryLandHardImpact { get; set; } + public MetaHash WindClothSound { get; set; } public MetaHash DoorOpen { get; set; } public MetaHash DoorClose { get; set; } - public MetaHash Unk55 { get; set; } - public MetaHash Unk56 { get; set; } - public MetaHash Unk57 { get; set; } - public MetaHash Unk58 { get; set; } - public MetaHash SubCreaks { get; set; } - public MetaHash WaveHitBigAir { get; set; }//wave hit (big air?) - public float Unk61 { get; set; } - public MetaHash Unk62 { get; set; } - public MetaHash Unk63 { get; set; } + public MetaHash DoorLimit { get; set; } + public MetaHash DoorStartClose { get; set; } + public MetaHash SubExtrasSound { get; set; } + public MetaHash SFXBankSound { get; set; } + public MetaHash SubmersibleCreaksSound { get; set; } + public MetaHash WaveHitBigAirSound { get; set; } + public float BigAirMinTime { get; set; } + public MetaHash VehicleRainSound { get; set; } + public MetaHash VehicleRainSoundInterior { get; set; } - public Dat151Boat(RelFile rel) : base(rel) + public Dat151BoatAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Boat; + Type = Dat151RelType.BoatAudioSettings; TypeID = (byte)Type; } - public Dat151Boat(RelData d, BinaryReader br) : base(d, br) + public Dat151BoatAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Engine = br.ReadUInt32(); - EngineVolume = br.ReadUInt32(); - EnginePitch = br.ReadUInt32(); - Engine2 = br.ReadUInt32(); - Engine2Volume = br.ReadUInt32(); + Engine1Loop = br.ReadUInt32(); + Engine1Vol = br.ReadUInt32(); + Engine1Pitch = br.ReadUInt32(); + Engine2Loop = br.ReadUInt32(); + Engine2Vol = br.ReadUInt32(); Engine2Pitch = br.ReadUInt32(); - EngineLowReso = br.ReadUInt32(); - EngineLowResoVolume = br.ReadUInt32(); - EngineLowResoPitch = br.ReadUInt32(); - EngineIdleLoop = br.ReadUInt32(); - EngineIdleVolume = br.ReadUInt32(); - EngineIdlePitch = br.ReadUInt32(); - WaterTurbulence = br.ReadUInt32(); - WaterTurbulenceVolume = br.ReadUInt32(); - Unk15 = br.ReadUInt32(); - Unk16 = br.ReadUInt32(); - Unk17 = br.ReadUInt32(); - Unk18 = br.ReadUInt32(); - PoliceScannerParams = br.ReadUInt32(); - RadioFlags = br.ReadUInt32(); - Horn = br.ReadUInt32(); - Ignition = br.ReadUInt32(); - Shutdown = br.ReadUInt32(); - Unk24 = br.ReadUInt32(); - EngineSubmix = br.ReadUInt32(); - EngineSubmixPreset = br.ReadUInt32(); - ExhaustSubmix = br.ReadUInt32(); - ExhaustSubmixPreset = br.ReadUInt32(); - Collision = br.ReadUInt32(); - Unk30 = br.ReadUInt32(); - Unk31 = br.ReadUInt32(); - WaveHitMedium = br.ReadUInt32(); - Unk33 = br.ReadUInt32(); - IdleHullSlap = br.ReadUInt32(); - Unk35 = br.ReadUInt32(); - EngineGranular = br.ReadUInt32(); - BankSpray = br.ReadUInt32(); - Ignition2 = br.ReadUInt32(); - Startup = br.ReadUInt32(); - SubTurnVolume = br.ReadUInt32(); - SubTurn = br.ReadUInt32(); - Unk42 = br.ReadUInt32(); - Unk43 = br.ReadUInt32(); - Unk44 = br.ReadUInt32(); - SandSkid = br.ReadUInt32(); - Unk46 = br.ReadSingle(); - Unk47 = br.ReadSingle(); - Unk48 = br.ReadSingle(); - Unk49 = br.ReadUInt32(); - Hull = br.ReadUInt32(); - Cloth = br.ReadUInt32(); - Fire = br.ReadUInt32(); + LowResoLoop = br.ReadUInt32(); + LowResoLoopVol = br.ReadUInt32(); + LowResoPitch = br.ReadUInt32(); + ResoLoop = br.ReadUInt32(); + ResoLoopVol = br.ReadUInt32(); + ResoPitch = br.ReadUInt32(); + WaterTurbulance = br.ReadUInt32(); + WaterTurbulanceVol = br.ReadUInt32(); + WaterTurbulancePitch = br.ReadUInt32(); + ScannerMake = br.ReadUInt32(); + ScannerModel = br.ReadUInt32(); + ScannerCategory = br.ReadUInt32(); + ScannerVehicleSettings = br.ReadUInt32(); + RadioType = br.ReadByte(); + RadioGenre = br.ReadByte(); + padding00 = br.ReadInt16(); + HornLoop = br.ReadUInt32(); + IgnitionOneShot = br.ReadUInt32(); + ShutdownOneShot = br.ReadUInt32(); + EngineVolPostSubmix = br.ReadUInt32(); + ExhaustVolPostSubmix = br.ReadUInt32(); + EngineSynthDef = br.ReadUInt32(); + EngineSynthPreset = br.ReadUInt32(); + ExhaustSynthDef = br.ReadUInt32(); + ExhaustSynthPreset = br.ReadUInt32(); + VehicleCollisions = br.ReadUInt32(); + EngineSubmixVoice = br.ReadUInt32(); + ExhaustSubmixVoice = br.ReadUInt32(); + WaveHitSound = br.ReadUInt32(); + LeftWaterSound = br.ReadUInt32(); + IdleHullSlapLoop = br.ReadUInt32(); + IdleHullSlapSpeedToVol = br.ReadUInt32(); + GranularEngine = br.ReadUInt32(); + BankSpraySound = br.ReadUInt32(); + IgnitionLoop = br.ReadUInt32(); + EngineStartUp = br.ReadUInt32(); + SubTurningEnginePitchModifier = br.ReadUInt32(); + SubTurningSweetenerSound = br.ReadUInt32(); + RevsToSweetenerVolume = br.ReadUInt32(); + TurningToSweetenerVolume = br.ReadUInt32(); + TurningToSweetenerPitch = br.ReadUInt32(); + DryLandScrape = br.ReadUInt32(); + MaxRollOffScalePlayer = br.ReadSingle(); + MaxRollOffScaleNPC = br.ReadSingle(); + Openness = br.ReadSingle(); + DryLandHardScrape = br.ReadUInt32(); + DryLandHardImpact = br.ReadUInt32(); + WindClothSound = br.ReadUInt32(); DoorOpen = br.ReadUInt32(); DoorClose = br.ReadUInt32(); - Unk55 = br.ReadUInt32(); - Unk56 = br.ReadUInt32(); - Unk57 = br.ReadUInt32(); - Unk58 = br.ReadUInt32(); - SubCreaks = br.ReadUInt32(); - WaveHitBigAir = br.ReadUInt32(); - Unk61 = br.ReadSingle(); - Unk62 = br.ReadUInt32(); - Unk63 = br.ReadUInt32(); - - if (Unk15 != 0x6B3DC4A2) - { }//no hit - if (Unk24 != 0) - { }//no hit - if (Unk33 != 0) - { }//no hit - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + DoorLimit = br.ReadUInt32(); + DoorStartClose = br.ReadUInt32(); + SubExtrasSound = br.ReadUInt32(); + SFXBankSound = br.ReadUInt32(); + SubmersibleCreaksSound = br.ReadUInt32(); + WaveHitBigAirSound = br.ReadUInt32(); + BigAirMinTime = br.ReadSingle(); + VehicleRainSound = br.ReadUInt32(); + VehicleRainSoundInterior = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Engine); - bw.Write(EngineVolume); - bw.Write(EnginePitch); - bw.Write(Engine2); - bw.Write(Engine2Volume); + bw.Write(Engine1Loop); + bw.Write(Engine1Vol); + bw.Write(Engine1Pitch); + bw.Write(Engine2Loop); + bw.Write(Engine2Vol); bw.Write(Engine2Pitch); - bw.Write(EngineLowReso); - bw.Write(EngineLowResoVolume); - bw.Write(EngineLowResoPitch); - bw.Write(EngineIdleLoop); - bw.Write(EngineIdleVolume); - bw.Write(EngineIdlePitch); - bw.Write(WaterTurbulence); - bw.Write(WaterTurbulenceVolume); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(PoliceScannerParams); - bw.Write(RadioFlags); - bw.Write(Horn); - bw.Write(Ignition); - bw.Write(Shutdown); - bw.Write(Unk24); - bw.Write(EngineSubmix); - bw.Write(EngineSubmixPreset); - bw.Write(ExhaustSubmix); - bw.Write(ExhaustSubmixPreset); - bw.Write(Collision); - bw.Write(Unk30); - bw.Write(Unk31); - bw.Write(WaveHitMedium); - bw.Write(Unk33); - bw.Write(IdleHullSlap); - bw.Write(Unk35); - bw.Write(EngineGranular); - bw.Write(BankSpray); - bw.Write(Ignition2); - bw.Write(Startup); - bw.Write(SubTurnVolume); - bw.Write(SubTurn); - bw.Write(Unk42); - bw.Write(Unk43); - bw.Write(Unk44); - bw.Write(SandSkid); - bw.Write(Unk46); - bw.Write(Unk47); - bw.Write(Unk48); - bw.Write(Unk49); - bw.Write(Hull); - bw.Write(Cloth); - bw.Write(Fire); + bw.Write(LowResoLoop); + bw.Write(LowResoLoopVol); + bw.Write(LowResoPitch); + bw.Write(ResoLoop); + bw.Write(ResoLoopVol); + bw.Write(ResoPitch); + bw.Write(WaterTurbulance); + bw.Write(WaterTurbulanceVol); + bw.Write(WaterTurbulancePitch); + bw.Write(ScannerMake); + bw.Write(ScannerModel); + bw.Write(ScannerCategory); + bw.Write(ScannerVehicleSettings); + bw.Write(RadioType); + bw.Write(RadioGenre); + bw.Write(padding00); + bw.Write(HornLoop); + bw.Write(IgnitionOneShot); + bw.Write(ShutdownOneShot); + bw.Write(EngineVolPostSubmix); + bw.Write(ExhaustVolPostSubmix); + bw.Write(EngineSynthDef); + bw.Write(EngineSynthPreset); + bw.Write(ExhaustSynthDef); + bw.Write(ExhaustSynthPreset); + bw.Write(VehicleCollisions); + bw.Write(EngineSubmixVoice); + bw.Write(ExhaustSubmixVoice); + bw.Write(WaveHitSound); + bw.Write(LeftWaterSound); + bw.Write(IdleHullSlapLoop); + bw.Write(IdleHullSlapSpeedToVol); + bw.Write(GranularEngine); + bw.Write(BankSpraySound); + bw.Write(IgnitionLoop); + bw.Write(EngineStartUp); + bw.Write(SubTurningEnginePitchModifier); + bw.Write(SubTurningSweetenerSound); + bw.Write(RevsToSweetenerVolume); + bw.Write(TurningToSweetenerVolume); + bw.Write(TurningToSweetenerPitch); + bw.Write(DryLandScrape); + bw.Write(MaxRollOffScalePlayer); + bw.Write(MaxRollOffScaleNPC); + bw.Write(Openness); + bw.Write(DryLandHardScrape); + bw.Write(DryLandHardImpact); + bw.Write(WindClothSound); bw.Write(DoorOpen); bw.Write(DoorClose); - bw.Write(Unk55); - bw.Write(Unk56); - bw.Write(Unk57); - bw.Write(Unk58); - bw.Write(SubCreaks); - bw.Write(WaveHitBigAir); - bw.Write(Unk61); - bw.Write(Unk62); - bw.Write(Unk63); + bw.Write(DoorLimit); + bw.Write(DoorStartClose); + bw.Write(SubExtrasSound); + bw.Write(SFXBankSound); + bw.Write(SubmersibleCreaksSound); + bw.Write(WaveHitBigAirSound); + bw.Write(BigAirMinTime); + bw.Write(VehicleRainSound); + bw.Write(VehicleRainSoundInterior); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "Engine", RelXml.HashString(Engine)); - RelXml.StringTag(sb, indent, "EngineVolume", RelXml.HashString(EngineVolume)); - RelXml.StringTag(sb, indent, "EnginePitch", RelXml.HashString(EnginePitch)); - RelXml.StringTag(sb, indent, "Engine2", RelXml.HashString(Engine2)); - RelXml.StringTag(sb, indent, "Engine2Volume", RelXml.HashString(Engine2Volume)); + RelXml.StringTag(sb, indent, "Engine1Loop", RelXml.HashString(Engine1Loop)); + RelXml.StringTag(sb, indent, "Engine1Vol", RelXml.HashString(Engine1Vol)); + RelXml.StringTag(sb, indent, "Engine1Pitch", RelXml.HashString(Engine1Pitch)); + RelXml.StringTag(sb, indent, "Engine2Loop", RelXml.HashString(Engine2Loop)); + RelXml.StringTag(sb, indent, "Engine2Vol", RelXml.HashString(Engine2Vol)); RelXml.StringTag(sb, indent, "Engine2Pitch", RelXml.HashString(Engine2Pitch)); - RelXml.StringTag(sb, indent, "EngineLowReso", RelXml.HashString(EngineLowReso)); - RelXml.StringTag(sb, indent, "EngineLowResoVolume", RelXml.HashString(EngineLowResoVolume)); - RelXml.StringTag(sb, indent, "EngineLowResoPitch", RelXml.HashString(EngineLowResoPitch)); - RelXml.StringTag(sb, indent, "EngineIdleLoop", RelXml.HashString(EngineIdleLoop)); - RelXml.StringTag(sb, indent, "EngineIdleVolume", RelXml.HashString(EngineIdleVolume)); - RelXml.StringTag(sb, indent, "EngineIdlePitch", RelXml.HashString(EngineIdlePitch)); - RelXml.StringTag(sb, indent, "WaterTurbulence", RelXml.HashString(WaterTurbulence)); - RelXml.StringTag(sb, indent, "WaterTurbulenceVolume", RelXml.HashString(WaterTurbulenceVolume)); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); - RelXml.StringTag(sb, indent, "PoliceScannerParams", RelXml.HashString(PoliceScannerParams)); - RelXml.ValueTag(sb, indent, "RadioFlags", "0x" + RadioFlags.Hex); - RelXml.StringTag(sb, indent, "Horn", RelXml.HashString(Horn)); - RelXml.StringTag(sb, indent, "Ignition", RelXml.HashString(Ignition)); - RelXml.StringTag(sb, indent, "Shutdown", RelXml.HashString(Shutdown)); - RelXml.StringTag(sb, indent, "Unk24", RelXml.HashString(Unk24)); - RelXml.StringTag(sb, indent, "EngineSubmix", RelXml.HashString(EngineSubmix)); - RelXml.StringTag(sb, indent, "EngineSubmixPreset", RelXml.HashString(EngineSubmixPreset)); - RelXml.StringTag(sb, indent, "ExhaustSubmix", RelXml.HashString(ExhaustSubmix)); - RelXml.StringTag(sb, indent, "ExhaustSubmixPreset", RelXml.HashString(ExhaustSubmixPreset)); - RelXml.StringTag(sb, indent, "Collision", RelXml.HashString(Collision)); - RelXml.StringTag(sb, indent, "Unk30", RelXml.HashString(Unk30)); - RelXml.StringTag(sb, indent, "Unk31", RelXml.HashString(Unk31)); - RelXml.StringTag(sb, indent, "WaveHitMedium", RelXml.HashString(WaveHitMedium)); - RelXml.StringTag(sb, indent, "Unk33", RelXml.HashString(Unk33)); - RelXml.StringTag(sb, indent, "IdleHullSlap", RelXml.HashString(IdleHullSlap)); - RelXml.StringTag(sb, indent, "Unk35", RelXml.HashString(Unk35)); - RelXml.StringTag(sb, indent, "EngineGranular", RelXml.HashString(EngineGranular)); - RelXml.StringTag(sb, indent, "BankSpray", RelXml.HashString(BankSpray)); - RelXml.StringTag(sb, indent, "Ignition2", RelXml.HashString(Ignition2)); - RelXml.StringTag(sb, indent, "Startup", RelXml.HashString(Startup)); - RelXml.StringTag(sb, indent, "SubTurnVolume", RelXml.HashString(SubTurnVolume)); - RelXml.StringTag(sb, indent, "SubTurn", RelXml.HashString(SubTurn)); - RelXml.StringTag(sb, indent, "Unk42", RelXml.HashString(Unk42)); - RelXml.StringTag(sb, indent, "Unk43", RelXml.HashString(Unk43)); - RelXml.StringTag(sb, indent, "Unk44", RelXml.HashString(Unk44)); - RelXml.StringTag(sb, indent, "SandSkid", RelXml.HashString(SandSkid)); - RelXml.ValueTag(sb, indent, "Unk46", FloatUtil.ToString(Unk46)); - RelXml.ValueTag(sb, indent, "Unk47", FloatUtil.ToString(Unk47)); - RelXml.ValueTag(sb, indent, "Unk48", FloatUtil.ToString(Unk48)); - RelXml.StringTag(sb, indent, "Unk49", RelXml.HashString(Unk49)); - RelXml.StringTag(sb, indent, "Hull", RelXml.HashString(Hull)); - RelXml.StringTag(sb, indent, "Cloth", RelXml.HashString(Cloth)); - RelXml.StringTag(sb, indent, "Fire", RelXml.HashString(Fire)); + RelXml.StringTag(sb, indent, "LowResoLoop", RelXml.HashString(LowResoLoop)); + RelXml.StringTag(sb, indent, "LowResoLoopVol", RelXml.HashString(LowResoLoopVol)); + RelXml.StringTag(sb, indent, "LowResoPitch", RelXml.HashString(LowResoPitch)); + RelXml.StringTag(sb, indent, "ResoLoop", RelXml.HashString(ResoLoop)); + RelXml.StringTag(sb, indent, "ResoLoopVol", RelXml.HashString(ResoLoopVol)); + RelXml.StringTag(sb, indent, "ResoPitch", RelXml.HashString(ResoPitch)); + RelXml.StringTag(sb, indent, "WaterTurbulance", RelXml.HashString(WaterTurbulance)); + RelXml.StringTag(sb, indent, "WaterTurbulanceVol", RelXml.HashString(WaterTurbulanceVol)); + RelXml.StringTag(sb, indent, "WaterTurbulancePitch", RelXml.HashString(WaterTurbulancePitch)); + RelXml.StringTag(sb, indent, "ScannerMake", RelXml.HashString(ScannerMake)); + RelXml.StringTag(sb, indent, "ScannerModel", RelXml.HashString(ScannerModel)); + RelXml.StringTag(sb, indent, "ScannerCategory", RelXml.HashString(ScannerCategory)); + RelXml.StringTag(sb, indent, "ScannerVehicleSettings", RelXml.HashString(ScannerVehicleSettings)); + RelXml.ValueTag(sb, indent, "RadioType", RadioType.ToString()); + RelXml.ValueTag(sb, indent, "RadioGenre", RadioGenre.ToString()); + RelXml.StringTag(sb, indent, "HornLoop", RelXml.HashString(HornLoop)); + RelXml.StringTag(sb, indent, "IgnitionOneShot", RelXml.HashString(IgnitionOneShot)); + RelXml.StringTag(sb, indent, "ShutdownOneShot", RelXml.HashString(ShutdownOneShot)); + RelXml.StringTag(sb, indent, "EngineVolPostSubmix", RelXml.HashString(EngineVolPostSubmix)); + RelXml.StringTag(sb, indent, "ExhaustVolPostSubmix", RelXml.HashString(ExhaustVolPostSubmix)); + RelXml.StringTag(sb, indent, "EngineSynthDef", RelXml.HashString(EngineSynthDef)); + RelXml.StringTag(sb, indent, "EngineSynthPreset", RelXml.HashString(EngineSynthPreset)); + RelXml.StringTag(sb, indent, "ExhaustSynthDef", RelXml.HashString(ExhaustSynthDef)); + RelXml.StringTag(sb, indent, "ExhaustSynthPreset", RelXml.HashString(ExhaustSynthPreset)); + RelXml.StringTag(sb, indent, "VehicleCollisions", RelXml.HashString(VehicleCollisions)); + RelXml.StringTag(sb, indent, "EngineSubmixVoice", RelXml.HashString(EngineSubmixVoice)); + RelXml.StringTag(sb, indent, "ExhaustSubmixVoice", RelXml.HashString(ExhaustSubmixVoice)); + RelXml.StringTag(sb, indent, "WaveHitSound", RelXml.HashString(WaveHitSound)); + RelXml.StringTag(sb, indent, "LeftWaterSound", RelXml.HashString(LeftWaterSound)); + RelXml.StringTag(sb, indent, "IdleHullSlapLoop", RelXml.HashString(IdleHullSlapLoop)); + RelXml.StringTag(sb, indent, "IdleHullSlapSpeedToVol", RelXml.HashString(IdleHullSlapSpeedToVol)); + RelXml.StringTag(sb, indent, "GranularEngine", RelXml.HashString(GranularEngine)); + RelXml.StringTag(sb, indent, "BankSpraySound", RelXml.HashString(BankSpraySound)); + RelXml.StringTag(sb, indent, "IgnitionLoop", RelXml.HashString(IgnitionLoop)); + RelXml.StringTag(sb, indent, "EngineStartUp", RelXml.HashString(EngineStartUp)); + RelXml.StringTag(sb, indent, "SubTurningEnginePitchModifier", RelXml.HashString(SubTurningEnginePitchModifier)); + RelXml.StringTag(sb, indent, "SubTurningSweetenerSound", RelXml.HashString(SubTurningSweetenerSound)); + RelXml.StringTag(sb, indent, "RevsToSweetenerVolume", RelXml.HashString(RevsToSweetenerVolume)); + RelXml.StringTag(sb, indent, "TurningToSweetenerVolume", RelXml.HashString(TurningToSweetenerVolume)); + RelXml.StringTag(sb, indent, "TurningToSweetenerPitch", RelXml.HashString(TurningToSweetenerPitch)); + RelXml.StringTag(sb, indent, "DryLandScrape", RelXml.HashString(DryLandScrape)); + RelXml.ValueTag(sb, indent, "MaxRollOffScalePlayer", FloatUtil.ToString(MaxRollOffScalePlayer)); + RelXml.ValueTag(sb, indent, "MaxRollOffScaleNPC", FloatUtil.ToString(MaxRollOffScaleNPC)); + RelXml.ValueTag(sb, indent, "Openness", FloatUtil.ToString(Openness)); + RelXml.StringTag(sb, indent, "DryLandHardScrape", RelXml.HashString(DryLandHardScrape)); + RelXml.StringTag(sb, indent, "DryLandHardImpact", RelXml.HashString(DryLandHardImpact)); + RelXml.StringTag(sb, indent, "WindClothSound", RelXml.HashString(WindClothSound)); RelXml.StringTag(sb, indent, "DoorOpen", RelXml.HashString(DoorOpen)); RelXml.StringTag(sb, indent, "DoorClose", RelXml.HashString(DoorClose)); - RelXml.StringTag(sb, indent, "Unk55", RelXml.HashString(Unk55)); - RelXml.StringTag(sb, indent, "Unk56", RelXml.HashString(Unk56)); - RelXml.StringTag(sb, indent, "Unk57", RelXml.HashString(Unk57)); - RelXml.StringTag(sb, indent, "Unk58", RelXml.HashString(Unk58)); - RelXml.StringTag(sb, indent, "SubCreaks", RelXml.HashString(SubCreaks)); - RelXml.StringTag(sb, indent, "WaveHitBigAir", RelXml.HashString(WaveHitBigAir)); - RelXml.ValueTag(sb, indent, "Unk61", FloatUtil.ToString(Unk61)); - RelXml.StringTag(sb, indent, "Unk62", RelXml.HashString(Unk62)); - RelXml.StringTag(sb, indent, "Unk63", RelXml.HashString(Unk63)); + RelXml.StringTag(sb, indent, "DoorLimit", RelXml.HashString(DoorLimit)); + RelXml.StringTag(sb, indent, "DoorStartClose", RelXml.HashString(DoorStartClose)); + RelXml.StringTag(sb, indent, "SubExtrasSound", RelXml.HashString(SubExtrasSound)); + RelXml.StringTag(sb, indent, "SFXBankSound", RelXml.HashString(SFXBankSound)); + RelXml.StringTag(sb, indent, "SubmersibleCreaksSound", RelXml.HashString(SubmersibleCreaksSound)); + RelXml.StringTag(sb, indent, "WaveHitBigAirSound", RelXml.HashString(WaveHitBigAirSound)); + RelXml.ValueTag(sb, indent, "BigAirMinTime", FloatUtil.ToString(BigAirMinTime)); + RelXml.StringTag(sb, indent, "VehicleRainSound", RelXml.HashString(VehicleRainSound)); + RelXml.StringTag(sb, indent, "VehicleRainSoundInterior", RelXml.HashString(VehicleRainSoundInterior)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Engine = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine")); - EngineVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineVolume")); - EnginePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "EnginePitch")); - Engine2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine2")); - Engine2Volume = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine2Volume")); + Engine1Loop = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine1Loop")); + Engine1Vol = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine1Vol")); + Engine1Pitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine1Pitch")); + Engine2Loop = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine2Loop")); + Engine2Vol = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine2Vol")); Engine2Pitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine2Pitch")); - EngineLowReso = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineLowReso")); - EngineLowResoVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineLowResoVolume")); - EngineLowResoPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineLowResoPitch")); - EngineIdleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineIdleLoop")); - EngineIdleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineIdleVolume")); - EngineIdlePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineIdlePitch")); - WaterTurbulence = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterTurbulence")); - WaterTurbulenceVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterTurbulenceVolume")); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); - PoliceScannerParams = XmlRel.GetHash(Xml.GetChildInnerText(node, "PoliceScannerParams")); - RadioFlags = Xml.GetChildUIntAttribute(node, "RadioFlags", "value"); - Horn = XmlRel.GetHash(Xml.GetChildInnerText(node, "Horn")); - Ignition = XmlRel.GetHash(Xml.GetChildInnerText(node, "Ignition")); - Shutdown = XmlRel.GetHash(Xml.GetChildInnerText(node, "Shutdown")); - Unk24 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk24")); - EngineSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmix")); - EngineSubmixPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixPreset")); - ExhaustSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmix")); - ExhaustSubmixPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixPreset")); - Collision = XmlRel.GetHash(Xml.GetChildInnerText(node, "Collision")); - Unk30 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk30")); - Unk31 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk31")); - WaveHitMedium = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveHitMedium")); - Unk33 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk33")); - IdleHullSlap = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleHullSlap")); - Unk35 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk35")); - EngineGranular = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineGranular")); - BankSpray = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankSpray")); - Ignition2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Ignition2")); - Startup = XmlRel.GetHash(Xml.GetChildInnerText(node, "Startup")); - SubTurnVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubTurnVolume")); - SubTurn = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubTurn")); - Unk42 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk42")); - Unk43 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk43")); - Unk44 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk44")); - SandSkid = XmlRel.GetHash(Xml.GetChildInnerText(node, "SandSkid")); - Unk46 = Xml.GetChildFloatAttribute(node, "Unk46", "value"); - Unk47 = Xml.GetChildFloatAttribute(node, "Unk47", "value"); - Unk48 = Xml.GetChildFloatAttribute(node, "Unk48", "value"); - Unk49 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk49")); - Hull = XmlRel.GetHash(Xml.GetChildInnerText(node, "Hull")); - Cloth = XmlRel.GetHash(Xml.GetChildInnerText(node, "Cloth")); - Fire = XmlRel.GetHash(Xml.GetChildInnerText(node, "Fire")); + LowResoLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "LowResoLoop")); + LowResoLoopVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "LowResoLoopVol")); + LowResoPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "LowResoPitch")); + ResoLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "ResoLoop")); + ResoLoopVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "ResoLoopVol")); + ResoPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "ResoPitch")); + WaterTurbulance = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterTurbulance")); + WaterTurbulanceVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterTurbulanceVol")); + WaterTurbulancePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterTurbulancePitch")); + ScannerMake = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerMake")); + ScannerModel = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerModel")); + ScannerCategory = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerCategory")); + ScannerVehicleSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerVehicleSettings")); + RadioType = (byte)Xml.GetChildUIntAttribute(node, "RadioType", "value"); + RadioGenre = (byte)Xml.GetChildUIntAttribute(node, "RadioGenre", "value"); + HornLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "HornLoop")); + IgnitionOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "IgnitionOneShot")); + ShutdownOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "ShutdownOneShot")); + EngineVolPostSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineVolPostSubmix")); + ExhaustVolPostSubmix = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustVolPostSubmix")); + EngineSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthDef")); + EngineSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthPreset")); + ExhaustSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthDef")); + ExhaustSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthPreset")); + VehicleCollisions = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCollisions")); + EngineSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixVoice")); + ExhaustSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixVoice")); + WaveHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveHitSound")); + LeftWaterSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "LeftWaterSound")); + IdleHullSlapLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleHullSlapLoop")); + IdleHullSlapSpeedToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleHullSlapSpeedToVol")); + GranularEngine = XmlRel.GetHash(Xml.GetChildInnerText(node, "GranularEngine")); + BankSpraySound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankSpraySound")); + IgnitionLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IgnitionLoop")); + EngineStartUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineStartUp")); + SubTurningEnginePitchModifier = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubTurningEnginePitchModifier")); + SubTurningSweetenerSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubTurningSweetenerSound")); + RevsToSweetenerVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "RevsToSweetenerVolume")); + TurningToSweetenerVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurningToSweetenerVolume")); + TurningToSweetenerPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurningToSweetenerPitch")); + DryLandScrape = XmlRel.GetHash(Xml.GetChildInnerText(node, "DryLandScrape")); + MaxRollOffScalePlayer = Xml.GetChildFloatAttribute(node, "MaxRollOffScalePlayer", "value"); + MaxRollOffScaleNPC = Xml.GetChildFloatAttribute(node, "MaxRollOffScaleNPC", "value"); + Openness = Xml.GetChildFloatAttribute(node, "Openness", "value"); + DryLandHardScrape = XmlRel.GetHash(Xml.GetChildInnerText(node, "DryLandHardScrape")); + DryLandHardImpact = XmlRel.GetHash(Xml.GetChildInnerText(node, "DryLandHardImpact")); + WindClothSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindClothSound")); DoorOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorOpen")); DoorClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorClose")); - Unk55 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk55")); - Unk56 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk56")); - Unk57 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk57")); - Unk58 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk58")); - SubCreaks = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubCreaks")); - WaveHitBigAir = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveHitBigAir")); - Unk61 = Xml.GetChildFloatAttribute(node, "Unk61", "value"); - Unk62 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk62")); - Unk63 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk63")); + DoorLimit = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorLimit")); + DoorStartClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorStartClose")); + SubExtrasSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubExtrasSound")); + SFXBankSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SFXBankSound")); + SubmersibleCreaksSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubmersibleCreaksSound")); + WaveHitBigAirSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveHitBigAirSound")); + BigAirMinTime = Xml.GetChildFloatAttribute(node, "BigAirMinTime", "value"); + VehicleRainSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSound")); + VehicleRainSoundInterior = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSoundInterior")); } public override MetaHash[] GetCurveHashes() { - return new[] { EngineVolume, EnginePitch, Engine2Volume, Engine2Pitch, EngineLowResoVolume, EngineLowResoPitch, EngineIdleVolume, EngineIdlePitch, - WaterTurbulenceVolume, Unk35, SubTurnVolume, Unk42, Unk43, Unk44 }; + return new[] { Engine1Vol, Engine1Pitch, Engine2Vol, Engine2Pitch, LowResoLoopVol, LowResoPitch, ResoLoopVol, ResoPitch, + WaterTurbulanceVol, IdleHullSlapLoop, EngineStartUp, SubTurningSweetenerSound, RevsToSweetenerVolume, TurningToSweetenerVolume }; } public override MetaHash[] GetSynthHashes() { - return new[] { EngineSubmix, EngineSubmixPreset, ExhaustSubmix, ExhaustSubmixPreset }; + return new[] { ExhaustVolPostSubmix, EngineSynthDef, EngineSynthPreset, ExhaustSynthDef }; } public override MetaHash[] GetSoundHashes() { - return new[] { Engine, Engine2, EngineLowReso, EngineIdleLoop, WaterTurbulence, Unk16, Unk17, Unk18, Horn, Ignition, Shutdown, Unk30, Unk31, - WaveHitMedium, IdleHullSlap, BankSpray, Ignition2, Startup, SubTurn, SandSkid, Unk49, Hull, Cloth, Fire, DoorOpen, DoorClose, - Unk55, Unk56, Unk57, Unk58, SubCreaks, WaveHitBigAir, Unk62, Unk63 }; + return new[] { Engine1Loop, Engine2Loop, LowResoLoop, ResoLoop, WaterTurbulance, ScannerMake, ScannerModel, ScannerCategory, HornLoop, IgnitionOneShot, ShutdownOneShot, VehicleCollisions, EngineSubmixVoice, + ExhaustSubmixVoice, LeftWaterSound, GranularEngine, BankSpraySound, IgnitionLoop, SubTurningEnginePitchModifier, TurningToSweetenerPitch, DryLandHardScrape, DryLandHardImpact, WindClothSound, DoorOpen, DoorClose, + DoorLimit, DoorStartClose, SubExtrasSound, SFXBankSound, SubmersibleCreaksSound, WaveHitBigAirSound, VehicleRainSound, VehicleRainSoundInterior }; } public override MetaHash[] GetGameHashes() { - return new[] { PoliceScannerParams, Collision, EngineGranular }; + return new[] { ScannerVehicleSettings, ExhaustSynthPreset, IdleHullSlapSpeedToVol }; } } - [TC(typeof(EXP))] public class Dat151Bicycle : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151BicycleAudioSettings : Dat151RelData { - public MetaHash Chain { get; set; } - public MetaHash Sprocket { get; set; } - public MetaHash Pedal { get; set; } - public MetaHash GearChange { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } + public MetaHash ChainLoop { get; set; } + public MetaHash SprocketSound { get; set; } + public MetaHash RePedalSound { get; set; } + public MetaHash GearChangeSound { get; set; } + public float RoadNoiseVolumeScale { get; set; } + public float SkidVolumeScale { get; set; } public MetaHash SuspensionUp { get; set; } public MetaHash SuspensionDown { get; set; } - public float SuspensionUpFrequency { get; set; } - public float SuspensionDownFrequency { get; set; } - public MetaHash JumpLandIntact { get; set; } - public MetaHash JumpLandLoose { get; set; } - public uint Unk12 { get; set; } - public uint Unk13 { get; set; } - public MetaHash Collision { get; set; } - public MetaHash Bell { get; set; } - public MetaHash Unk16 { get; set; } - public MetaHash Unk17 { get; set; } + public float MinSuspCompThresh { get; set; } + public float MaxSuspCompThresh { get; set; } + public MetaHash JumpLandSound { get; set; } + public MetaHash DamagedJumpLandSound { get; set; } + public uint JumpLandMinThresh { get; set; } + public uint JumpLandMaxThresh { get; set; } + public MetaHash VehicleCollisions { get; set; } + public MetaHash BellSound { get; set; } + public MetaHash BrakeBlock { get; set; } + public MetaHash BrakeBlockWet { get; set; } - public Dat151Bicycle(RelFile rel) : base(rel) + public Dat151BicycleAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Bicycle; + Type = Dat151RelType.BicycleAudioSettings; TypeID = (byte)Type; } - public Dat151Bicycle(RelData d, BinaryReader br) : base(d, br) + public Dat151BicycleAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Chain = br.ReadUInt32(); - Sprocket = br.ReadUInt32(); - Pedal = br.ReadUInt32(); - GearChange = br.ReadUInt32(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); + ChainLoop = br.ReadUInt32(); + SprocketSound = br.ReadUInt32(); + RePedalSound = br.ReadUInt32(); + GearChangeSound = br.ReadUInt32(); + RoadNoiseVolumeScale = br.ReadSingle(); + SkidVolumeScale = br.ReadSingle(); SuspensionUp = br.ReadUInt32(); SuspensionDown = br.ReadUInt32(); - SuspensionUpFrequency = br.ReadSingle(); - SuspensionDownFrequency = br.ReadSingle(); - JumpLandIntact = br.ReadUInt32(); - JumpLandLoose = br.ReadUInt32(); - Unk12 = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Collision = br.ReadUInt32(); - Bell = br.ReadUInt32(); - Unk16 = br.ReadUInt32(); - Unk17 = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MinSuspCompThresh = br.ReadSingle(); + MaxSuspCompThresh = br.ReadSingle(); + JumpLandSound = br.ReadUInt32(); + DamagedJumpLandSound = br.ReadUInt32(); + JumpLandMinThresh = br.ReadUInt32(); + JumpLandMaxThresh = br.ReadUInt32(); + VehicleCollisions = br.ReadUInt32(); + BellSound = br.ReadUInt32(); + BrakeBlock = br.ReadUInt32(); + BrakeBlockWet = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Chain); - bw.Write(Sprocket); - bw.Write(Pedal); - bw.Write(GearChange); - bw.Write(Unk04); - bw.Write(Unk05); + bw.Write(ChainLoop); + bw.Write(SprocketSound); + bw.Write(RePedalSound); + bw.Write(GearChangeSound); + bw.Write(RoadNoiseVolumeScale); + bw.Write(SkidVolumeScale); bw.Write(SuspensionUp); bw.Write(SuspensionDown); - bw.Write(SuspensionUpFrequency); - bw.Write(SuspensionDownFrequency); - bw.Write(JumpLandIntact); - bw.Write(JumpLandLoose); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Collision); - bw.Write(Bell); - bw.Write(Unk16); - bw.Write(Unk17); + bw.Write(MinSuspCompThresh); + bw.Write(MaxSuspCompThresh); + bw.Write(JumpLandSound); + bw.Write(DamagedJumpLandSound); + bw.Write(JumpLandMinThresh); + bw.Write(JumpLandMaxThresh); + bw.Write(VehicleCollisions); + bw.Write(BellSound); + bw.Write(BrakeBlock); + bw.Write(BrakeBlockWet); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Chain", RelXml.HashString(Chain)); - RelXml.StringTag(sb, indent, "Sprocket", RelXml.HashString(Sprocket)); - RelXml.StringTag(sb, indent, "Pedal", RelXml.HashString(Pedal)); - RelXml.StringTag(sb, indent, "GearChange", RelXml.HashString(GearChange)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); + RelXml.StringTag(sb, indent, "ChainLoop", RelXml.HashString(ChainLoop)); + RelXml.StringTag(sb, indent, "SprocketSound", RelXml.HashString(SprocketSound)); + RelXml.StringTag(sb, indent, "RePedalSound", RelXml.HashString(RePedalSound)); + RelXml.StringTag(sb, indent, "GearChangeSound", RelXml.HashString(GearChangeSound)); + RelXml.ValueTag(sb, indent, "RoadNoiseVolumeScale", FloatUtil.ToString(RoadNoiseVolumeScale)); + RelXml.ValueTag(sb, indent, "SkidVolumeScale", FloatUtil.ToString(SkidVolumeScale)); RelXml.StringTag(sb, indent, "SuspensionUp", RelXml.HashString(SuspensionUp)); RelXml.StringTag(sb, indent, "SuspensionDown", RelXml.HashString(SuspensionDown)); - RelXml.ValueTag(sb, indent, "SuspensionUpFrequency", FloatUtil.ToString(SuspensionUpFrequency)); - RelXml.ValueTag(sb, indent, "SuspensionDownFrequency", FloatUtil.ToString(SuspensionDownFrequency)); - RelXml.StringTag(sb, indent, "JumpLandIntact", RelXml.HashString(JumpLandIntact)); - RelXml.StringTag(sb, indent, "JumpLandLoose", RelXml.HashString(JumpLandLoose)); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.StringTag(sb, indent, "Collision", RelXml.HashString(Collision)); - RelXml.StringTag(sb, indent, "Bell", RelXml.HashString(Bell)); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); + RelXml.ValueTag(sb, indent, "MinSuspCompThresh", FloatUtil.ToString(MinSuspCompThresh)); + RelXml.ValueTag(sb, indent, "MaxSuspCompThresh", FloatUtil.ToString(MaxSuspCompThresh)); + RelXml.StringTag(sb, indent, "JumpLandSound", RelXml.HashString(JumpLandSound)); + RelXml.StringTag(sb, indent, "DamagedJumpLandSound", RelXml.HashString(DamagedJumpLandSound)); + RelXml.ValueTag(sb, indent, "JumpLandMinThresh", JumpLandMinThresh.ToString()); + RelXml.ValueTag(sb, indent, "JumpLandMaxThresh", JumpLandMaxThresh.ToString()); + RelXml.StringTag(sb, indent, "VehicleCollisions", RelXml.HashString(VehicleCollisions)); + RelXml.StringTag(sb, indent, "BellSound", RelXml.HashString(BellSound)); + RelXml.StringTag(sb, indent, "BrakeBlock", RelXml.HashString(BrakeBlock)); + RelXml.StringTag(sb, indent, "BrakeBlockWet", RelXml.HashString(BrakeBlockWet)); } public override void ReadXml(XmlNode node) { - Chain = XmlRel.GetHash(Xml.GetChildInnerText(node, "Chain")); - Sprocket = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sprocket")); - Pedal = XmlRel.GetHash(Xml.GetChildInnerText(node, "Pedal")); - GearChange = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearChange")); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); + ChainLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChainLoop")); + SprocketSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SprocketSound")); + RePedalSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RePedalSound")); + GearChangeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearChangeSound")); + RoadNoiseVolumeScale = Xml.GetChildFloatAttribute(node, "RoadNoiseVolumeScale", "value"); + SkidVolumeScale = Xml.GetChildFloatAttribute(node, "SkidVolumeScale", "value"); SuspensionUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionUp")); SuspensionDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionDown")); - SuspensionUpFrequency = Xml.GetChildFloatAttribute(node, "SuspensionUpFrequency", "value"); - SuspensionDownFrequency = Xml.GetChildFloatAttribute(node, "SuspensionDownFrequency", "value"); - JumpLandIntact = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandIntact")); - JumpLandLoose = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandLoose")); - Unk12 = Xml.GetChildUIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildUIntAttribute(node, "Unk13", "value"); - Collision = XmlRel.GetHash(Xml.GetChildInnerText(node, "Collision")); - Bell = XmlRel.GetHash(Xml.GetChildInnerText(node, "Bell")); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); + MinSuspCompThresh = Xml.GetChildFloatAttribute(node, "MinSuspCompThresh", "value"); + MaxSuspCompThresh = Xml.GetChildFloatAttribute(node, "MaxSuspCompThresh", "value"); + JumpLandSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandSound")); + DamagedJumpLandSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamagedJumpLandSound")); + JumpLandMinThresh = Xml.GetChildUIntAttribute(node, "JumpLandMinThresh", "value"); + JumpLandMaxThresh = Xml.GetChildUIntAttribute(node, "JumpLandMaxThresh", "value"); + VehicleCollisions = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCollisions")); + BellSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BellSound")); + BrakeBlock = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeBlock")); + BrakeBlockWet = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeBlockWet")); } public override MetaHash[] GetSoundHashes() { - return new[] { Chain, Sprocket, Pedal, GearChange, SuspensionUp, SuspensionDown, JumpLandIntact, JumpLandLoose, Bell, Unk16, Unk17 }; + return new[] { ChainLoop, SprocketSound, RePedalSound, GearChangeSound, SuspensionUp, SuspensionDown, JumpLandSound, DamagedJumpLandSound, BellSound, BrakeBlock, BrakeBlockWet }; } public override MetaHash[] GetGameHashes() { - return new[] { Collision }; + return new[] { VehicleCollisions }; } } - [TC(typeof(EXP))] public class Dat151Aeroplane : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151PlaneAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Engine { get; set; }//engine loop - public MetaHash Exhaust { get; set; }//exhaust loop - public MetaHash Idle { get; set; }//idle loop - public MetaHash Distance { get; set; }//distance loop - public MetaHash Propeller { get; set; }//propellor loop - public MetaHash Banking { get; set; }//banking loop - public short Unk07 { get; set; } - public short Unk08 { get; set; } - public short Unk09 { get; set; } - public short Unk10 { get; set; } - public short Unk11 { get; set; } - public short Unk12 { get; set; } - public short Unk13 { get; set; } - public short Unk14 { get; set; } - public short Unk15 { get; set; } - public short Unk16 { get; set; } - public MetaHash Unk17 { get; set; }//curve - public MetaHash Unk18 { get; set; }//curve - public MetaHash Unk19 { get; set; }//same as Unk17 - public MetaHash Unk20 { get; set; }//same as Unk18 - public MetaHash Unk21 { get; set; }//curve - public MetaHash Unk22 { get; set; }//curve - public MetaHash Unk23 { get; set; }//curve - public MetaHash Unk24 { get; set; }//curve - public MetaHash Unk25 { get; set; }//curve - public MetaHash Unk26 { get; set; }//curve - public MetaHash Unk27 { get; set; }//curve + public MetaHash EngineLoop { get; set; } + public MetaHash ExhaustLoop { get; set; } + public MetaHash IdleLoop { get; set; } + public MetaHash DistanceLoop { get; set; } + public MetaHash PropellorLoop { get; set; } + public MetaHash BankingLoop { get; set; } + public ushort EngineConeFrontAngle { get; set; } + public ushort EngineConeRearAngle { get; set; } + public short EngineConeAtten { get; set; } + public ushort ExhaustConeFrontAngle { get; set; } + public ushort ExhaustConeRearAngle { get; set; } + public short ExhaustConeAtten { get; set; } + public ushort PropellorConeFrontAngle { get; set; } + public ushort PropellorConeRearAngle { get; set; } + public short PropellorConeAtten { get; set; } + public short padding00 { get; set; } + public MetaHash EngineThrottleVolumeCurve { get; set; } + public MetaHash EngineThrottlePitchCurve { get; set; } + public MetaHash ExhaustThrottleVolumeCurve { get; set; } + public MetaHash ExhaustThrottlePitchCurve { get; set; } + public MetaHash PropellorThrottleVolumeCurve { get; set; } + public MetaHash PropellorThrottlePitchCurve { get; set; } + public MetaHash IdleThrottleVolumeCurve { get; set; } + public MetaHash IdleThrottlePitchCurve { get; set; } + public MetaHash DistanceThrottleVolumeCurve { get; set; } + public MetaHash DistanceThrottlePitchCurve { get; set; } + public MetaHash DistanceVolumeCurve { get; set; } public MetaHash StallWarning { get; set; } - public MetaHash DoorOpen { get; set; }//door open - public MetaHash DoorClose { get; set; }//door close + public MetaHash DoorOpen { get; set; } + public MetaHash DoorClose { get; set; } public MetaHash DoorLimit { get; set; } - public MetaHash GearDeploy { get; set; } - public MetaHash GearRetract { get; set; } - public MetaHash Startup { get; set; }//startup - public MetaHash TyreLand { get; set; }//tyre_land_random - public MetaHash Unk36 { get; set; } - public MetaHash Unk37 { get; set; } - public MetaHash Unk38 { get; set; } - public MetaHash Afterburner { get; set; }//afterburner - public int Unk40 { get; set; } - public MetaHash Unk41 { get; set; }//curve - public MetaHash PropTransAndEq { get; set; } - public MetaHash PropTransAndEqPreset { get; set; } - public MetaHash Unk44 { get; set; }//0 - public MetaHash Unk45 { get; set; }//0 - public MetaHash Unk46 { get; set; }//environment - public MetaHash Unk47 { get; set; }//environment - public MetaHash EngineBreakdown { get; set; }//breakdown - public MetaHash Unk49 { get; set; } - public MetaHash Unk50 { get; set; }//curve - public short Unk51 { get; set; } - public short Unk52 { get; set; } - public short Unk53 { get; set; } - public short Unk54 { get; set; } - public float Unk55 { get; set; } - public MetaHash Rudder { get; set; }//rudder - public MetaHash WingFlap { get; set; } - public MetaHash TailFlap { get; set; } - public MetaHash DoorOpenStart { get; set; }//door open start - public MetaHash DoorCloseStart { get; set; }//door close start - public MetaHash Collision { get; set; } - public MetaHash Fire { get; set; } - public MetaHash EngineDamage { get; set; } - public int Unk64 { get; set; } + public MetaHash LandingGearDeploy { get; set; } + public MetaHash LandingGearRetract { get; set; } + public MetaHash Ignition { get; set; } + public MetaHash TyreSqueal { get; set; } + public MetaHash BankingThrottleVolumeCurve { get; set; } + public MetaHash BankingThrottlePitchCurve { get; set; } + public MetaHash BankingAngleVolCurve { get; set; } + public MetaHash AfterburnerLoop { get; set; } + public int BankingStyle { get; set; } + public MetaHash AfterburnerThrottleVolCurve { get; set; } + public MetaHash EngineSynthDef { get; set; } + public MetaHash EngineSynthPreset { get; set; } + public MetaHash ExhaustSynthDef { get; set; } + public MetaHash ExhaustSynthPreset { get; set; } + public MetaHash EngineSubmixVoice { get; set; } + public MetaHash ExhaustSubmixVoice { get; set; } + public MetaHash PropellorBreakOneShot { get; set; } + public MetaHash WindNoise { get; set; } + public MetaHash PeelingPitchCurve { get; set; } + public short DivingFactor { get; set; } + public short MaxDivePitch { get; set; } + public short DiveAirSpeedThreshold { get; set; } + public short DivingRateApproachingGround { get; set; } + public float PeelingAfterburnerPitchScalingFactor { get; set; } + public MetaHash Rudder { get; set; } + public MetaHash Aileron { get; set; } + public MetaHash Elevator { get; set; } + public MetaHash DoorStartOpen { get; set; } + public MetaHash DoorStartClose { get; set; } + public MetaHash VehicleCollisions { get; set; } + public MetaHash FireAudio { get; set; } + public MetaHash EngineMissFire { get; set; } + public uint IsRealLODRange { get; set; } public MetaHash SuspensionUp { get; set; } public MetaHash SuspensionDown { get; set; } - public float Unk67 { get; set; } - public float Unk68 { get; set; } - public MetaHash Unk69 { get; set; }//curve - public MetaHash Unk70 { get; set; }//curve - public MetaHash Unk71 { get; set; }//curve - public MetaHash Unk72 { get; set; } - public MetaHash Damage { get; set; }//damage - public MetaHash Unk74 { get; set; }//curve - public float Unk75 { get; set; } - public MetaHash Unk76 { get; set; } - public MetaHash Divebomb { get; set; } - public short Unk78 { get; set; }//1 - public short Unk79 { get; set; }//1 - public short Unk80 { get; set; }//750 - public short Unk81 { get; set; }//1 - public float Unk82 { get; set; } - public float Unk83 { get; set; } - public float Unk84 { get; set; } - public MetaHash ThrustBank { get; set; }//thrust bank - public MetaHash Unk86 { get; set; } - - public MetaHash Unk87 { get; set; } - public MetaHash Unk88 { get; set; } - public MetaHash Unk89 { get; set; }//0 - public MetaHash Unk90 { get; set; } - public MetaHash Unk91 { get; set; } - public float Unk92 { get; set; } - public MetaHash Unk93 { get; set; }//0 - public MetaHash Unk94 { get; set; } - public MetaHash Unk95 { get; set; }//curve - public MetaHash Unk96 { get; set; } + public float MinSuspCompThresh { get; set; } + public float MaxSuspCompThresh { get; set; } + public MetaHash DamageEngineSpeedVolumeCurve { get; set; } + public MetaHash DamageEngineSpeedPitchCurve { get; set; } + public MetaHash DamageHealthVolumeCurve { get; set; } + public MetaHash TurbineWindDown { get; set; } + public MetaHash JetDamageLoop { get; set; } + public MetaHash AfterburnerThrottlePitchCurve { get; set; } + public float NPCEngineSmoothAmount { get; set; } + public MetaHash FlybySound { get; set; } + public MetaHash DivingSound { get; set; } + public short DivingSoundPitchFactor { get; set; } + public short DivingSoundVolumeFactor { get; set; } + public short MaxDiveSoundPitch { get; set; } + public short RadioType { get; set; } + public float AircraftWarningSeriousDamageThresh { get; set; } + public float AircraftWarningCriticalDamageThresh { get; set; } + public float AircraftWarningMaxSpeed { get; set; } + public MetaHash SimpleSoundForLoading { get; set; } + public MetaHash FlyAwaySound { get; set; } + public MetaHash VehicleRainSound { get; set; } + public MetaHash VehicleRainSoundInterior { get; set; } + public MetaHash CabinToneLoop { get; set; } + public MetaHash WaveHitSound { get; set; } + public MetaHash WaveHitBigAirSound { get; set; } + public float BigAirMinTime { get; set; } + public MetaHash LeftWaterSound { get; set; } + public MetaHash IdleHullSlapLoop { get; set; } + public MetaHash IdleHullSlapSpeedToVol { get; set; } + public MetaHash WaterTurbulenceSound { get; set; } public int Version { get; set; } - public Dat151Aeroplane(RelFile rel) : base(rel) + public Dat151PlaneAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Aeroplane; + Type = Dat151RelType.PlaneAudioSettings; TypeID = (byte)Type; } - public Dat151Aeroplane(RelData d, BinaryReader br) : base(d, br) + public Dat151PlaneAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Engine = br.ReadUInt32(); - Exhaust = br.ReadUInt32(); - Idle = br.ReadUInt32(); - Distance = br.ReadUInt32(); - Propeller = br.ReadUInt32(); - Banking = br.ReadUInt32(); - Unk07 = br.ReadInt16(); - Unk08 = br.ReadInt16(); - Unk09 = br.ReadInt16(); - Unk10 = br.ReadInt16(); - Unk11 = br.ReadInt16(); - Unk12 = br.ReadInt16(); - Unk13 = br.ReadInt16(); - Unk14 = br.ReadInt16(); - Unk15 = br.ReadInt16(); - Unk16 = br.ReadInt16(); - Unk17 = br.ReadUInt32(); - Unk18 = br.ReadUInt32(); - Unk19 = br.ReadUInt32(); - Unk20 = br.ReadUInt32(); - Unk21 = br.ReadUInt32(); - Unk22 = br.ReadUInt32(); - Unk23 = br.ReadUInt32(); - Unk24 = br.ReadUInt32(); - Unk25 = br.ReadUInt32(); - Unk26 = br.ReadUInt32(); - Unk27 = br.ReadUInt32(); + EngineLoop = br.ReadUInt32(); + ExhaustLoop = br.ReadUInt32(); + IdleLoop = br.ReadUInt32(); + DistanceLoop = br.ReadUInt32(); + PropellorLoop = br.ReadUInt32(); + BankingLoop = br.ReadUInt32(); + EngineConeFrontAngle = br.ReadUInt16(); + EngineConeRearAngle = br.ReadUInt16(); + EngineConeAtten = br.ReadInt16(); + ExhaustConeFrontAngle = br.ReadUInt16(); + ExhaustConeRearAngle = br.ReadUInt16(); + ExhaustConeAtten = br.ReadInt16(); + PropellorConeFrontAngle = br.ReadUInt16(); + PropellorConeRearAngle = br.ReadUInt16(); + PropellorConeAtten = br.ReadInt16(); + padding00 = br.ReadInt16(); + EngineThrottleVolumeCurve = br.ReadUInt32(); + EngineThrottlePitchCurve = br.ReadUInt32(); + ExhaustThrottleVolumeCurve = br.ReadUInt32(); + ExhaustThrottlePitchCurve = br.ReadUInt32(); + PropellorThrottleVolumeCurve = br.ReadUInt32(); + PropellorThrottlePitchCurve = br.ReadUInt32(); + IdleThrottleVolumeCurve = br.ReadUInt32(); + IdleThrottlePitchCurve = br.ReadUInt32(); + DistanceThrottleVolumeCurve = br.ReadUInt32(); + DistanceThrottlePitchCurve = br.ReadUInt32(); + DistanceVolumeCurve = br.ReadUInt32(); StallWarning = br.ReadUInt32(); DoorOpen = br.ReadUInt32(); DoorClose = br.ReadUInt32(); DoorLimit = br.ReadUInt32(); - GearDeploy = br.ReadUInt32(); - GearRetract = br.ReadUInt32(); - Startup = br.ReadUInt32(); - TyreLand = br.ReadUInt32(); - Unk36 = br.ReadUInt32(); - Unk37 = br.ReadUInt32(); - Unk38 = br.ReadUInt32(); - Afterburner = br.ReadUInt32(); - Unk40 = br.ReadInt32(); - Unk41 = br.ReadUInt32(); - PropTransAndEq = br.ReadUInt32(); - PropTransAndEqPreset = br.ReadUInt32(); - Unk44 = br.ReadUInt32(); - Unk45 = br.ReadUInt32(); - Unk46 = br.ReadUInt32(); - Unk47 = br.ReadUInt32(); - EngineBreakdown = br.ReadUInt32(); - Unk49 = br.ReadUInt32(); - Unk50 = br.ReadUInt32(); - Unk51 = br.ReadInt16(); - Unk52 = br.ReadInt16(); - Unk53 = br.ReadInt16(); - Unk54 = br.ReadInt16(); - Unk55 = br.ReadSingle(); + LandingGearDeploy = br.ReadUInt32(); + LandingGearRetract = br.ReadUInt32(); + Ignition = br.ReadUInt32(); + TyreSqueal = br.ReadUInt32(); + BankingThrottleVolumeCurve = br.ReadUInt32(); + BankingThrottlePitchCurve = br.ReadUInt32(); + BankingAngleVolCurve = br.ReadUInt32(); + AfterburnerLoop = br.ReadUInt32(); + BankingStyle = br.ReadInt32(); + AfterburnerThrottleVolCurve = br.ReadUInt32(); + EngineSynthDef = br.ReadUInt32(); + EngineSynthPreset = br.ReadUInt32(); + ExhaustSynthDef = br.ReadUInt32(); + ExhaustSynthPreset = br.ReadUInt32(); + EngineSubmixVoice = br.ReadUInt32(); + ExhaustSubmixVoice = br.ReadUInt32(); + PropellorBreakOneShot = br.ReadUInt32(); + WindNoise = br.ReadUInt32(); + PeelingPitchCurve = br.ReadUInt32(); + DivingFactor = br.ReadInt16(); + MaxDivePitch = br.ReadInt16(); + DiveAirSpeedThreshold = br.ReadInt16(); + DivingRateApproachingGround = br.ReadInt16(); + PeelingAfterburnerPitchScalingFactor = br.ReadSingle(); Rudder = br.ReadUInt32(); - WingFlap = br.ReadUInt32(); - TailFlap = br.ReadUInt32(); - DoorOpenStart = br.ReadUInt32(); - DoorCloseStart = br.ReadUInt32(); - Collision = br.ReadUInt32(); - Fire = br.ReadUInt32(); - EngineDamage = br.ReadUInt32(); - Unk64 = br.ReadInt32(); + Aileron = br.ReadUInt32(); + Elevator = br.ReadUInt32(); + DoorStartOpen = br.ReadUInt32(); + DoorStartClose = br.ReadUInt32(); + VehicleCollisions = br.ReadUInt32(); + FireAudio = br.ReadUInt32(); + EngineMissFire = br.ReadUInt32(); + IsRealLODRange = br.ReadUInt32(); SuspensionUp = br.ReadUInt32(); SuspensionDown = br.ReadUInt32(); - Unk67 = br.ReadSingle(); - Unk68 = br.ReadSingle(); - Unk69 = br.ReadUInt32(); - Unk70 = br.ReadUInt32(); - Unk71 = br.ReadUInt32(); - Unk72 = br.ReadUInt32(); - Damage = br.ReadUInt32(); - Unk74 = br.ReadUInt32(); - Unk75 = br.ReadSingle(); - Unk76 = br.ReadUInt32(); - Divebomb = br.ReadUInt32(); - Unk78 = br.ReadInt16(); - Unk79 = br.ReadInt16(); - Unk80 = br.ReadInt16(); - Unk81 = br.ReadInt16(); - Unk82 = br.ReadSingle(); - Unk83 = br.ReadSingle(); - Unk84 = br.ReadSingle(); - ThrustBank = br.ReadUInt32(); - Unk86 = br.ReadUInt32(); + MinSuspCompThresh = br.ReadSingle(); + MaxSuspCompThresh = br.ReadSingle(); + DamageEngineSpeedVolumeCurve = br.ReadUInt32(); + DamageEngineSpeedPitchCurve = br.ReadUInt32(); + DamageHealthVolumeCurve = br.ReadUInt32(); + TurbineWindDown = br.ReadUInt32(); + JetDamageLoop = br.ReadUInt32(); + AfterburnerThrottlePitchCurve = br.ReadUInt32(); + NPCEngineSmoothAmount = br.ReadSingle(); + FlybySound = br.ReadUInt32(); + DivingSound = br.ReadUInt32(); + DivingSoundPitchFactor = br.ReadInt16(); + DivingSoundVolumeFactor = br.ReadInt16(); + MaxDiveSoundPitch = br.ReadInt16(); + RadioType = br.ReadInt16(); + AircraftWarningSeriousDamageThresh = br.ReadSingle(); + AircraftWarningCriticalDamageThresh = br.ReadSingle(); + AircraftWarningMaxSpeed = br.ReadSingle(); + SimpleSoundForLoading = br.ReadUInt32(); + FlyAwaySound = br.ReadUInt32(); Version = 0; var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft == 40) + if (bytesleft == 40) // If remaining bytes is equal to 40, write values { Version = 1; - Unk87 = br.ReadUInt32(); - Unk88 = br.ReadUInt32(); - Unk89 = br.ReadUInt32(); - Unk90 = br.ReadUInt32(); - Unk91 = br.ReadUInt32(); - Unk92 = br.ReadSingle(); - Unk93 = br.ReadUInt32(); - Unk94 = br.ReadUInt32(); - Unk95 = br.ReadUInt32(); - Unk96 = br.ReadUInt32(); + VehicleRainSound = br.ReadUInt32(); + VehicleRainSoundInterior = br.ReadUInt32(); + CabinToneLoop = br.ReadUInt32(); + WaveHitSound = br.ReadUInt32(); + WaveHitBigAirSound = br.ReadUInt32(); + BigAirMinTime = br.ReadSingle(); + LeftWaterSound = br.ReadUInt32(); + IdleHullSlapLoop = br.ReadUInt32(); + IdleHullSlapSpeedToVol = br.ReadUInt32(); + WaterTurbulenceSound = br.ReadUInt32(); } - - - bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Engine); - bw.Write(Exhaust); - bw.Write(Idle); - bw.Write(Distance); - bw.Write(Propeller); - bw.Write(Banking); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Unk24); - bw.Write(Unk25); - bw.Write(Unk26); - bw.Write(Unk27); + bw.Write(EngineLoop); + bw.Write(ExhaustLoop); + bw.Write(IdleLoop); + bw.Write(DistanceLoop); + bw.Write(PropellorLoop); + bw.Write(BankingLoop); + bw.Write(EngineConeFrontAngle); + bw.Write(EngineConeRearAngle); + bw.Write(EngineConeAtten); + bw.Write(ExhaustConeFrontAngle); + bw.Write(ExhaustConeRearAngle); + bw.Write(ExhaustConeAtten); + bw.Write(PropellorConeFrontAngle); + bw.Write(PropellorConeRearAngle); + bw.Write(PropellorConeAtten); + bw.Write(padding00); + bw.Write(EngineThrottleVolumeCurve); + bw.Write(EngineThrottlePitchCurve); + bw.Write(ExhaustThrottleVolumeCurve); + bw.Write(ExhaustThrottlePitchCurve); + bw.Write(PropellorThrottleVolumeCurve); + bw.Write(PropellorThrottlePitchCurve); + bw.Write(IdleThrottleVolumeCurve); + bw.Write(IdleThrottlePitchCurve); + bw.Write(DistanceThrottleVolumeCurve); + bw.Write(DistanceThrottlePitchCurve); + bw.Write(DistanceVolumeCurve); bw.Write(StallWarning); bw.Write(DoorOpen); bw.Write(DoorClose); bw.Write(DoorLimit); - bw.Write(GearDeploy); - bw.Write(GearRetract); - bw.Write(Startup); - bw.Write(TyreLand); - bw.Write(Unk36); - bw.Write(Unk37); - bw.Write(Unk38); - bw.Write(Afterburner); - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(PropTransAndEq); - bw.Write(PropTransAndEqPreset); - bw.Write(Unk44); - bw.Write(Unk45); - bw.Write(Unk46); - bw.Write(Unk47); - bw.Write(EngineBreakdown); - bw.Write(Unk49); - bw.Write(Unk50); - bw.Write(Unk51); - bw.Write(Unk52); - bw.Write(Unk53); - bw.Write(Unk54); - bw.Write(Unk55); + bw.Write(LandingGearDeploy); + bw.Write(LandingGearRetract); + bw.Write(Ignition); + bw.Write(TyreSqueal); + bw.Write(BankingThrottleVolumeCurve); + bw.Write(BankingThrottlePitchCurve); + bw.Write(BankingAngleVolCurve); + bw.Write(AfterburnerLoop); + bw.Write(BankingStyle); + bw.Write(AfterburnerThrottleVolCurve); + bw.Write(EngineSynthDef); + bw.Write(EngineSynthPreset); + bw.Write(ExhaustSynthDef); + bw.Write(ExhaustSynthPreset); + bw.Write(EngineSubmixVoice); + bw.Write(ExhaustSubmixVoice); + bw.Write(PropellorBreakOneShot); + bw.Write(WindNoise); + bw.Write(PeelingPitchCurve); + bw.Write(DivingFactor); + bw.Write(MaxDivePitch); + bw.Write(DiveAirSpeedThreshold); + bw.Write(DivingRateApproachingGround); + bw.Write(PeelingAfterburnerPitchScalingFactor); bw.Write(Rudder); - bw.Write(WingFlap); - bw.Write(TailFlap); - bw.Write(DoorOpenStart); - bw.Write(DoorCloseStart); - bw.Write(Collision); - bw.Write(Fire); - bw.Write(EngineDamage); - bw.Write(Unk64); + bw.Write(Aileron); + bw.Write(Elevator); + bw.Write(DoorStartOpen); + bw.Write(DoorStartClose); + bw.Write(VehicleCollisions); + bw.Write(FireAudio); + bw.Write(EngineMissFire); + bw.Write(IsRealLODRange); bw.Write(SuspensionUp); bw.Write(SuspensionDown); - bw.Write(Unk67); - bw.Write(Unk68); - bw.Write(Unk69); - bw.Write(Unk70); - bw.Write(Unk71); - bw.Write(Unk72); - bw.Write(Damage); - bw.Write(Unk74); - bw.Write(Unk75); - bw.Write(Unk76); - bw.Write(Divebomb); - bw.Write(Unk78); - bw.Write(Unk79); - bw.Write(Unk80); - bw.Write(Unk81); - bw.Write(Unk82); - bw.Write(Unk83); - bw.Write(Unk84); - bw.Write(ThrustBank); - bw.Write(Unk86); + bw.Write(MinSuspCompThresh); + bw.Write(MaxSuspCompThresh); + bw.Write(DamageEngineSpeedVolumeCurve); + bw.Write(DamageEngineSpeedPitchCurve); + bw.Write(DamageHealthVolumeCurve); + bw.Write(TurbineWindDown); + bw.Write(JetDamageLoop); + bw.Write(AfterburnerThrottlePitchCurve); + bw.Write(NPCEngineSmoothAmount); + bw.Write(FlybySound); + bw.Write(DivingSound); + bw.Write(DivingSoundPitchFactor); + bw.Write(DivingSoundVolumeFactor); + bw.Write(MaxDiveSoundPitch); + bw.Write(RadioType); + bw.Write(AircraftWarningSeriousDamageThresh); + bw.Write(AircraftWarningCriticalDamageThresh); + bw.Write(AircraftWarningMaxSpeed); + bw.Write(SimpleSoundForLoading); + bw.Write(FlyAwaySound); if (Version >= 1) { - bw.Write(Unk87); - bw.Write(Unk88); - bw.Write(Unk89); - bw.Write(Unk90); - bw.Write(Unk91); - bw.Write(Unk92); - bw.Write(Unk93); - bw.Write(Unk94); - bw.Write(Unk95); - bw.Write(Unk96); + bw.Write(VehicleRainSound); + bw.Write(VehicleRainSoundInterior); + bw.Write(CabinToneLoop); + bw.Write(WaveHitSound); + bw.Write(WaveHitBigAirSound); + bw.Write(BigAirMinTime); + bw.Write(LeftWaterSound); + bw.Write(IdleHullSlapLoop); + bw.Write(IdleHullSlapSpeedToVol); + bw.Write(WaterTurbulenceSound); } } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Version", Version.ToString()); //CW invention, not an actual field! - RelXml.StringTag(sb, indent, "Engine", RelXml.HashString(Engine)); - RelXml.StringTag(sb, indent, "Exhaust", RelXml.HashString(Exhaust)); - RelXml.StringTag(sb, indent, "Idle", RelXml.HashString(Idle)); - RelXml.StringTag(sb, indent, "Distance", RelXml.HashString(Distance)); - RelXml.StringTag(sb, indent, "Propeller", RelXml.HashString(Propeller)); - RelXml.StringTag(sb, indent, "Banking", RelXml.HashString(Banking)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); - RelXml.StringTag(sb, indent, "Unk19", RelXml.HashString(Unk19)); - RelXml.StringTag(sb, indent, "Unk20", RelXml.HashString(Unk20)); - RelXml.StringTag(sb, indent, "Unk21", RelXml.HashString(Unk21)); - RelXml.StringTag(sb, indent, "Unk22", RelXml.HashString(Unk22)); - RelXml.StringTag(sb, indent, "Unk23", RelXml.HashString(Unk23)); - RelXml.StringTag(sb, indent, "Unk24", RelXml.HashString(Unk24)); - RelXml.StringTag(sb, indent, "Unk25", RelXml.HashString(Unk25)); - RelXml.StringTag(sb, indent, "Unk26", RelXml.HashString(Unk26)); - RelXml.StringTag(sb, indent, "Unk27", RelXml.HashString(Unk27)); + RelXml.ValueTag(sb, indent, "Version", Version.ToString()); + RelXml.StringTag(sb, indent, "EngineLoop", RelXml.HashString(EngineLoop)); + RelXml.StringTag(sb, indent, "ExhaustLoop", RelXml.HashString(ExhaustLoop)); + RelXml.StringTag(sb, indent, "IdleLoop", RelXml.HashString(IdleLoop)); + RelXml.StringTag(sb, indent, "DistanceLoop", RelXml.HashString(DistanceLoop)); + RelXml.StringTag(sb, indent, "PropellorLoop", RelXml.HashString(PropellorLoop)); + RelXml.StringTag(sb, indent, "BankingLoop", RelXml.HashString(BankingLoop)); + RelXml.ValueTag(sb, indent, "EngineConeFrontAngle", EngineConeFrontAngle.ToString()); + RelXml.ValueTag(sb, indent, "EngineConeRearAngle", EngineConeRearAngle.ToString()); + RelXml.ValueTag(sb, indent, "EngineConeAtten", EngineConeAtten.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustConeFrontAngle", ExhaustConeFrontAngle.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustConeRearAngle", ExhaustConeRearAngle.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustConeAtten", ExhaustConeAtten.ToString()); + RelXml.ValueTag(sb, indent, "PropellorConeFrontAngle", PropellorConeFrontAngle.ToString()); + RelXml.ValueTag(sb, indent, "PropellorConeRearAngle", PropellorConeRearAngle.ToString()); + RelXml.ValueTag(sb, indent, "PropellorConeAtten", PropellorConeAtten.ToString()); + RelXml.StringTag(sb, indent, "EngineThrottleVolumeCurve", RelXml.HashString(EngineThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "EngineThrottlePitchCurve", RelXml.HashString(EngineThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "ExhaustThrottleVolumeCurve", RelXml.HashString(ExhaustThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "ExhaustThrottlePitchCurve", RelXml.HashString(ExhaustThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "PropellorThrottleVolumeCurve", RelXml.HashString(PropellorThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "PropellorThrottlePitchCurve", RelXml.HashString(PropellorThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "IdleThrottleVolumeCurve", RelXml.HashString(IdleThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "IdleThrottlePitchCurve", RelXml.HashString(IdleThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "DistanceThrottleVolumeCurve", RelXml.HashString(DistanceThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "DistanceThrottlePitchCurve", RelXml.HashString(DistanceThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "DistanceVolumeCurve", RelXml.HashString(DistanceVolumeCurve)); RelXml.StringTag(sb, indent, "StallWarning", RelXml.HashString(StallWarning)); RelXml.StringTag(sb, indent, "DoorOpen", RelXml.HashString(DoorOpen)); RelXml.StringTag(sb, indent, "DoorClose", RelXml.HashString(DoorClose)); RelXml.StringTag(sb, indent, "DoorLimit", RelXml.HashString(DoorLimit)); - RelXml.StringTag(sb, indent, "GearDeploy", RelXml.HashString(GearDeploy)); - RelXml.StringTag(sb, indent, "GearRetract", RelXml.HashString(GearRetract)); - RelXml.StringTag(sb, indent, "Startup", RelXml.HashString(Startup)); - RelXml.StringTag(sb, indent, "TyreLand", RelXml.HashString(TyreLand)); - RelXml.StringTag(sb, indent, "Unk36", RelXml.HashString(Unk36)); - RelXml.StringTag(sb, indent, "Unk37", RelXml.HashString(Unk37)); - RelXml.StringTag(sb, indent, "Unk38", RelXml.HashString(Unk38)); - RelXml.StringTag(sb, indent, "Afterburner", RelXml.HashString(Afterburner)); - RelXml.ValueTag(sb, indent, "Unk40", Unk40.ToString()); - RelXml.StringTag(sb, indent, "Unk41", RelXml.HashString(Unk41)); - RelXml.StringTag(sb, indent, "PropTransAndEq", RelXml.HashString(PropTransAndEq)); - RelXml.StringTag(sb, indent, "PropTransAndEqPreset", RelXml.HashString(PropTransAndEqPreset)); - RelXml.StringTag(sb, indent, "Unk44", RelXml.HashString(Unk44)); - RelXml.StringTag(sb, indent, "Unk45", RelXml.HashString(Unk45)); - RelXml.StringTag(sb, indent, "Unk46", RelXml.HashString(Unk46)); - RelXml.StringTag(sb, indent, "Unk47", RelXml.HashString(Unk47)); - RelXml.StringTag(sb, indent, "EngineBreakdown", RelXml.HashString(EngineBreakdown)); - RelXml.StringTag(sb, indent, "Unk49", RelXml.HashString(Unk49)); - RelXml.StringTag(sb, indent, "Unk50", RelXml.HashString(Unk50)); - RelXml.ValueTag(sb, indent, "Unk51", Unk51.ToString()); - RelXml.ValueTag(sb, indent, "Unk52", Unk52.ToString()); - RelXml.ValueTag(sb, indent, "Unk53", Unk53.ToString()); - RelXml.ValueTag(sb, indent, "Unk54", Unk54.ToString()); - RelXml.ValueTag(sb, indent, "Unk55", FloatUtil.ToString(Unk55)); + RelXml.StringTag(sb, indent, "LandingGearDeploy", RelXml.HashString(LandingGearDeploy)); + RelXml.StringTag(sb, indent, "LandingGearRetract", RelXml.HashString(LandingGearRetract)); + RelXml.StringTag(sb, indent, "Ignition", RelXml.HashString(Ignition)); + RelXml.StringTag(sb, indent, "TyreSqueal", RelXml.HashString(TyreSqueal)); + RelXml.StringTag(sb, indent, "BankingThrottleVolumeCurve", RelXml.HashString(BankingThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "BankingThrottlePitchCurve", RelXml.HashString(BankingThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "BankingAngleVolCurve", RelXml.HashString(BankingAngleVolCurve)); + RelXml.StringTag(sb, indent, "AfterburnerLoop", RelXml.HashString(AfterburnerLoop)); + RelXml.ValueTag(sb, indent, "BankingStyle", BankingStyle.ToString()); + RelXml.StringTag(sb, indent, "AfterburnerThrottleVolCurve", RelXml.HashString(AfterburnerThrottleVolCurve)); + RelXml.StringTag(sb, indent, "EngineSynthDef", RelXml.HashString(EngineSynthDef)); + RelXml.StringTag(sb, indent, "EngineSynthPreset", RelXml.HashString(EngineSynthPreset)); + RelXml.StringTag(sb, indent, "ExhaustSynthDef", RelXml.HashString(ExhaustSynthDef)); + RelXml.StringTag(sb, indent, "ExhaustSynthPreset", RelXml.HashString(ExhaustSynthPreset)); + RelXml.StringTag(sb, indent, "EngineSubmixVoice", RelXml.HashString(EngineSubmixVoice)); + RelXml.StringTag(sb, indent, "ExhaustSubmixVoice", RelXml.HashString(ExhaustSubmixVoice)); + RelXml.StringTag(sb, indent, "PropellorBreakOneShot", RelXml.HashString(PropellorBreakOneShot)); + RelXml.StringTag(sb, indent, "WindNoise", RelXml.HashString(WindNoise)); + RelXml.StringTag(sb, indent, "PeelingPitchCurve", RelXml.HashString(PeelingPitchCurve)); + RelXml.ValueTag(sb, indent, "DivingFactor", DivingFactor.ToString()); + RelXml.ValueTag(sb, indent, "MaxDivePitch", MaxDivePitch.ToString()); + RelXml.ValueTag(sb, indent, "DiveAirSpeedThreshold", DiveAirSpeedThreshold.ToString()); + RelXml.ValueTag(sb, indent, "DivingRateApproachingGround", DivingRateApproachingGround.ToString()); + RelXml.ValueTag(sb, indent, "PeelingAfterburnerPitchScalingFactor", FloatUtil.ToString(PeelingAfterburnerPitchScalingFactor)); RelXml.StringTag(sb, indent, "Rudder", RelXml.HashString(Rudder)); - RelXml.StringTag(sb, indent, "WingFlap", RelXml.HashString(WingFlap)); - RelXml.StringTag(sb, indent, "TailFlap", RelXml.HashString(TailFlap)); - RelXml.StringTag(sb, indent, "DoorOpenStart", RelXml.HashString(DoorOpenStart)); - RelXml.StringTag(sb, indent, "DoorCloseStart", RelXml.HashString(DoorCloseStart)); - RelXml.StringTag(sb, indent, "Collision", RelXml.HashString(Collision)); - RelXml.StringTag(sb, indent, "Fire", RelXml.HashString(Fire)); - RelXml.StringTag(sb, indent, "EngineDamage", RelXml.HashString(EngineDamage)); - RelXml.ValueTag(sb, indent, "Unk64", Unk64.ToString()); + RelXml.StringTag(sb, indent, "Aileron", RelXml.HashString(Aileron)); + RelXml.StringTag(sb, indent, "Elevator", RelXml.HashString(Elevator)); + RelXml.StringTag(sb, indent, "DoorStartOpen", RelXml.HashString(DoorStartOpen)); + RelXml.StringTag(sb, indent, "DoorStartClose", RelXml.HashString(DoorStartClose)); + RelXml.StringTag(sb, indent, "VehicleCollisions", RelXml.HashString(VehicleCollisions)); + RelXml.StringTag(sb, indent, "FireAudio", RelXml.HashString(FireAudio)); + RelXml.StringTag(sb, indent, "EngineMissFire", RelXml.HashString(EngineMissFire)); + RelXml.ValueTag(sb, indent, "IsRealLODRange", IsRealLODRange.ToString()); RelXml.StringTag(sb, indent, "SuspensionUp", RelXml.HashString(SuspensionUp)); RelXml.StringTag(sb, indent, "SuspensionDown", RelXml.HashString(SuspensionDown)); - RelXml.ValueTag(sb, indent, "Unk67", FloatUtil.ToString(Unk67)); - RelXml.ValueTag(sb, indent, "Unk68", FloatUtil.ToString(Unk68)); - RelXml.StringTag(sb, indent, "Unk69", RelXml.HashString(Unk69)); - RelXml.StringTag(sb, indent, "Unk70", RelXml.HashString(Unk70)); - RelXml.StringTag(sb, indent, "Unk71", RelXml.HashString(Unk71)); - RelXml.StringTag(sb, indent, "Unk72", RelXml.HashString(Unk72)); - RelXml.StringTag(sb, indent, "Damage", RelXml.HashString(Damage)); - RelXml.StringTag(sb, indent, "Unk74", RelXml.HashString(Unk74)); - RelXml.ValueTag(sb, indent, "Unk75", FloatUtil.ToString(Unk75)); - RelXml.StringTag(sb, indent, "Unk76", RelXml.HashString(Unk76)); - RelXml.StringTag(sb, indent, "Divebomb", RelXml.HashString(Divebomb)); - RelXml.ValueTag(sb, indent, "Unk78", Unk78.ToString()); - RelXml.ValueTag(sb, indent, "Unk79", Unk79.ToString()); - RelXml.ValueTag(sb, indent, "Unk80", Unk80.ToString()); - RelXml.ValueTag(sb, indent, "Unk81", Unk81.ToString()); - RelXml.ValueTag(sb, indent, "Unk82", FloatUtil.ToString(Unk82)); - RelXml.ValueTag(sb, indent, "Unk83", FloatUtil.ToString(Unk83)); - RelXml.ValueTag(sb, indent, "Unk84", FloatUtil.ToString(Unk84)); - RelXml.StringTag(sb, indent, "ThrustBank", RelXml.HashString(ThrustBank)); - RelXml.StringTag(sb, indent, "Unk86", RelXml.HashString(Unk86)); + RelXml.ValueTag(sb, indent, "MinSuspCompThresh", FloatUtil.ToString(MinSuspCompThresh)); + RelXml.ValueTag(sb, indent, "MaxSuspCompThresh", FloatUtil.ToString(MaxSuspCompThresh)); + RelXml.StringTag(sb, indent, "DamageEngineSpeedVolumeCurve", RelXml.HashString(DamageEngineSpeedVolumeCurve)); + RelXml.StringTag(sb, indent, "DamageEngineSpeedPitchCurve", RelXml.HashString(DamageEngineSpeedPitchCurve)); + RelXml.StringTag(sb, indent, "DamageHealthVolumeCurve", RelXml.HashString(DamageHealthVolumeCurve)); + RelXml.StringTag(sb, indent, "TurbineWindDown", RelXml.HashString(TurbineWindDown)); + RelXml.StringTag(sb, indent, "JetDamageLoop", RelXml.HashString(JetDamageLoop)); + RelXml.StringTag(sb, indent, "AfterburnerThrottlePitchCurve", RelXml.HashString(AfterburnerThrottlePitchCurve)); + RelXml.ValueTag(sb, indent, "NPCEngineSmoothAmount", FloatUtil.ToString(NPCEngineSmoothAmount)); + RelXml.StringTag(sb, indent, "FlybySound", RelXml.HashString(FlybySound)); + RelXml.StringTag(sb, indent, "DivingSound", RelXml.HashString(DivingSound)); + RelXml.ValueTag(sb, indent, "DivingSoundPitchFactor", DivingSoundPitchFactor.ToString()); + RelXml.ValueTag(sb, indent, "DivingSoundVolumeFactor", DivingSoundVolumeFactor.ToString()); + RelXml.ValueTag(sb, indent, "MaxDiveSoundPitch", MaxDiveSoundPitch.ToString()); + RelXml.ValueTag(sb, indent, "RadioType", RadioType.ToString()); + RelXml.ValueTag(sb, indent, "AircraftWarningSeriousDamageThresh", FloatUtil.ToString(AircraftWarningSeriousDamageThresh)); + RelXml.ValueTag(sb, indent, "AircraftWarningCriticalDamageThresh", FloatUtil.ToString(AircraftWarningCriticalDamageThresh)); + RelXml.ValueTag(sb, indent, "AircraftWarningMaxSpeed", FloatUtil.ToString(AircraftWarningMaxSpeed)); + RelXml.StringTag(sb, indent, "SimpleSoundForLoading", RelXml.HashString(SimpleSoundForLoading)); + RelXml.StringTag(sb, indent, "FlyAwaySound", RelXml.HashString(FlyAwaySound)); if (Version >= 1) { - RelXml.StringTag(sb, indent, "Unk87", RelXml.HashString(Unk87)); - RelXml.StringTag(sb, indent, "Unk88", RelXml.HashString(Unk88)); - RelXml.StringTag(sb, indent, "Unk89", RelXml.HashString(Unk89)); - RelXml.StringTag(sb, indent, "Unk90", RelXml.HashString(Unk90)); - RelXml.StringTag(sb, indent, "Unk91", RelXml.HashString(Unk91)); - RelXml.ValueTag(sb, indent, "Unk92", FloatUtil.ToString(Unk92)); - RelXml.StringTag(sb, indent, "Unk93", RelXml.HashString(Unk93)); - RelXml.StringTag(sb, indent, "Unk94", RelXml.HashString(Unk94)); - RelXml.StringTag(sb, indent, "Unk95", RelXml.HashString(Unk95)); - RelXml.StringTag(sb, indent, "Unk96", RelXml.HashString(Unk96)); + RelXml.StringTag(sb, indent, "VehicleRainSound", RelXml.HashString(VehicleRainSound)); + RelXml.StringTag(sb, indent, "VehicleRainSoundInterior", RelXml.HashString(VehicleRainSoundInterior)); + RelXml.StringTag(sb, indent, "CabinToneLoop", RelXml.HashString(CabinToneLoop)); + RelXml.StringTag(sb, indent, "WaveHitSound", RelXml.HashString(WaveHitSound)); + RelXml.StringTag(sb, indent, "WaveHitBigAirSound", RelXml.HashString(WaveHitBigAirSound)); + RelXml.ValueTag(sb, indent, "BigAirMinTime", FloatUtil.ToString(BigAirMinTime)); + RelXml.StringTag(sb, indent, "LeftWaterSound", RelXml.HashString(LeftWaterSound)); + RelXml.StringTag(sb, indent, "IdleHullSlapLoop", RelXml.HashString(IdleHullSlapLoop)); + RelXml.StringTag(sb, indent, "IdleHullSlapSpeedToVol", RelXml.HashString(IdleHullSlapSpeedToVol)); + RelXml.StringTag(sb, indent, "WaterTurbulenceSound", RelXml.HashString(WaterTurbulenceSound)); } } @@ -13597,552 +13052,539 @@ namespace CodeWalker.GameFiles { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Version = Xml.GetChildIntAttribute(node, "Version", "value"); - Engine = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine")); - Exhaust = XmlRel.GetHash(Xml.GetChildInnerText(node, "Exhaust")); - Idle = XmlRel.GetHash(Xml.GetChildInnerText(node, "Idle")); - Distance = XmlRel.GetHash(Xml.GetChildInnerText(node, "Distance")); - Propeller = XmlRel.GetHash(Xml.GetChildInnerText(node, "Propeller")); - Banking = XmlRel.GetHash(Xml.GetChildInnerText(node, "Banking")); - Unk07 = (short)Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = (short)Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = (short)Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = (short)Xml.GetChildIntAttribute(node, "Unk10", "value"); - Unk11 = (short)Xml.GetChildIntAttribute(node, "Unk11", "value"); - Unk12 = (short)Xml.GetChildIntAttribute(node, "Unk12", "value"); - Unk13 = (short)Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = (short)Xml.GetChildIntAttribute(node, "Unk14", "value"); - Unk15 = (short)Xml.GetChildIntAttribute(node, "Unk15", "value"); - Unk16 = (short)Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); - Unk19 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk19")); - Unk20 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk20")); - Unk21 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk21")); - Unk22 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk22")); - Unk23 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk23")); - Unk24 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk24")); - Unk25 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk25")); - Unk26 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk26")); - Unk27 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk27")); + EngineLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineLoop")); + ExhaustLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustLoop")); + IdleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleLoop")); + DistanceLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistanceLoop")); + PropellorLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "PropellorLoop")); + BankingLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingLoop")); + EngineConeFrontAngle = (ushort)Xml.GetChildIntAttribute(node, "EngineConeFrontAngle", "value"); + EngineConeRearAngle = (ushort)Xml.GetChildIntAttribute(node, "EngineConeRearAngle", "value"); + EngineConeAtten = (short)Xml.GetChildIntAttribute(node, "EngineConeAtten", "value"); + ExhaustConeFrontAngle = (ushort)Xml.GetChildIntAttribute(node, "ExhaustConeFrontAngle", "value"); + ExhaustConeRearAngle = (ushort)Xml.GetChildIntAttribute(node, "ExhaustConeRearAngle", "value"); + ExhaustConeAtten = (short)Xml.GetChildIntAttribute(node, "ExhaustConeAtten", "value"); + PropellorConeFrontAngle = (ushort)Xml.GetChildIntAttribute(node, "PropellorConeFrontAngle", "value"); + PropellorConeRearAngle = (ushort)Xml.GetChildIntAttribute(node, "PropellorConeRearAngle", "value"); + PropellorConeAtten = (short)Xml.GetChildIntAttribute(node, "PropellorConeAtten", "value"); + EngineThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineThrottleVolumeCurve")); + EngineThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineThrottlePitchCurve")); + ExhaustThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustThrottleVolumeCurve")); + ExhaustThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustThrottlePitchCurve")); + PropellorThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "PropellorThrottleVolumeCurve")); + PropellorThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "PropellorThrottlePitchCurve")); + IdleThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleThrottleVolumeCurve")); + IdleThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleThrottlePitchCurve")); + DistanceThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistanceThrottleVolumeCurve")); + DistanceThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistanceThrottlePitchCurve")); + DistanceVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistanceVolumeCurve")); StallWarning = XmlRel.GetHash(Xml.GetChildInnerText(node, "StallWarning")); DoorOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorOpen")); DoorClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorClose")); DoorLimit = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorLimit")); - GearDeploy = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearDeploy")); - GearRetract = XmlRel.GetHash(Xml.GetChildInnerText(node, "GearRetract")); - Startup = XmlRel.GetHash(Xml.GetChildInnerText(node, "Startup")); - TyreLand = XmlRel.GetHash(Xml.GetChildInnerText(node, "TyreLand")); - Unk36 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk36")); - Unk37 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk37")); - Unk38 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk38")); - Afterburner = XmlRel.GetHash(Xml.GetChildInnerText(node, "Afterburner")); - Unk40 = Xml.GetChildIntAttribute(node, "Unk40", "value"); - Unk41 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk41")); - PropTransAndEq = XmlRel.GetHash(Xml.GetChildInnerText(node, "PropTransAndEq")); - PropTransAndEqPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "PropTransAndEqPreset")); - Unk44 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk44")); - Unk45 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk45")); - Unk46 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk46")); - Unk47 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk47")); - EngineBreakdown = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineBreakdown")); - Unk49 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk49")); - Unk50 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk50")); - Unk51 = (short)Xml.GetChildIntAttribute(node, "Unk51", "value"); - Unk52 = (short)Xml.GetChildIntAttribute(node, "Unk52", "value"); - Unk53 = (short)Xml.GetChildIntAttribute(node, "Unk53", "value"); - Unk54 = (short)Xml.GetChildIntAttribute(node, "Unk54", "value"); - Unk55 = Xml.GetChildFloatAttribute(node, "Unk55", "value"); + LandingGearDeploy = XmlRel.GetHash(Xml.GetChildInnerText(node, "LandingGearDeploy")); + LandingGearRetract = XmlRel.GetHash(Xml.GetChildInnerText(node, "LandingGearRetract")); + Ignition = XmlRel.GetHash(Xml.GetChildInnerText(node, "Ignition")); + TyreSqueal = XmlRel.GetHash(Xml.GetChildInnerText(node, "TyreSqueal")); + BankingThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingThrottleVolumeCurve")); + BankingThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingThrottlePitchCurve")); + BankingAngleVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingAngleVolCurve")); + AfterburnerLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "AfterburnerLoop")); + BankingStyle = Xml.GetChildIntAttribute(node, "BankingStyle", "value"); + AfterburnerThrottleVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "AfterburnerThrottleVolCurve")); + EngineSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthDef")); + EngineSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthPreset")); + ExhaustSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthDef")); + ExhaustSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthPreset")); + EngineSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixVoice")); + ExhaustSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixVoice")); + PropellorBreakOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "PropellorBreakOneShot")); + WindNoise = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindNoise")); + PeelingPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "PeelingPitchCurve")); + DivingFactor = (short)Xml.GetChildIntAttribute(node, "DivingFactor", "value"); + MaxDivePitch = (short)Xml.GetChildIntAttribute(node, "MaxDivePitch", "value"); + DiveAirSpeedThreshold = (short)Xml.GetChildIntAttribute(node, "DiveAirSpeedThreshold", "value"); + DivingRateApproachingGround = (short)Xml.GetChildIntAttribute(node, "DivingRateApproachingGround", "value"); + PeelingAfterburnerPitchScalingFactor = Xml.GetChildFloatAttribute(node, "PeelingAfterburnerPitchScalingFactor", "value"); Rudder = XmlRel.GetHash(Xml.GetChildInnerText(node, "Rudder")); - WingFlap = XmlRel.GetHash(Xml.GetChildInnerText(node, "WingFlap")); - TailFlap = XmlRel.GetHash(Xml.GetChildInnerText(node, "TailFlap")); - DoorOpenStart = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorOpenStart")); - DoorCloseStart = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorCloseStart")); - Collision = XmlRel.GetHash(Xml.GetChildInnerText(node, "Collision")); - Fire = XmlRel.GetHash(Xml.GetChildInnerText(node, "Fire")); - EngineDamage = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineDamage")); - Unk64 = Xml.GetChildIntAttribute(node, "Unk64", "value"); + Aileron = XmlRel.GetHash(Xml.GetChildInnerText(node, "Aileron")); + Elevator = XmlRel.GetHash(Xml.GetChildInnerText(node, "Elevator")); + DoorStartOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorStartOpen")); + DoorStartClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorStartClose")); + VehicleCollisions = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCollisions")); + FireAudio = XmlRel.GetHash(Xml.GetChildInnerText(node, "FireAudio")); + EngineMissFire = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineMissFire")); + IsRealLODRange = Xml.GetChildUIntAttribute(node, "IsRealLODRange", "value"); SuspensionUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionUp")); SuspensionDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionDown")); - Unk67 = Xml.GetChildFloatAttribute(node, "Unk67", "value"); - Unk68 = Xml.GetChildFloatAttribute(node, "Unk68", "value"); - Unk69 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk69")); - Unk70 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk70")); - Unk71 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk71")); - Unk72 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk72")); - Damage = XmlRel.GetHash(Xml.GetChildInnerText(node, "Damage")); - Unk74 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk74")); - Unk75 = Xml.GetChildFloatAttribute(node, "Unk75", "value"); - Unk76 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk76")); - Divebomb = XmlRel.GetHash(Xml.GetChildInnerText(node, "Divebomb")); - Unk78 = (short)Xml.GetChildIntAttribute(node, "Unk78", "value"); - Unk79 = (short)Xml.GetChildIntAttribute(node, "Unk79", "value"); - Unk80 = (short)Xml.GetChildIntAttribute(node, "Unk80", "value"); - Unk81 = (short)Xml.GetChildIntAttribute(node, "Unk81", "value"); - Unk82 = Xml.GetChildFloatAttribute(node, "Unk82", "value"); - Unk83 = Xml.GetChildFloatAttribute(node, "Unk83", "value"); - Unk84 = Xml.GetChildFloatAttribute(node, "Unk84", "value"); - ThrustBank = XmlRel.GetHash(Xml.GetChildInnerText(node, "ThrustBank")); - Unk86 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk86")); + MinSuspCompThresh = Xml.GetChildFloatAttribute(node, "MinSuspCompThresh", "value"); + MaxSuspCompThresh = Xml.GetChildFloatAttribute(node, "MaxSuspCompThresh", "value"); + DamageEngineSpeedVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageEngineSpeedVolumeCurve")); + DamageEngineSpeedPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageEngineSpeedPitchCurve")); + DamageHealthVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageHealthVolumeCurve")); + TurbineWindDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurbineWindDown")); + JetDamageLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "JetDamageLoop")); + AfterburnerThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "AfterburnerThrottlePitchCurve")); + NPCEngineSmoothAmount = Xml.GetChildFloatAttribute(node, "NPCEngineSmoothAmount", "value"); + FlybySound = XmlRel.GetHash(Xml.GetChildInnerText(node, "FlybySound")); + DivingSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "DivingSound")); + DivingSoundPitchFactor = (short)Xml.GetChildIntAttribute(node, "DivingSoundPitchFactor", "value"); + DivingSoundVolumeFactor = (short)Xml.GetChildIntAttribute(node, "DivingSoundVolumeFactor", "value"); + MaxDiveSoundPitch = (short)Xml.GetChildIntAttribute(node, "MaxDiveSoundPitch", "value"); + RadioType = (short)Xml.GetChildIntAttribute(node, "RadioType", "value"); + AircraftWarningSeriousDamageThresh = Xml.GetChildFloatAttribute(node, "AircraftWarningSeriousDamageThresh", "value"); + AircraftWarningCriticalDamageThresh = Xml.GetChildFloatAttribute(node, "AircraftWarningCriticalDamageThresh", "value"); + AircraftWarningMaxSpeed = Xml.GetChildFloatAttribute(node, "AircraftWarningMaxSpeed", "value"); + SimpleSoundForLoading = XmlRel.GetHash(Xml.GetChildInnerText(node, "SimpleSoundForLoading")); + FlyAwaySound = XmlRel.GetHash(Xml.GetChildInnerText(node, "FlyAwaySound")); if (Version >= 1) { - Unk87 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk87")); - Unk88 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk88")); - Unk89 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk89")); - Unk90 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk90")); - Unk91 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk91")); - Unk92 = Xml.GetChildFloatAttribute(node, "Unk92", "value"); - Unk93 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk93")); - Unk94 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk94")); - Unk95 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk95")); - Unk96 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk96")); - + VehicleRainSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSound")); + VehicleRainSoundInterior = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSoundInterior")); + CabinToneLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "CabinToneLoop")); + WaveHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveHitSound")); + WaveHitBigAirSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveHitBigAirSound")); + BigAirMinTime = Xml.GetChildFloatAttribute(node, "BigAirMinTime", "value"); + LeftWaterSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "LeftWaterSound")); + IdleHullSlapLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleHullSlapLoop")); + IdleHullSlapSpeedToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleHullSlapSpeedToVol")); + WaterTurbulenceSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterTurbulenceSound")); } } public override MetaHash[] GetSynthHashes() { - return new[] { PropTransAndEq, PropTransAndEqPreset }; + return new[] { EngineSynthDef, EngineSynthPreset }; } public override MetaHash[] GetCurveHashes() { - return new[] { Unk17, Unk18, Unk19, Unk20, Unk21, Unk22, Unk23, Unk24, Unk25, Unk26, Unk27, Unk36, Unk37, Unk38, Unk41, Unk50, - Unk69, Unk70, Unk71, Unk74, Unk95 }; + return new[] { EngineThrottleVolumeCurve, EngineThrottlePitchCurve, ExhaustThrottleVolumeCurve, ExhaustThrottlePitchCurve, PropellorThrottleVolumeCurve, PropellorThrottlePitchCurve, IdleThrottleVolumeCurve, IdleThrottlePitchCurve, DistanceThrottleVolumeCurve, DistanceThrottlePitchCurve, DistanceVolumeCurve, BankingThrottleVolumeCurve, BankingThrottlePitchCurve, BankingAngleVolCurve, AfterburnerThrottleVolCurve, PeelingPitchCurve, + DamageEngineSpeedVolumeCurve, DamageEngineSpeedPitchCurve, DamageHealthVolumeCurve, AfterburnerThrottlePitchCurve, IdleHullSlapSpeedToVol }; } public override MetaHash[] GetSoundHashes() { - return new[] { Engine, Exhaust, Idle, Distance, Propeller, Banking, StallWarning, DoorOpen, DoorClose, DoorLimit, GearDeploy, GearRetract, - Startup, TyreLand, Afterburner, Unk46, Unk47, EngineBreakdown, Unk49, Rudder, WingFlap, TailFlap, DoorOpenStart, DoorCloseStart, Fire, EngineDamage, - SuspensionUp, SuspensionDown, Unk72, Damage, Unk76, Divebomb, ThrustBank, Unk86, Unk87, Unk88, Unk90, Unk91, Unk94, Unk96 }; + return new[] { EngineLoop, ExhaustLoop, IdleLoop, DistanceLoop, PropellorLoop, BankingLoop, StallWarning, DoorOpen, DoorClose, DoorLimit, LandingGearDeploy, LandingGearRetract, + Ignition, TyreSqueal, AfterburnerLoop, EngineSubmixVoice, ExhaustSubmixVoice, PropellorBreakOneShot, WindNoise, Rudder, Aileron, Elevator, DoorStartOpen, DoorStartClose, FireAudio, EngineMissFire, + SuspensionUp, SuspensionDown, TurbineWindDown, JetDamageLoop, FlybySound, DivingSound, SimpleSoundForLoading, FlyAwaySound, VehicleRainSound, VehicleRainSoundInterior, WaveHitSound, WaveHitBigAirSound, IdleHullSlapLoop, WaterTurbulenceSound }; } public override MetaHash[] GetGameHashes() { - return new[] { Collision }; + return new[] { VehicleCollisions }; } } - [TC(typeof(EXP))] public class Dat151Helicopter : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151HeliAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash MainRotor { get; set; } - public MetaHash TailRotor { get; set; }//rear_rotor_loop_vb - public MetaHash Exhaust { get; set; }//exhaust_loop_vb - public MetaHash Engine { get; set; } - public MetaHash InternalCabinTone { get; set; } - public float Unk06 { get; set; } - public MetaHash BankAngleVolume { get; set; } - public MetaHash BankThrottleVolume { get; set; } - public MetaHash BankThrottlePitch { get; set; } - public MetaHash RotorThrottleVolume { get; set; } - public MetaHash RotorThrottlePitch { get; set; } - public MetaHash RotorThrottleGap { get; set; } - public MetaHash TailRotorThrottleVolume { get; set; } - public MetaHash ExhaustThrottleVolume { get; set; } - public MetaHash ExhaustThrottlePitch { get; set; } - public short Unk16 { get; set; } - public short Unk17 { get; set; } - public short Unk18 { get; set; } - public short Unk19 { get; set; } - public short Unk20 { get; set; } - public short Unk21 { get; set; } - public short Unk22 { get; set; } - public short Unk23 { get; set; } - public short Unk24 { get; set; } - public short Unk25 { get; set; } - public MetaHash ThrottleResonance1 { get; set; } - public MetaHash ThrottleResonance2 { get; set; } - public MetaHash BankingResonance { get; set; } - public MetaHash RotorStartupVolume { get; set; } - public MetaHash BladeStartupVolume { get; set; } - public MetaHash RotorStartupPitch { get; set; } - public MetaHash RearRotorStartupVolume { get; set; } + public MetaHash RotorLoop { get; set; } + public MetaHash RearRotorLoop { get; set; } + public MetaHash ExhaustLoop { get; set; } + public MetaHash BankingLoop { get; set; } + public MetaHash CabinToneLoop { get; set; } + public float ThrottleSmoothRate { get; set; } + public MetaHash BankAngleVolumeCurve { get; set; } + public MetaHash BankThrottleVolumeCurve { get; set; } + public MetaHash BankThrottlePitchCurve { get; set; } + public MetaHash RotorThrottleVolumeCurve { get; set; } + public MetaHash RotorThrottlePitchCurve { get; set; } + public MetaHash RotorThrottleGapCurve { get; set; } + public MetaHash RearRotorThrottleVolumeCurve { get; set; } + public MetaHash ExhaustThrottleVolumeCurve { get; set; } + public MetaHash ExhaustThrottlePitchCurve { get; set; } + public ushort RotorConeFrontAngle { get; set; } + public ushort RotorConeRearAngle { get; set; } + public short RotorConeAtten { get; set; } + public ushort RearRotorConeFrontAngle { get; set; } + public ushort RearRotorConeRearAngle { get; set; } + public short RearRotorConeAtten { get; set; } + public ushort ExhaustConeFrontAngle { get; set; } + public ushort ExhaustConeRearAngle { get; set; } + public short ExhaustConeAtten { get; set; } + public short padding00 { get; set; } + public MetaHash Filter1ThrottleResonanceCurve { get; set; } + public MetaHash Filter2ThrottleResonanceCurve { get; set; } + public MetaHash BankingResonanceCurve { get; set; } + public MetaHash RotorVolumeStartupCurve { get; set; } + public MetaHash BladeVolumeStartupCurve { get; set; } + public MetaHash RotorPitchStartupCurve { get; set; } + public MetaHash RearRotorVolumeStartupCurve { get; set; } public MetaHash ExhaustStartupVolume { get; set; } - public MetaHash RotorStartupGap { get; set; } - public MetaHash Startup { get; set; }//startup - public short Unk36 { get; set; } - public short Unk37 { get; set; } - public short Unk38 { get; set; } - public short Unk39 { get; set; } - public int Unk40 { get; set; } - public MetaHash Unk41 { get; set; } - public MetaHash Unk42 { get; set; } - public MetaHash PoliceScannerCategory { get; set; } - public MetaHash PoliceScannerParams { get; set; }//scanner_params - public int RadioFlags { get; set; } + public MetaHash RotorGapStartupCurve { get; set; } + public MetaHash StartUpOneShot { get; set; } + public ushort BladeConeUpAngle { get; set; } + public ushort BladeConeDownAngle { get; set; } + public short BladeConeAtten { get; set; } + public ushort ThumpConeUpAngle { get; set; } + public ushort ThumpConeDownAngle { get; set; } + public short ThumpConeAtten { get; set; } + public MetaHash ScannerMake { get; set; } + public MetaHash ScannerModel { get; set; } + public MetaHash ScannerCategory { get; set; } + public MetaHash ScannerVehicleSettings { get; set; } + public int RadioType { get; set; } public MetaHash DoorOpen { get; set; } public MetaHash DoorClose { get; set; } public MetaHash DoorLimit { get; set; } - public MetaHash Damage { get; set; }//damage_loop_vb - public MetaHash Unk50 { get; set; }//curve - public int Unk51 { get; set; } - public MetaHash Unk52 { get; set; }//0 - public MetaHash Unk53 { get; set; }//0 - public MetaHash Unk54 { get; set; }//0 - public MetaHash Unk55 { get; set; }//0 - public MetaHash Unk56 { get; set; }//environment - public MetaHash Unk57 { get; set; }//environment - public MetaHash RotorBass { get; set; } - public MetaHash Unk59 { get; set; }//curve - public MetaHash Collision { get; set; }//vehicle_collision - public MetaHash Fire { get; set; } - public MetaHash Distant { get; set; }//distant_loop - public MetaHash Unk63 { get; set; } - public MetaHash Unk64 { get; set; } - public MetaHash Unk65 { get; set; } - public MetaHash Unk66 { get; set; } - public MetaHash SuspensionUp { get; set; }//suspension_up - public MetaHash SuspensionDown { get; set; }//suspension_down - public float SuspensionUpFrequency { get; set; } - public float SuspensionDownFrequency { get; set; } - public MetaHash DamageOneShots { get; set; }//damage_oneshots - public MetaHash DamageWarning { get; set; }//damage_warning + public MetaHash DamageLoop { get; set; } + public MetaHash RotorSpeedToTriggerSpeedCurve { get; set; } + public short RotorVolumePostSubmix { get; set; } + public short padding01 { get; set; } + public MetaHash EngineSynthDef { get; set; } + public MetaHash EngineSynthPreset { get; set; } + public MetaHash ExhaustSynthDef { get; set; } + public MetaHash ExhaustSynthPreset { get; set; } + public MetaHash EngineSubmixVoice { get; set; } + public MetaHash ExhaustSubmixVoice { get; set; } + public MetaHash RotorLowFreqLoop { get; set; } + public MetaHash ExhaustPitchStartupCurve { get; set; } + public MetaHash VehicleCollisions { get; set; } + public MetaHash FireAudio { get; set; } + public MetaHash DistantLoop { get; set; } + public MetaHash SecondaryDoorStartOpen { get; set; } + public MetaHash SecondaryDoorStartClose { get; set; } + public MetaHash SecondaryDoorClose { get; set; } + public MetaHash SecondaryDoorLimit { get; set; } + public MetaHash SuspensionUp { get; set; } + public MetaHash SuspensionDown { get; set; } + public float MinSuspCompThresh { get; set; } + public float MaxSuspCompThresh { get; set; } + public MetaHash DamageOneShots { get; set; } + public MetaHash DamageWarning { get; set; } public MetaHash TailBreak { get; set; } - public MetaHash MainRotorBreak { get; set; } - public MetaHash TailRotorBreak { get; set; } + public MetaHash RotorBreak { get; set; } + public MetaHash RearRotorBreak { get; set; } public MetaHash CableDeploy { get; set; } - public MetaHash Unk77 { get; set; } - public MetaHash HeatTicks { get; set; } - public MetaHash AltitudeWarning { get; set; }//altitude_warning - public MetaHash DamageVolumeCurve { get; set; } - public MetaHash DamageVolumeCurve2 { get; set; } - public MetaHash DamageBelow600 { get; set; }//damage_below_600_loop_vb - public float Unk83 { get; set; } - public float Unk84 { get; set; } - public float Unk85 { get; set; } - public MetaHash Jet { get; set; }//jet - public MetaHash PlayerSwitch { get; set; } - public MetaHash Unk88 { get; set; } - - public MetaHash Unk89 { get; set; } - public MetaHash Unk90 { get; set; } - public MetaHash StartupBroken { get; set; }//startup_broken + public MetaHash HardScrape { get; set; } + public MetaHash EngineCooling { get; set; } + public MetaHash AltitudeWarning { get; set; } + public MetaHash HealthToDamageVolumeCurve { get; set; } + public MetaHash HealthBelow600ToDamageVolumeCurve { get; set; } + public MetaHash DamageBelow600Loop { get; set; } + public float AircraftWarningSeriousDamageThresh { get; set; } + public float AircraftWarningCriticalDamageThresh { get; set; } + public float AircraftWarningMaxSpeed { get; set; } + public MetaHash SimpleSoundForLoading { get; set; } + public MetaHash SlowMoRotorLoop { get; set; } + public MetaHash SlowMoRotorLowFreqLoop { get; set; } + public MetaHash VehicleRainSound { get; set; } + public MetaHash VehicleRainSoundInterior { get; set; } + public MetaHash StartUpFailOneShot { get; set; } public int Version { get; set; } - public Dat151Helicopter(RelFile rel) : base(rel) + public Dat151HeliAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Helicopter; + Type = Dat151RelType.HeliAudioSettings; TypeID = (byte)Type; } - public Dat151Helicopter(RelData d, BinaryReader br) : base(d, br) + public Dat151HeliAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - MainRotor = br.ReadUInt32(); - TailRotor = br.ReadUInt32(); - Exhaust = br.ReadUInt32(); - Engine = br.ReadUInt32(); - InternalCabinTone = br.ReadUInt32(); - Unk06 = br.ReadSingle(); - BankAngleVolume = br.ReadUInt32(); - BankThrottleVolume = br.ReadUInt32(); - BankThrottlePitch = br.ReadUInt32(); - RotorThrottleVolume = br.ReadUInt32(); - RotorThrottlePitch = br.ReadUInt32(); - RotorThrottleGap = br.ReadUInt32(); - TailRotorThrottleVolume = br.ReadUInt32(); - ExhaustThrottleVolume = br.ReadUInt32(); - ExhaustThrottlePitch = br.ReadUInt32(); - Unk16 = br.ReadInt16(); - Unk17 = br.ReadInt16(); - Unk18 = br.ReadInt16(); - Unk19 = br.ReadInt16(); - Unk20 = br.ReadInt16(); - Unk21 = br.ReadInt16(); - Unk22 = br.ReadInt16(); - Unk23 = br.ReadInt16(); - Unk24 = br.ReadInt16(); - Unk25 = br.ReadInt16(); - ThrottleResonance1 = br.ReadUInt32(); - ThrottleResonance2 = br.ReadUInt32(); - BankingResonance = br.ReadUInt32(); - RotorStartupVolume = br.ReadUInt32(); - BladeStartupVolume = br.ReadUInt32(); - RotorStartupPitch = br.ReadUInt32(); - RearRotorStartupVolume = br.ReadUInt32(); + RotorLoop = br.ReadUInt32(); + RearRotorLoop = br.ReadUInt32(); + ExhaustLoop = br.ReadUInt32(); + BankingLoop = br.ReadUInt32(); + CabinToneLoop = br.ReadUInt32(); + ThrottleSmoothRate = br.ReadSingle(); + BankAngleVolumeCurve = br.ReadUInt32(); + BankThrottleVolumeCurve = br.ReadUInt32(); + BankThrottlePitchCurve = br.ReadUInt32(); + RotorThrottleVolumeCurve = br.ReadUInt32(); + RotorThrottlePitchCurve = br.ReadUInt32(); + RotorThrottleGapCurve = br.ReadUInt32(); + RearRotorThrottleVolumeCurve = br.ReadUInt32(); + ExhaustThrottleVolumeCurve = br.ReadUInt32(); + ExhaustThrottlePitchCurve = br.ReadUInt32(); + RotorConeFrontAngle = br.ReadUInt16(); + RotorConeRearAngle = br.ReadUInt16(); + RotorConeAtten = br.ReadInt16(); + RearRotorConeFrontAngle = br.ReadUInt16(); + RearRotorConeRearAngle = br.ReadUInt16(); + RearRotorConeAtten = br.ReadInt16(); + ExhaustConeFrontAngle = br.ReadUInt16(); + ExhaustConeRearAngle = br.ReadUInt16(); + ExhaustConeAtten = br.ReadInt16(); + padding00 = br.ReadInt16(); + Filter1ThrottleResonanceCurve = br.ReadUInt32(); + Filter2ThrottleResonanceCurve = br.ReadUInt32(); + BankingResonanceCurve = br.ReadUInt32(); + RotorVolumeStartupCurve = br.ReadUInt32(); + BladeVolumeStartupCurve = br.ReadUInt32(); + RotorPitchStartupCurve = br.ReadUInt32(); + RearRotorVolumeStartupCurve = br.ReadUInt32(); ExhaustStartupVolume = br.ReadUInt32(); - RotorStartupGap = br.ReadUInt32(); - Startup = br.ReadUInt32(); - Unk36 = br.ReadInt16(); - Unk37 = br.ReadInt16(); - Unk38 = br.ReadInt16(); - Unk39 = br.ReadInt16(); - Unk40 = br.ReadInt32(); - Unk41 = br.ReadUInt32(); - Unk42 = br.ReadUInt32(); - PoliceScannerCategory = br.ReadUInt32(); - PoliceScannerParams = br.ReadUInt32(); - RadioFlags = br.ReadInt32(); + RotorGapStartupCurve = br.ReadUInt32(); + StartUpOneShot = br.ReadUInt32(); + BladeConeUpAngle = br.ReadUInt16(); + BladeConeDownAngle = br.ReadUInt16(); + BladeConeAtten = br.ReadInt16(); + ThumpConeUpAngle = br.ReadUInt16(); + ThumpConeDownAngle = br.ReadUInt16(); + ScannerMake = br.ReadUInt32(); + ScannerModel = br.ReadUInt32(); + ScannerCategory = br.ReadUInt32(); + ScannerVehicleSettings = br.ReadUInt32(); + RadioType = br.ReadInt32(); DoorOpen = br.ReadUInt32(); DoorClose = br.ReadUInt32(); DoorLimit = br.ReadUInt32(); - Damage = br.ReadUInt32(); - Unk50 = br.ReadUInt32(); - Unk51 = br.ReadInt32(); - Unk52 = br.ReadUInt32(); - Unk53 = br.ReadUInt32(); - Unk54 = br.ReadUInt32(); - Unk55 = br.ReadUInt32(); - Unk56 = br.ReadUInt32(); - Unk57 = br.ReadUInt32(); - RotorBass = br.ReadUInt32(); - Unk59 = br.ReadUInt32(); - Collision = br.ReadUInt32(); - Fire = br.ReadUInt32(); - Distant = br.ReadUInt32(); - Unk63 = br.ReadUInt32(); - Unk64 = br.ReadUInt32(); - Unk65 = br.ReadUInt32(); - Unk66 = br.ReadUInt32(); + DamageLoop = br.ReadUInt32(); + RotorSpeedToTriggerSpeedCurve = br.ReadUInt32(); + RotorVolumePostSubmix = br.ReadInt16(); + padding01 = br.ReadInt16(); + EngineSynthDef = br.ReadUInt32(); + EngineSynthPreset = br.ReadUInt32(); + ExhaustSynthDef = br.ReadUInt32(); + ExhaustSynthPreset = br.ReadUInt32(); + EngineSubmixVoice = br.ReadUInt32(); + ExhaustSubmixVoice = br.ReadUInt32(); + RotorLowFreqLoop = br.ReadUInt32(); + ExhaustPitchStartupCurve = br.ReadUInt32(); + VehicleCollisions = br.ReadUInt32(); + FireAudio = br.ReadUInt32(); + DistantLoop = br.ReadUInt32(); + SecondaryDoorStartOpen = br.ReadUInt32(); + SecondaryDoorStartClose = br.ReadUInt32(); + SecondaryDoorClose = br.ReadUInt32(); + SecondaryDoorLimit = br.ReadUInt32(); SuspensionUp = br.ReadUInt32(); SuspensionDown = br.ReadUInt32(); - SuspensionUpFrequency = br.ReadSingle(); - SuspensionDownFrequency = br.ReadSingle(); + MinSuspCompThresh = br.ReadSingle(); + MaxSuspCompThresh = br.ReadSingle(); DamageOneShots = br.ReadUInt32(); DamageWarning = br.ReadUInt32(); TailBreak = br.ReadUInt32(); - MainRotorBreak = br.ReadUInt32(); - TailRotorBreak = br.ReadUInt32(); + RotorBreak = br.ReadUInt32(); + RearRotorBreak = br.ReadUInt32(); CableDeploy = br.ReadUInt32(); - Unk77 = br.ReadUInt32(); - HeatTicks = br.ReadUInt32(); + HardScrape = br.ReadUInt32(); + EngineCooling = br.ReadUInt32(); AltitudeWarning = br.ReadUInt32(); - DamageVolumeCurve = br.ReadUInt32(); - DamageVolumeCurve2 = br.ReadUInt32(); - DamageBelow600 = br.ReadUInt32(); - Unk83 = br.ReadSingle(); - Unk84 = br.ReadSingle(); - Unk85 = br.ReadSingle(); - Jet = br.ReadUInt32(); - PlayerSwitch = br.ReadUInt32(); - Unk88 = br.ReadUInt32(); - - - if (Unk52 != 0) - { } - if (Unk53 != 0) - { } - if (Unk54 != 0) - { } - if (Unk55 != 0) - { } - + HealthToDamageVolumeCurve = br.ReadUInt32(); + HealthBelow600ToDamageVolumeCurve = br.ReadUInt32(); + DamageBelow600Loop = br.ReadUInt32(); + AircraftWarningSeriousDamageThresh = br.ReadSingle(); + AircraftWarningCriticalDamageThresh = br.ReadSingle(); + AircraftWarningMaxSpeed = br.ReadSingle(); + SimpleSoundForLoading = br.ReadUInt32(); + SlowMoRotorLoop = br.ReadUInt32(); + SlowMoRotorLowFreqLoop = br.ReadUInt32(); Version = 0; var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft >= 12) + if (bytesleft >= 12) // If remaining bytes is greater or equal to 12, write values { Version = 1; - Unk89 = br.ReadUInt32(); - Unk90 = br.ReadUInt32(); - StartupBroken = br.ReadUInt32(); + VehicleRainSound = br.ReadUInt32(); + VehicleRainSoundInterior = br.ReadUInt32(); + StartUpFailOneShot = br.ReadUInt32(); } - - bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(MainRotor); - bw.Write(TailRotor); - bw.Write(Exhaust); - bw.Write(Engine); - bw.Write(InternalCabinTone); - bw.Write(Unk06); - bw.Write(BankAngleVolume); - bw.Write(BankThrottleVolume); - bw.Write(BankThrottlePitch); - bw.Write(RotorThrottleVolume); - bw.Write(RotorThrottlePitch); - bw.Write(RotorThrottleGap); - bw.Write(TailRotorThrottleVolume); - bw.Write(ExhaustThrottleVolume); - bw.Write(ExhaustThrottlePitch); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Unk24); - bw.Write(Unk25); - bw.Write(ThrottleResonance1); - bw.Write(ThrottleResonance2); - bw.Write(BankingResonance); - bw.Write(RotorStartupVolume); - bw.Write(BladeStartupVolume); - bw.Write(RotorStartupPitch); - bw.Write(RearRotorStartupVolume); + bw.Write(RotorLoop); + bw.Write(RearRotorLoop); + bw.Write(ExhaustLoop); + bw.Write(BankingLoop); + bw.Write(CabinToneLoop); + bw.Write(ThrottleSmoothRate); + bw.Write(BankAngleVolumeCurve); + bw.Write(BankThrottleVolumeCurve); + bw.Write(BankThrottlePitchCurve); + bw.Write(RotorThrottleVolumeCurve); + bw.Write(RotorThrottlePitchCurve); + bw.Write(RotorThrottleGapCurve); + bw.Write(RearRotorThrottleVolumeCurve); + bw.Write(ExhaustThrottleVolumeCurve); + bw.Write(ExhaustThrottlePitchCurve); + bw.Write(RotorConeFrontAngle); + bw.Write(RotorConeRearAngle); + bw.Write(RotorConeAtten); + bw.Write(RearRotorConeFrontAngle); + bw.Write(RearRotorConeRearAngle); + bw.Write(RearRotorConeAtten); + bw.Write(ExhaustConeFrontAngle); + bw.Write(ExhaustConeRearAngle); + bw.Write(ExhaustConeAtten); + bw.Write(padding00); + bw.Write(Filter1ThrottleResonanceCurve); + bw.Write(Filter2ThrottleResonanceCurve); + bw.Write(BankingResonanceCurve); + bw.Write(RotorVolumeStartupCurve); + bw.Write(BladeVolumeStartupCurve); + bw.Write(RotorPitchStartupCurve); + bw.Write(RearRotorVolumeStartupCurve); bw.Write(ExhaustStartupVolume); - bw.Write(RotorStartupGap); - bw.Write(Startup); - bw.Write(Unk36); - bw.Write(Unk37); - bw.Write(Unk38); - bw.Write(Unk39); - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(Unk42); - bw.Write(PoliceScannerCategory); - bw.Write(PoliceScannerParams); - bw.Write(RadioFlags); + bw.Write(RotorGapStartupCurve); + bw.Write(StartUpOneShot); + bw.Write(BladeConeUpAngle); + bw.Write(BladeConeDownAngle); + bw.Write(BladeConeAtten); + bw.Write(ThumpConeUpAngle); + bw.Write(ThumpConeDownAngle); + bw.Write(ScannerMake); + bw.Write(ScannerModel); + bw.Write(ScannerCategory); + bw.Write(ScannerVehicleSettings); + bw.Write(RadioType); bw.Write(DoorOpen); bw.Write(DoorClose); bw.Write(DoorLimit); - bw.Write(Damage); - bw.Write(Unk50); - bw.Write(Unk51); - bw.Write(Unk52); - bw.Write(Unk53); - bw.Write(Unk54); - bw.Write(Unk55); - bw.Write(Unk56); - bw.Write(Unk57); - bw.Write(RotorBass); - bw.Write(Unk59); - bw.Write(Collision); - bw.Write(Fire); - bw.Write(Distant); - bw.Write(Unk63); - bw.Write(Unk64); - bw.Write(Unk65); - bw.Write(Unk66); + bw.Write(DamageLoop); + bw.Write(RotorSpeedToTriggerSpeedCurve); + bw.Write(RotorVolumePostSubmix); + bw.Write(padding01); + bw.Write(EngineSynthDef); + bw.Write(EngineSynthPreset); + bw.Write(ExhaustSynthDef); + bw.Write(ExhaustSynthPreset); + bw.Write(EngineSubmixVoice); + bw.Write(ExhaustSubmixVoice); + bw.Write(RotorLowFreqLoop); + bw.Write(ExhaustPitchStartupCurve); + bw.Write(VehicleCollisions); + bw.Write(FireAudio); + bw.Write(DistantLoop); + bw.Write(SecondaryDoorStartOpen); + bw.Write(SecondaryDoorStartClose); + bw.Write(SecondaryDoorClose); + bw.Write(SecondaryDoorLimit); bw.Write(SuspensionUp); bw.Write(SuspensionDown); - bw.Write(SuspensionUpFrequency); - bw.Write(SuspensionDownFrequency); + bw.Write(MinSuspCompThresh); + bw.Write(MaxSuspCompThresh); bw.Write(DamageOneShots); bw.Write(DamageWarning); bw.Write(TailBreak); - bw.Write(MainRotorBreak); - bw.Write(TailRotorBreak); + bw.Write(RotorBreak); + bw.Write(RearRotorBreak); bw.Write(CableDeploy); - bw.Write(Unk77); - bw.Write(HeatTicks); + bw.Write(HardScrape); + bw.Write(EngineCooling); bw.Write(AltitudeWarning); - bw.Write(DamageVolumeCurve); - bw.Write(DamageVolumeCurve2); - bw.Write(DamageBelow600); - bw.Write(Unk83); - bw.Write(Unk84); - bw.Write(Unk85); - bw.Write(Jet); - bw.Write(PlayerSwitch); - bw.Write(Unk88); + bw.Write(HealthToDamageVolumeCurve); + bw.Write(HealthBelow600ToDamageVolumeCurve); + bw.Write(DamageBelow600Loop); + bw.Write(AircraftWarningSeriousDamageThresh); + bw.Write(AircraftWarningCriticalDamageThresh); + bw.Write(AircraftWarningMaxSpeed); + bw.Write(SimpleSoundForLoading); + bw.Write(SlowMoRotorLoop); + bw.Write(SlowMoRotorLowFreqLoop); if (Version >= 1) { - bw.Write(Unk89); - bw.Write(Unk90); - bw.Write(StartupBroken); + bw.Write(VehicleRainSound); + bw.Write(VehicleRainSoundInterior); + bw.Write(StartUpFailOneShot); } } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Version", Version.ToString()); //CW invention, not an actual field! - RelXml.StringTag(sb, indent, "MainRotor", RelXml.HashString(MainRotor)); - RelXml.StringTag(sb, indent, "TailRotor", RelXml.HashString(TailRotor)); - RelXml.StringTag(sb, indent, "Exhaust", RelXml.HashString(Exhaust)); - RelXml.StringTag(sb, indent, "Engine", RelXml.HashString(Engine)); - RelXml.StringTag(sb, indent, "InternalCabinTone", RelXml.HashString(InternalCabinTone)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.StringTag(sb, indent, "BankAngleVolume", RelXml.HashString(BankAngleVolume)); - RelXml.StringTag(sb, indent, "BankThrottleVolume", RelXml.HashString(BankThrottleVolume)); - RelXml.StringTag(sb, indent, "BankThrottlePitch", RelXml.HashString(BankThrottlePitch)); - RelXml.StringTag(sb, indent, "RotorThrottleVolume", RelXml.HashString(RotorThrottleVolume)); - RelXml.StringTag(sb, indent, "RotorThrottlePitch", RelXml.HashString(RotorThrottlePitch)); - RelXml.StringTag(sb, indent, "RotorThrottleGap", RelXml.HashString(RotorThrottleGap)); - RelXml.StringTag(sb, indent, "TailRotorThrottleVolume", RelXml.HashString(TailRotorThrottleVolume)); - RelXml.StringTag(sb, indent, "ExhaustThrottleVolume", RelXml.HashString(ExhaustThrottleVolume)); - RelXml.StringTag(sb, indent, "ExhaustThrottlePitch", RelXml.HashString(ExhaustThrottlePitch)); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.ValueTag(sb, indent, "Unk18", Unk18.ToString()); - RelXml.ValueTag(sb, indent, "Unk19", Unk19.ToString()); - RelXml.ValueTag(sb, indent, "Unk20", Unk20.ToString()); - RelXml.ValueTag(sb, indent, "Unk21", Unk21.ToString()); - RelXml.ValueTag(sb, indent, "Unk22", Unk22.ToString()); - RelXml.ValueTag(sb, indent, "Unk23", Unk23.ToString()); - RelXml.ValueTag(sb, indent, "Unk24", Unk24.ToString()); - RelXml.ValueTag(sb, indent, "Unk25", Unk25.ToString()); - RelXml.StringTag(sb, indent, "ThrottleResonance1", RelXml.HashString(ThrottleResonance1)); - RelXml.StringTag(sb, indent, "ThrottleResonance2", RelXml.HashString(ThrottleResonance2)); - RelXml.StringTag(sb, indent, "BankingResonance", RelXml.HashString(BankingResonance)); - RelXml.StringTag(sb, indent, "RotorStartupVolume", RelXml.HashString(RotorStartupVolume)); - RelXml.StringTag(sb, indent, "BladeStartupVolume", RelXml.HashString(BladeStartupVolume)); - RelXml.StringTag(sb, indent, "RotorStartupPitch", RelXml.HashString(RotorStartupPitch)); - RelXml.StringTag(sb, indent, "RearRotorStartupVolume", RelXml.HashString(RearRotorStartupVolume)); + RelXml.ValueTag(sb, indent, "Version", Version.ToString()); + RelXml.StringTag(sb, indent, "RotorLoop", RelXml.HashString(RotorLoop)); + RelXml.StringTag(sb, indent, "RearRotorLoop", RelXml.HashString(RearRotorLoop)); + RelXml.StringTag(sb, indent, "ExhaustLoop", RelXml.HashString(ExhaustLoop)); + RelXml.StringTag(sb, indent, "BankingLoop", RelXml.HashString(BankingLoop)); + RelXml.StringTag(sb, indent, "CabinToneLoop", RelXml.HashString(CabinToneLoop)); + RelXml.ValueTag(sb, indent, "ThrottleSmoothRate", FloatUtil.ToString(ThrottleSmoothRate)); + RelXml.StringTag(sb, indent, "BankAngleVolumeCurve", RelXml.HashString(BankAngleVolumeCurve)); + RelXml.StringTag(sb, indent, "BankThrottleVolumeCurve", RelXml.HashString(BankThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "BankThrottlePitchCurve", RelXml.HashString(BankThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "RotorThrottleVolumeCurve", RelXml.HashString(RotorThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "RotorThrottlePitchCurve", RelXml.HashString(RotorThrottlePitchCurve)); + RelXml.StringTag(sb, indent, "RotorThrottleGapCurve", RelXml.HashString(RotorThrottleGapCurve)); + RelXml.StringTag(sb, indent, "RearRotorThrottleVolumeCurve", RelXml.HashString(RearRotorThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "ExhaustThrottleVolumeCurve", RelXml.HashString(ExhaustThrottleVolumeCurve)); + RelXml.StringTag(sb, indent, "ExhaustThrottlePitchCurve", RelXml.HashString(ExhaustThrottlePitchCurve)); + RelXml.ValueTag(sb, indent, "RotorConeFrontAngle", RotorConeFrontAngle.ToString()); + RelXml.ValueTag(sb, indent, "RotorConeRearAngle", RotorConeRearAngle.ToString()); + RelXml.ValueTag(sb, indent, "RotorConeAtten", RotorConeAtten.ToString()); + RelXml.ValueTag(sb, indent, "RearRotorConeFrontAngle", RearRotorConeFrontAngle.ToString()); + RelXml.ValueTag(sb, indent, "RearRotorConeRearAngle", RearRotorConeRearAngle.ToString()); + RelXml.ValueTag(sb, indent, "RearRotorConeAtten", RearRotorConeAtten.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustConeFrontAngle", ExhaustConeFrontAngle.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustConeRearAngle", ExhaustConeRearAngle.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustConeAtten", ExhaustConeAtten.ToString()); + RelXml.StringTag(sb, indent, "Filter1ThrottleResonanceCurve", RelXml.HashString(Filter1ThrottleResonanceCurve)); + RelXml.StringTag(sb, indent, "Filter2ThrottleResonanceCurve", RelXml.HashString(Filter2ThrottleResonanceCurve)); + RelXml.StringTag(sb, indent, "BankingResonanceCurve", RelXml.HashString(BankingResonanceCurve)); + RelXml.StringTag(sb, indent, "RotorVolumeStartupCurve", RelXml.HashString(RotorVolumeStartupCurve)); + RelXml.StringTag(sb, indent, "BladeVolumeStartupCurve", RelXml.HashString(BladeVolumeStartupCurve)); + RelXml.StringTag(sb, indent, "RotorPitchStartupCurve", RelXml.HashString(RotorPitchStartupCurve)); + RelXml.StringTag(sb, indent, "RearRotorVolumeStartupCurve", RelXml.HashString(RearRotorVolumeStartupCurve)); RelXml.StringTag(sb, indent, "ExhaustStartupVolume", RelXml.HashString(ExhaustStartupVolume)); - RelXml.StringTag(sb, indent, "RotorStartupGap", RelXml.HashString(RotorStartupGap)); - RelXml.StringTag(sb, indent, "Startup", RelXml.HashString(Startup)); - RelXml.ValueTag(sb, indent, "Unk36", Unk36.ToString()); - RelXml.ValueTag(sb, indent, "Unk37", Unk37.ToString()); - RelXml.ValueTag(sb, indent, "Unk38", Unk38.ToString()); - RelXml.ValueTag(sb, indent, "Unk39", Unk39.ToString()); - RelXml.ValueTag(sb, indent, "Unk40", Unk40.ToString()); - RelXml.StringTag(sb, indent, "Unk41", RelXml.HashString(Unk41)); - RelXml.StringTag(sb, indent, "Unk42", RelXml.HashString(Unk42)); - RelXml.StringTag(sb, indent, "PoliceScannerCategory", RelXml.HashString(PoliceScannerCategory)); - RelXml.StringTag(sb, indent, "PoliceScannerParams", RelXml.HashString(PoliceScannerParams)); - RelXml.ValueTag(sb, indent, "RadioFlags", RadioFlags.ToString()); + RelXml.StringTag(sb, indent, "RotorGapStartupCurve", RelXml.HashString(RotorGapStartupCurve)); + RelXml.StringTag(sb, indent, "StartUpOneShot", RelXml.HashString(StartUpOneShot)); + RelXml.ValueTag(sb, indent, "BladeConeUpAngle", BladeConeUpAngle.ToString()); + RelXml.ValueTag(sb, indent, "BladeConeDownAngle", BladeConeDownAngle.ToString()); + RelXml.ValueTag(sb, indent, "BladeConeAtten", BladeConeAtten.ToString()); + RelXml.ValueTag(sb, indent, "ThumpConeUpAngle", ThumpConeUpAngle.ToString()); + RelXml.ValueTag(sb, indent, "ThumpConeDownAngle", ThumpConeDownAngle.ToString()); + RelXml.StringTag(sb, indent, "ScannerMake", RelXml.HashString(ScannerMake)); + RelXml.StringTag(sb, indent, "ScannerModel", RelXml.HashString(ScannerModel)); + RelXml.StringTag(sb, indent, "ScannerCategory", RelXml.HashString(ScannerCategory)); + RelXml.StringTag(sb, indent, "ScannerVehicleSettings", RelXml.HashString(ScannerVehicleSettings)); + RelXml.ValueTag(sb, indent, "RadioType", RadioType.ToString()); RelXml.StringTag(sb, indent, "DoorOpen", RelXml.HashString(DoorOpen)); RelXml.StringTag(sb, indent, "DoorClose", RelXml.HashString(DoorClose)); RelXml.StringTag(sb, indent, "DoorLimit", RelXml.HashString(DoorLimit)); - RelXml.StringTag(sb, indent, "Damage", RelXml.HashString(Damage)); - RelXml.StringTag(sb, indent, "Unk50", RelXml.HashString(Unk50)); - RelXml.ValueTag(sb, indent, "Unk51", Unk51.ToString()); - RelXml.StringTag(sb, indent, "Unk52", RelXml.HashString(Unk52)); - RelXml.StringTag(sb, indent, "Unk53", RelXml.HashString(Unk53)); - RelXml.StringTag(sb, indent, "Unk54", RelXml.HashString(Unk54)); - RelXml.StringTag(sb, indent, "Unk55", RelXml.HashString(Unk55)); - RelXml.StringTag(sb, indent, "Unk56", RelXml.HashString(Unk56)); - RelXml.StringTag(sb, indent, "Unk57", RelXml.HashString(Unk57)); - RelXml.StringTag(sb, indent, "RotorBass", RelXml.HashString(RotorBass)); - RelXml.StringTag(sb, indent, "Unk59", RelXml.HashString(Unk59)); - RelXml.StringTag(sb, indent, "Collision", RelXml.HashString(Collision)); - RelXml.StringTag(sb, indent, "Fire", RelXml.HashString(Fire)); - RelXml.StringTag(sb, indent, "Distant", RelXml.HashString(Distant)); - RelXml.StringTag(sb, indent, "Unk63", RelXml.HashString(Unk63)); - RelXml.StringTag(sb, indent, "Unk64", RelXml.HashString(Unk64)); - RelXml.StringTag(sb, indent, "Unk65", RelXml.HashString(Unk65)); - RelXml.StringTag(sb, indent, "Unk66", RelXml.HashString(Unk66)); + RelXml.StringTag(sb, indent, "DamageLoop", RelXml.HashString(DamageLoop)); + RelXml.StringTag(sb, indent, "RotorSpeedToTriggerSpeedCurve", RelXml.HashString(RotorSpeedToTriggerSpeedCurve)); + RelXml.ValueTag(sb, indent, "RotorVolumePostSubmix", RotorVolumePostSubmix.ToString()); + RelXml.StringTag(sb, indent, "EngineSynthDef", RelXml.HashString(EngineSynthDef)); + RelXml.StringTag(sb, indent, "EngineSynthPreset", RelXml.HashString(EngineSynthPreset)); + RelXml.StringTag(sb, indent, "ExhaustSynthDef", RelXml.HashString(ExhaustSynthDef)); + RelXml.StringTag(sb, indent, "ExhaustSynthPreset", RelXml.HashString(ExhaustSynthPreset)); + RelXml.StringTag(sb, indent, "EngineSubmixVoice", RelXml.HashString(EngineSubmixVoice)); + RelXml.StringTag(sb, indent, "ExhaustSubmixVoice", RelXml.HashString(ExhaustSubmixVoice)); + RelXml.StringTag(sb, indent, "RotorLowFreqLoop", RelXml.HashString(RotorLowFreqLoop)); + RelXml.StringTag(sb, indent, "ExhaustPitchStartupCurve", RelXml.HashString(ExhaustPitchStartupCurve)); + RelXml.StringTag(sb, indent, "VehicleCollisions", RelXml.HashString(VehicleCollisions)); + RelXml.StringTag(sb, indent, "FireAudio", RelXml.HashString(FireAudio)); + RelXml.StringTag(sb, indent, "DistantLoop", RelXml.HashString(DistantLoop)); + RelXml.StringTag(sb, indent, "SecondaryDoorStartOpen", RelXml.HashString(SecondaryDoorStartOpen)); + RelXml.StringTag(sb, indent, "SecondaryDoorStartClose", RelXml.HashString(SecondaryDoorStartClose)); + RelXml.StringTag(sb, indent, "SecondaryDoorClose", RelXml.HashString(SecondaryDoorClose)); + RelXml.StringTag(sb, indent, "SecondaryDoorLimit", RelXml.HashString(SecondaryDoorLimit)); RelXml.StringTag(sb, indent, "SuspensionUp", RelXml.HashString(SuspensionUp)); RelXml.StringTag(sb, indent, "SuspensionDown", RelXml.HashString(SuspensionDown)); - RelXml.ValueTag(sb, indent, "SuspensionUpFrequency", FloatUtil.ToString(SuspensionUpFrequency)); - RelXml.ValueTag(sb, indent, "SuspensionDownFrequency", FloatUtil.ToString(SuspensionDownFrequency)); + RelXml.ValueTag(sb, indent, "MinSuspCompThresh", FloatUtil.ToString(MinSuspCompThresh)); + RelXml.ValueTag(sb, indent, "MaxSuspCompThresh", FloatUtil.ToString(MaxSuspCompThresh)); RelXml.StringTag(sb, indent, "DamageOneShots", RelXml.HashString(DamageOneShots)); RelXml.StringTag(sb, indent, "DamageWarning", RelXml.HashString(DamageWarning)); RelXml.StringTag(sb, indent, "TailBreak", RelXml.HashString(TailBreak)); - RelXml.StringTag(sb, indent, "MainRotorBreak", RelXml.HashString(MainRotorBreak)); - RelXml.StringTag(sb, indent, "TailRotorBreak", RelXml.HashString(TailRotorBreak)); + RelXml.StringTag(sb, indent, "RotorBreak", RelXml.HashString(RotorBreak)); + RelXml.StringTag(sb, indent, "RearRotorBreak", RelXml.HashString(RearRotorBreak)); RelXml.StringTag(sb, indent, "CableDeploy", RelXml.HashString(CableDeploy)); - RelXml.StringTag(sb, indent, "Unk77", RelXml.HashString(Unk77)); - RelXml.StringTag(sb, indent, "HeatTicks", RelXml.HashString(HeatTicks)); + RelXml.StringTag(sb, indent, "HardScrape", RelXml.HashString(HardScrape)); + RelXml.StringTag(sb, indent, "EngineCooling", RelXml.HashString(EngineCooling)); RelXml.StringTag(sb, indent, "AltitudeWarning", RelXml.HashString(AltitudeWarning)); - RelXml.StringTag(sb, indent, "DamageVolumeCurve", RelXml.HashString(DamageVolumeCurve)); - RelXml.StringTag(sb, indent, "DamageVolumeCurve2", RelXml.HashString(DamageVolumeCurve2)); - RelXml.StringTag(sb, indent, "DamageBelow600", RelXml.HashString(DamageBelow600)); - RelXml.ValueTag(sb, indent, "Unk83", FloatUtil.ToString(Unk83)); - RelXml.ValueTag(sb, indent, "Unk84", FloatUtil.ToString(Unk84)); - RelXml.ValueTag(sb, indent, "Unk85", FloatUtil.ToString(Unk85)); - RelXml.StringTag(sb, indent, "Jet", RelXml.HashString(Jet)); - RelXml.StringTag(sb, indent, "PlayerSwitch", RelXml.HashString(PlayerSwitch)); - RelXml.StringTag(sb, indent, "Unk88", RelXml.HashString(Unk88)); + RelXml.StringTag(sb, indent, "HealthToDamageVolumeCurve", RelXml.HashString(HealthToDamageVolumeCurve)); + RelXml.StringTag(sb, indent, "HealthBelow600ToDamageVolumeCurve", RelXml.HashString(HealthBelow600ToDamageVolumeCurve)); + RelXml.StringTag(sb, indent, "DamageBelow600Loop", RelXml.HashString(DamageBelow600Loop)); + RelXml.ValueTag(sb, indent, "AircraftWarningSeriousDamageThresh", FloatUtil.ToString(AircraftWarningSeriousDamageThresh)); + RelXml.ValueTag(sb, indent, "AircraftWarningCriticalDamageThresh", FloatUtil.ToString(AircraftWarningCriticalDamageThresh)); + RelXml.ValueTag(sb, indent, "AircraftWarningMaxSpeed", FloatUtil.ToString(AircraftWarningMaxSpeed)); + RelXml.StringTag(sb, indent, "SimpleSoundForLoading", RelXml.HashString(SimpleSoundForLoading)); + RelXml.StringTag(sb, indent, "SlowMoRotorLoop", RelXml.HashString(SlowMoRotorLoop)); + RelXml.StringTag(sb, indent, "SlowMoRotorLowFreqLoop", RelXml.HashString(SlowMoRotorLowFreqLoop)); if (Version >= 1) { - RelXml.StringTag(sb, indent, "Unk89", RelXml.HashString(Unk89)); - RelXml.StringTag(sb, indent, "Unk90", RelXml.HashString(Unk90)); - RelXml.StringTag(sb, indent, "StartupBroken", RelXml.HashString(StartupBroken)); + RelXml.StringTag(sb, indent, "VehicleRainSound", RelXml.HashString(VehicleRainSound)); + RelXml.StringTag(sb, indent, "VehicleRainSoundInterior", RelXml.HashString(VehicleRainSoundInterior)); + RelXml.StringTag(sb, indent, "StartUpFailOneShot", RelXml.HashString(StartUpFailOneShot)); } } @@ -14150,471 +13592,466 @@ namespace CodeWalker.GameFiles { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Version = Xml.GetChildIntAttribute(node, "Version", "value"); - MainRotor = XmlRel.GetHash(Xml.GetChildInnerText(node, "MainRotor")); - TailRotor = XmlRel.GetHash(Xml.GetChildInnerText(node, "TailRotor")); - Exhaust = XmlRel.GetHash(Xml.GetChildInnerText(node, "Exhaust")); - Engine = XmlRel.GetHash(Xml.GetChildInnerText(node, "Engine")); - InternalCabinTone = XmlRel.GetHash(Xml.GetChildInnerText(node, "InternalCabinTone")); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - BankAngleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankAngleVolume")); - BankThrottleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankThrottleVolume")); - BankThrottlePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankThrottlePitch")); - RotorThrottleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorThrottleVolume")); - RotorThrottlePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorThrottlePitch")); - RotorThrottleGap = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorThrottleGap")); - TailRotorThrottleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "TailRotorThrottleVolume")); - ExhaustThrottleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustThrottleVolume")); - ExhaustThrottlePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustThrottlePitch")); - Unk16 = (short)Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = (short)Xml.GetChildIntAttribute(node, "Unk17", "value"); - Unk18 = (short)Xml.GetChildIntAttribute(node, "Unk18", "value"); - Unk19 = (short)Xml.GetChildIntAttribute(node, "Unk19", "value"); - Unk20 = (short)Xml.GetChildIntAttribute(node, "Unk20", "value"); - Unk21 = (short)Xml.GetChildIntAttribute(node, "Unk21", "value"); - Unk22 = (short)Xml.GetChildIntAttribute(node, "Unk22", "value"); - Unk23 = (short)Xml.GetChildIntAttribute(node, "Unk23", "value"); - Unk24 = (short)Xml.GetChildIntAttribute(node, "Unk24", "value"); - Unk25 = (short)Xml.GetChildIntAttribute(node, "Unk25", "value"); - ThrottleResonance1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ThrottleResonance1")); - ThrottleResonance2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ThrottleResonance2")); - BankingResonance = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingResonance")); - RotorStartupVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorStartupVolume")); - BladeStartupVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "BladeStartupVolume")); - RotorStartupPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorStartupPitch")); - RearRotorStartupVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "RearRotorStartupVolume")); + RotorLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorLoop")); + RearRotorLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "RearRotorLoop")); + ExhaustLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustLoop")); + BankingLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingLoop")); + CabinToneLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "CabinToneLoop")); + ThrottleSmoothRate = Xml.GetChildFloatAttribute(node, "ThrottleSmoothRate", "value"); + BankAngleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankAngleVolumeCurve")); + BankThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankThrottleVolumeCurve")); + BankThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankThrottlePitchCurve")); + RotorThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorThrottleVolumeCurve")); + RotorThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorThrottlePitchCurve")); + RotorThrottleGapCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorThrottleGapCurve")); + RearRotorThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RearRotorThrottleVolumeCurve")); + ExhaustThrottleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustThrottleVolumeCurve")); + ExhaustThrottlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustThrottlePitchCurve")); + RotorConeFrontAngle = (ushort)Xml.GetChildIntAttribute(node, "RotorConeFrontAngle", "value"); + RotorConeRearAngle = (ushort)Xml.GetChildIntAttribute(node, "RotorConeRearAngle", "value"); + RotorConeAtten = (short)Xml.GetChildIntAttribute(node, "RotorConeAtten", "value"); + RearRotorConeFrontAngle = (ushort)Xml.GetChildIntAttribute(node, "RearRotorConeFrontAngle", "value"); + RearRotorConeRearAngle = (ushort)Xml.GetChildIntAttribute(node, "RearRotorConeRearAngle", "value"); + RearRotorConeAtten = (short)Xml.GetChildIntAttribute(node, "RearRotorConeAtten", "value"); + ExhaustConeFrontAngle = (ushort)Xml.GetChildIntAttribute(node, "ExhaustConeFrontAngle", "value"); + ExhaustConeRearAngle = (ushort)Xml.GetChildIntAttribute(node, "ExhaustConeRearAngle", "value"); + ExhaustConeAtten = (short)Xml.GetChildIntAttribute(node, "ExhaustConeAtten", "value"); + Filter1ThrottleResonanceCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "Filter1ThrottleResonanceCurve")); + Filter2ThrottleResonanceCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "Filter2ThrottleResonanceCurve")); + BankingResonanceCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankingResonanceCurve")); + RotorVolumeStartupCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorVolumeStartupCurve")); + BladeVolumeStartupCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BladeVolumeStartupCurve")); + RotorPitchStartupCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorPitchStartupCurve")); + RearRotorVolumeStartupCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RearRotorVolumeStartupCurve")); ExhaustStartupVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustStartupVolume")); - RotorStartupGap = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorStartupGap")); - Startup = XmlRel.GetHash(Xml.GetChildInnerText(node, "Startup")); - Unk36 = (short)Xml.GetChildIntAttribute(node, "Unk36", "value"); - Unk37 = (short)Xml.GetChildIntAttribute(node, "Unk37", "value"); - Unk38 = (short)Xml.GetChildIntAttribute(node, "Unk38", "value"); - Unk39 = (short)Xml.GetChildIntAttribute(node, "Unk39", "value"); - Unk40 = Xml.GetChildIntAttribute(node, "Unk40", "value"); - Unk41 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk41")); - Unk42 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk42")); - PoliceScannerCategory = XmlRel.GetHash(Xml.GetChildInnerText(node, "PoliceScannerCategory")); - PoliceScannerParams = XmlRel.GetHash(Xml.GetChildInnerText(node, "PoliceScannerParams")); - RadioFlags = Xml.GetChildIntAttribute(node, "RadioFlags", "value"); + RotorGapStartupCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorGapStartupCurve")); + StartUpOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartUpOneShot")); + BladeConeUpAngle = (ushort)Xml.GetChildIntAttribute(node, "BladeConeUpAngle", "value"); + BladeConeDownAngle = (ushort)Xml.GetChildIntAttribute(node, "BladeConeDownAngle", "value"); + BladeConeAtten = (short)Xml.GetChildIntAttribute(node, "BladeConeAtten", "value"); + ThumpConeUpAngle = (ushort)Xml.GetChildIntAttribute(node, "ThumpConeUpAngle", "value"); + ThumpConeDownAngle = (ushort)Xml.GetChildIntAttribute(node, "ThumpConeDownAngle", "value"); + ScannerMake = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerMake")); + ScannerModel = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerModel")); + ScannerCategory = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerCategory")); + ScannerVehicleSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScannerVehicleSettings")); + RadioType = Xml.GetChildIntAttribute(node, "RadioType", "value"); DoorOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorOpen")); DoorClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorClose")); DoorLimit = XmlRel.GetHash(Xml.GetChildInnerText(node, "DoorLimit")); - Damage = XmlRel.GetHash(Xml.GetChildInnerText(node, "Damage")); - Unk50 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk50")); - Unk51 = Xml.GetChildIntAttribute(node, "Unk51", "value"); - Unk52 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk52")); - Unk53 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk53")); - Unk54 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk54")); - Unk55 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk55")); - Unk56 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk56")); - Unk57 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk57")); - RotorBass = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorBass")); - Unk59 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk59")); - Collision = XmlRel.GetHash(Xml.GetChildInnerText(node, "Collision")); - Fire = XmlRel.GetHash(Xml.GetChildInnerText(node, "Fire")); - Distant = XmlRel.GetHash(Xml.GetChildInnerText(node, "Distant")); - Unk63 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk63")); - Unk64 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk64")); - Unk65 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk65")); - Unk66 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk66")); + DamageLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageLoop")); + RotorSpeedToTriggerSpeedCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorSpeedToTriggerSpeedCurve")); + RotorVolumePostSubmix = (short)Xml.GetChildIntAttribute(node, "RotorVolumePostSubmix", "value"); + EngineSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthDef")); + EngineSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSynthPreset")); + ExhaustSynthDef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthDef")); + ExhaustSynthPreset = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSynthPreset")); + EngineSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineSubmixVoice")); + ExhaustSubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustSubmixVoice")); + RotorLowFreqLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorLowFreqLoop")); + ExhaustPitchStartupCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExhaustPitchStartupCurve")); + VehicleCollisions = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCollisions")); + FireAudio = XmlRel.GetHash(Xml.GetChildInnerText(node, "FireAudio")); + DistantLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistantLoop")); + SecondaryDoorStartOpen = XmlRel.GetHash(Xml.GetChildInnerText(node, "SecondaryDoorStartOpen")); + SecondaryDoorStartClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "SecondaryDoorStartClose")); + SecondaryDoorClose = XmlRel.GetHash(Xml.GetChildInnerText(node, "SecondaryDoorClose")); + SecondaryDoorLimit = XmlRel.GetHash(Xml.GetChildInnerText(node, "SecondaryDoorLimit")); SuspensionUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionUp")); SuspensionDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "SuspensionDown")); - SuspensionUpFrequency = Xml.GetChildFloatAttribute(node, "SuspensionUpFrequency", "value"); - SuspensionDownFrequency = Xml.GetChildFloatAttribute(node, "SuspensionDownFrequency", "value"); + MinSuspCompThresh = Xml.GetChildFloatAttribute(node, "MinSuspCompThresh", "value"); + MaxSuspCompThresh = Xml.GetChildFloatAttribute(node, "MaxSuspCompThresh", "value"); DamageOneShots = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageOneShots")); DamageWarning = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageWarning")); TailBreak = XmlRel.GetHash(Xml.GetChildInnerText(node, "TailBreak")); - MainRotorBreak = XmlRel.GetHash(Xml.GetChildInnerText(node, "MainRotorBreak")); - TailRotorBreak = XmlRel.GetHash(Xml.GetChildInnerText(node, "TailRotorBreak")); + RotorBreak = XmlRel.GetHash(Xml.GetChildInnerText(node, "RotorBreak")); + RearRotorBreak = XmlRel.GetHash(Xml.GetChildInnerText(node, "RearRotorBreak")); CableDeploy = XmlRel.GetHash(Xml.GetChildInnerText(node, "CableDeploy")); - Unk77 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk77")); - HeatTicks = XmlRel.GetHash(Xml.GetChildInnerText(node, "HeatTicks")); + HardScrape = XmlRel.GetHash(Xml.GetChildInnerText(node, "HardScrape")); + EngineCooling = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineCooling")); AltitudeWarning = XmlRel.GetHash(Xml.GetChildInnerText(node, "AltitudeWarning")); - DamageVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageVolumeCurve")); - DamageVolumeCurve2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageVolumeCurve2")); - DamageBelow600 = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageBelow600")); - Unk83 = Xml.GetChildFloatAttribute(node, "Unk83", "value"); - Unk84 = Xml.GetChildFloatAttribute(node, "Unk84", "value"); - Unk85 = Xml.GetChildFloatAttribute(node, "Unk85", "value"); - Jet = XmlRel.GetHash(Xml.GetChildInnerText(node, "Jet")); - PlayerSwitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "PlayerSwitch")); - Unk88 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk88")); + HealthToDamageVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "HealthToDamageVolumeCurve")); + HealthBelow600ToDamageVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "HealthBelow600ToDamageVolumeCurve")); + DamageBelow600Loop = XmlRel.GetHash(Xml.GetChildInnerText(node, "DamageBelow600Loop")); + AircraftWarningSeriousDamageThresh = Xml.GetChildFloatAttribute(node, "AircraftWarningSeriousDamageThresh", "value"); + AircraftWarningCriticalDamageThresh = Xml.GetChildFloatAttribute(node, "AircraftWarningCriticalDamageThresh", "value"); + AircraftWarningMaxSpeed = Xml.GetChildFloatAttribute(node, "AircraftWarningMaxSpeed", "value"); + SimpleSoundForLoading = XmlRel.GetHash(Xml.GetChildInnerText(node, "SimpleSoundForLoading")); + SlowMoRotorLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoRotorLoop")); + SlowMoRotorLowFreqLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoRotorLowFreqLoop")); if (Version >= 1) { - Unk89 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk89")); - Unk90 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk90")); - StartupBroken = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartupBroken")); + VehicleRainSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSound")); + VehicleRainSoundInterior = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleRainSoundInterior")); + StartUpFailOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "StartUpFailOneShot")); } } public override MetaHash[] GetCurveHashes() { - return new[] { BankAngleVolume, BankThrottleVolume, BankThrottlePitch, RotorThrottleVolume, RotorThrottlePitch, RotorThrottleGap, - TailRotorThrottleVolume, ExhaustThrottleVolume, ExhaustThrottlePitch, ThrottleResonance1, ThrottleResonance2, BankingResonance, - RotorStartupVolume, BladeStartupVolume, RotorStartupPitch, RearRotorStartupVolume, ExhaustStartupVolume, RotorStartupGap, - Unk50, Unk59, DamageVolumeCurve, DamageVolumeCurve2 }; + return new[] { BankAngleVolumeCurve, BankThrottleVolumeCurve, BankThrottlePitchCurve, RotorThrottleVolumeCurve, RotorThrottlePitchCurve, RotorThrottleGapCurve, + RearRotorThrottleVolumeCurve, ExhaustThrottleVolumeCurve, ExhaustThrottlePitchCurve, Filter1ThrottleResonanceCurve, Filter2ThrottleResonanceCurve, BankingResonanceCurve, + RotorVolumeStartupCurve, BladeVolumeStartupCurve, RotorPitchStartupCurve, RearRotorVolumeStartupCurve, ExhaustStartupVolume, RotorGapStartupCurve, + RotorSpeedToTriggerSpeedCurve, ExhaustPitchStartupCurve, HealthToDamageVolumeCurve, HealthBelow600ToDamageVolumeCurve }; } public override MetaHash[] GetSoundHashes() { - return new[] { MainRotor, TailRotor, Exhaust, Engine, InternalCabinTone, Startup, Unk41, Unk42, PoliceScannerCategory, - DoorOpen, DoorClose, DoorLimit, Damage, Unk56, Unk57, RotorBass, Fire, Distant, Unk63, Unk64, Unk65, Unk66, - SuspensionUp, SuspensionDown, DamageOneShots, DamageWarning, TailBreak, MainRotorBreak, TailRotorBreak, CableDeploy, - Unk77, HeatTicks, AltitudeWarning, DamageBelow600, Jet, PlayerSwitch, Unk88, Unk89, Unk90, StartupBroken }; + return new[] { RotorLoop, RearRotorLoop, ExhaustLoop, BankingLoop, CabinToneLoop, StartUpOneShot, ScannerMake, ScannerModel, ScannerCategory, + DoorOpen, DoorClose, DoorLimit, DamageLoop, EngineSubmixVoice, ExhaustSubmixVoice, RotorLowFreqLoop, FireAudio, DistantLoop, SecondaryDoorStartOpen, SecondaryDoorStartClose, SecondaryDoorClose, SecondaryDoorLimit, + SuspensionUp, SuspensionDown, DamageOneShots, DamageWarning, TailBreak, RotorBreak, RearRotorBreak, CableDeploy, + HardScrape, EngineCooling, AltitudeWarning, DamageBelow600Loop, SimpleSoundForLoading, SlowMoRotorLoop, SlowMoRotorLowFreqLoop, VehicleRainSound, VehicleRainSoundInterior, StartUpFailOneShot }; } public override MetaHash[] GetGameHashes() { - return new[] { PoliceScannerParams, Collision }; + return new[] { ScannerVehicleSettings, VehicleCollisions }; } } - [TC(typeof(EXP))] public class Dat151VehicleTrailer : Dat151RelData - { - public MetaHash Suspension { get; set; } - public int Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public MetaHash Mods { get; set; } - public MetaHash Fire { get; set; } - public MetaHash Unk06 { get; set; }//0 - public float Unk07 { get; set; } - public int Unk08 { get; set; } - public float Unk09 { get; set; } - public int Unk10 { get; set; } - public MetaHash Unk11 { get; set; }//0 - public float Unk12 { get; set; } - public Dat151VehicleTrailer(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151TrailerAudioSettings : Dat151RelData + { + public MetaHash BumpSound { get; set; } + public byte ClatterType { get; set; } + public byte padding00 { get; set; } + public short padding01 { get; set; } + public MetaHash LinkStressSound { get; set; } + public MetaHash ModelCollisionSettings { get; set; } + public MetaHash FireAudio { get; set; } + public int TrailerBumpVolumeBoost { get; set; } + public float ClatterSensitivityScalar { get; set; } + public int ClatterVolumeBoost { get; set; } + public float ChassisStressSensitivityScalar { get; set; } + public int ChassisStressVolumeBoost { get; set; } + public int LinkStressVolumeBoost { get; set; } + public float LinkStressSensitivityScalar { get; set; } + + public Dat151TrailerAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleTrailer; + Type = Dat151RelType.TrailerAudioSettings; TypeID = (byte)Type; } - public Dat151VehicleTrailer(RelData d, BinaryReader br) : base(d, br) + public Dat151TrailerAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Suspension = br.ReadUInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadUInt32(); - Mods = br.ReadUInt32(); - Fire = br.ReadUInt32(); - Unk06 = br.ReadUInt32();//0 - Unk07 = br.ReadSingle(); - Unk08 = br.ReadInt32(); - Unk09 = br.ReadSingle(); - Unk10 = br.ReadInt32(); - Unk11 = br.ReadUInt32();//0 - Unk12 = br.ReadSingle(); - - if (Unk06 != 0) - { } - if (Unk11 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + BumpSound = br.ReadUInt32(); + ClatterType = br.ReadByte(); + padding00 = br.ReadByte(); + padding01 = br.ReadInt16(); + LinkStressSound = br.ReadUInt32(); + ModelCollisionSettings = br.ReadUInt32(); + FireAudio = br.ReadUInt32(); + TrailerBumpVolumeBoost = br.ReadInt32(); + ClatterSensitivityScalar = br.ReadSingle(); + ClatterVolumeBoost = br.ReadInt32(); + ChassisStressSensitivityScalar = br.ReadSingle(); + ChassisStressVolumeBoost = br.ReadInt32(); + LinkStressVolumeBoost = br.ReadInt32(); + LinkStressSensitivityScalar = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Suspension); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Mods); - bw.Write(Fire); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); + bw.Write(BumpSound); + bw.Write(ClatterType); + bw.Write(padding00); + bw.Write(padding01); + bw.Write(LinkStressSound); + bw.Write(ModelCollisionSettings); + bw.Write(FireAudio); + bw.Write(TrailerBumpVolumeBoost); + bw.Write(ClatterSensitivityScalar); + bw.Write(ClatterVolumeBoost); + bw.Write(ChassisStressSensitivityScalar); + bw.Write(ChassisStressVolumeBoost); + bw.Write(LinkStressVolumeBoost); + bw.Write(LinkStressSensitivityScalar); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Suspension", RelXml.HashString(Suspension)); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Mods", RelXml.HashString(Mods)); - RelXml.StringTag(sb, indent, "Fire", RelXml.HashString(Fire)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.ValueTag(sb, indent, "Unk12", FloatUtil.ToString(Unk12)); + RelXml.StringTag(sb, indent, "BumpSound", RelXml.HashString(BumpSound)); + RelXml.ValueTag(sb, indent, "ClatterType", ClatterType.ToString()); + RelXml.StringTag(sb, indent, "LinkStressSound", RelXml.HashString(LinkStressSound)); + RelXml.StringTag(sb, indent, "ModelCollisionSettings", RelXml.HashString(ModelCollisionSettings)); + RelXml.StringTag(sb, indent, "FireAudio", RelXml.HashString(FireAudio)); + RelXml.StringTag(sb, indent, "TrailerBumpVolumeBoost", TrailerBumpVolumeBoost.ToString()); + RelXml.ValueTag(sb, indent, "ClatterSensitivityScalar", FloatUtil.ToString(ClatterSensitivityScalar)); + RelXml.ValueTag(sb, indent, "ClatterVolumeBoost", ClatterVolumeBoost.ToString()); + RelXml.ValueTag(sb, indent, "ChassisStressSensitivityScalar", FloatUtil.ToString(ChassisStressSensitivityScalar)); + RelXml.ValueTag(sb, indent, "ChassisStressVolumeBoost", ChassisStressVolumeBoost.ToString()); + RelXml.StringTag(sb, indent, "LinkStressVolumeBoost", LinkStressVolumeBoost.ToString()); + RelXml.ValueTag(sb, indent, "LinkStressSensitivityScalar", FloatUtil.ToString(LinkStressSensitivityScalar)); } public override void ReadXml(XmlNode node) { - Suspension = XmlRel.GetHash(Xml.GetChildInnerText(node, "Suspension")); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Mods = XmlRel.GetHash(Xml.GetChildInnerText(node, "Mods")); - Fire = XmlRel.GetHash(Xml.GetChildInnerText(node, "Fire")); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = Xml.GetChildFloatAttribute(node, "Unk12", "value"); + BumpSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BumpSound")); + ClatterType = (byte)Xml.GetChildIntAttribute(node, "ClatterType", "value"); + LinkStressSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "LinkStressSound")); + ModelCollisionSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "ModelCollisionSettings")); + FireAudio = XmlRel.GetHash(Xml.GetChildInnerText(node, "FireAudio")); + TrailerBumpVolumeBoost = Xml.GetChildIntAttribute(node, "TrailerBumpVolumeBoost", "value"); + ClatterSensitivityScalar = Xml.GetChildFloatAttribute(node, "ClatterSensitivityScalar", "value"); + ClatterVolumeBoost = Xml.GetChildIntAttribute(node, "ClatterVolumeBoost", "value"); + ChassisStressSensitivityScalar = Xml.GetChildFloatAttribute(node, "ChassisStressSensitivityScalar", "value"); + ChassisStressVolumeBoost = Xml.GetChildIntAttribute(node, "ChassisStressVolumeBoost", "value"); + LinkStressVolumeBoost = Xml.GetChildIntAttribute(node, "LinkStressVolumeBoost", "value"); + LinkStressSensitivityScalar = Xml.GetChildFloatAttribute(node, "LinkStressSensitivityScalar", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { Suspension, Unk03, Fire }; + return new[] { BumpSound, LinkStressSound, FireAudio }; } public override MetaHash[] GetGameHashes() { - return new[] { Mods }; + return new[] { ModelCollisionSettings }; } } - [TC(typeof(EXP))] public class Dat151Train : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151TrainAudioSettings : Dat151RelData { - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; }//0 - public MetaHash Unk03 { get; set; } - public MetaHash Unk04 { get; set; } + public MetaHash DriveTone { get; set; } + public MetaHash DriveToneSynth { get; set; } + public MetaHash IdleLoop { get; set; } + public MetaHash Brakes { get; set; } public MetaHash BigBrakeRelease { get; set; } public MetaHash BrakeRelease { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Horn { get; set; } - public MetaHash Unk09 { get; set; } - public MetaHash Unk10 { get; set; } - public MetaHash Carriage { get; set; } - public MetaHash Unk12 { get; set; } - public MetaHash Unk13 { get; set; } - public MetaHash Unk14 { get; set; } - public MetaHash CarriagePitch { get; set; } - public MetaHash CarriageVolume { get; set; } - public MetaHash DriveTonePitch { get; set; } - public MetaHash DriveToneVolume { get; set; } - public MetaHash DriveToneSynthPitch { get; set; } - public MetaHash DriveToneSynthVolume { get; set; } - public MetaHash GrindPitch { get; set; } - public MetaHash GrindVolume { get; set; } - public MetaHash IdlePitch { get; set; } - public MetaHash IdleVolume { get; set; } - public MetaHash SquealPitch { get; set; } - public MetaHash SquealVolume { get; set; } - public MetaHash ScrapeSpeedVolume { get; set; } - public MetaHash WheelVolume { get; set; } - public MetaHash WheelDelay { get; set; } - public MetaHash RumbleVolume { get; set; } - public MetaHash BrakeVelocityPitch { get; set; } - public MetaHash BrakeVelocityVolume { get; set; } - public MetaHash BrakeAccelerationPitch { get; set; } - public MetaHash BrakeAccelerationVolume { get; set; } - public MetaHash Unk35 { get; set; } - public MetaHash Unk36 { get; set; } - public MetaHash Unk37 { get; set; }//constant_one - public MetaHash Collision { get; set; } + public MetaHash WheelDry { get; set; } + public MetaHash AirHornOneShot { get; set; } + public MetaHash BellLoopCrossing { get; set; } + public MetaHash BellLoopEngine { get; set; } + public MetaHash AmbientCarriage { get; set; } + public MetaHash AmbientRumble { get; set; } + public MetaHash AmbientGrind { get; set; } + public MetaHash AmbientSqueal { get; set; } + public MetaHash CarriagePitchCurve { get; set; } + public MetaHash CarriageVolumeCurve { get; set; } + public MetaHash DriveTonePitchCurve { get; set; } + public MetaHash DriveToneVolumeCurve { get; set; } + public MetaHash DriveToneSynthPitchCurve { get; set; } + public MetaHash DriveToneSynthVolumeCurve { get; set; } + public MetaHash GrindPitchCurve { get; set; } + public MetaHash GrindVolumeCurve { get; set; } + public MetaHash TrainIdlePitchCurve { get; set; } + public MetaHash TrainIdleVolumeCurve { get; set; } + public MetaHash SquealPitchCurve { get; set; } + public MetaHash SquealVolumeCurve { get; set; } + public MetaHash ScrapeSpeedVolumeCurve { get; set; } + public MetaHash WheelVolumeCurve { get; set; } + public MetaHash WheelDelayCurve { get; set; } + public MetaHash RumbleVolumeCurve { get; set; } + public MetaHash BrakeVelocityPitchCurve { get; set; } + public MetaHash BrakeVelocityVolumeCurve { get; set; } + public MetaHash BrakeAccelerationPitchCurve { get; set; } + public MetaHash BrakeAccelerationVolumeCurve { get; set; } + public MetaHash TrainApproachTrackRumble { get; set; } + public MetaHash TrackRumbleDistanceToIntensity { get; set; } + public MetaHash TrainDistanceToRollOffScale { get; set; } + public MetaHash VehicleCollisions { get; set; } - public Dat151Train(RelFile rel) : base(rel) + public Dat151TrainAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Train; + Type = Dat151RelType.TrainAudioSettings; TypeID = (byte)Type; } - public Dat151Train(RelData d, BinaryReader br) : base(d, br) + public Dat151TrainAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadUInt32(); + DriveTone = br.ReadUInt32(); + DriveToneSynth = br.ReadUInt32(); + IdleLoop = br.ReadUInt32(); + Brakes = br.ReadUInt32(); BigBrakeRelease = br.ReadUInt32(); BrakeRelease = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Horn = br.ReadUInt32(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadUInt32(); - Carriage = br.ReadUInt32(); - Unk12 = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadUInt32(); - CarriagePitch = br.ReadUInt32(); - CarriageVolume = br.ReadUInt32(); - DriveTonePitch = br.ReadUInt32(); - DriveToneVolume = br.ReadUInt32(); - DriveToneSynthPitch = br.ReadUInt32(); - DriveToneSynthVolume = br.ReadUInt32(); - GrindPitch = br.ReadUInt32(); - GrindVolume = br.ReadUInt32(); - IdlePitch = br.ReadUInt32(); - IdleVolume = br.ReadUInt32(); - SquealPitch = br.ReadUInt32(); - SquealVolume = br.ReadUInt32(); - ScrapeSpeedVolume = br.ReadUInt32(); - WheelVolume = br.ReadUInt32(); - WheelDelay = br.ReadUInt32(); - RumbleVolume = br.ReadUInt32(); - BrakeVelocityPitch = br.ReadUInt32(); - BrakeVelocityVolume = br.ReadUInt32(); - BrakeAccelerationPitch = br.ReadUInt32(); - BrakeAccelerationVolume = br.ReadUInt32(); - Unk35 = br.ReadUInt32(); - Unk36 = br.ReadUInt32(); - Unk37 = br.ReadUInt32(); - Collision = br.ReadUInt32(); - - if (Unk02 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + WheelDry = br.ReadUInt32(); + AirHornOneShot = br.ReadUInt32(); + BellLoopCrossing = br.ReadUInt32(); + BellLoopEngine = br.ReadUInt32(); + AmbientCarriage = br.ReadUInt32(); + AmbientRumble = br.ReadUInt32(); + AmbientGrind = br.ReadUInt32(); + AmbientSqueal = br.ReadUInt32(); + CarriagePitchCurve = br.ReadUInt32(); + CarriageVolumeCurve = br.ReadUInt32(); + DriveTonePitchCurve = br.ReadUInt32(); + DriveToneVolumeCurve = br.ReadUInt32(); + DriveToneSynthPitchCurve = br.ReadUInt32(); + DriveToneSynthVolumeCurve = br.ReadUInt32(); + GrindPitchCurve = br.ReadUInt32(); + GrindVolumeCurve = br.ReadUInt32(); + TrainIdlePitchCurve = br.ReadUInt32(); + TrainIdleVolumeCurve = br.ReadUInt32(); + SquealPitchCurve = br.ReadUInt32(); + SquealVolumeCurve = br.ReadUInt32(); + ScrapeSpeedVolumeCurve = br.ReadUInt32(); + WheelVolumeCurve = br.ReadUInt32(); + WheelDelayCurve = br.ReadUInt32(); + RumbleVolumeCurve = br.ReadUInt32(); + BrakeVelocityPitchCurve = br.ReadUInt32(); + BrakeVelocityVolumeCurve = br.ReadUInt32(); + BrakeAccelerationPitchCurve = br.ReadUInt32(); + BrakeAccelerationVolumeCurve = br.ReadUInt32(); + TrainApproachTrackRumble = br.ReadUInt32(); + TrackRumbleDistanceToIntensity = br.ReadUInt32(); + TrainDistanceToRollOffScale = br.ReadUInt32(); + VehicleCollisions = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); + bw.Write(DriveTone); + bw.Write(DriveToneSynth); + bw.Write(IdleLoop); + bw.Write(Brakes); bw.Write(BigBrakeRelease); bw.Write(BrakeRelease); - bw.Write(Unk07); - bw.Write(Horn); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Carriage); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(CarriagePitch); - bw.Write(CarriageVolume); - bw.Write(DriveTonePitch); - bw.Write(DriveToneVolume); - bw.Write(DriveToneSynthPitch); - bw.Write(DriveToneSynthVolume); - bw.Write(GrindPitch); - bw.Write(GrindVolume); - bw.Write(IdlePitch); - bw.Write(IdleVolume); - bw.Write(SquealPitch); - bw.Write(SquealVolume); - bw.Write(ScrapeSpeedVolume); - bw.Write(WheelVolume); - bw.Write(WheelDelay); - bw.Write(RumbleVolume); - bw.Write(BrakeVelocityPitch); - bw.Write(BrakeVelocityVolume); - bw.Write(BrakeAccelerationPitch); - bw.Write(BrakeAccelerationVolume); - bw.Write(Unk35); - bw.Write(Unk36); - bw.Write(Unk37); - bw.Write(Collision); + bw.Write(WheelDry); + bw.Write(AirHornOneShot); + bw.Write(BellLoopCrossing); + bw.Write(BellLoopEngine); + bw.Write(AmbientCarriage); + bw.Write(AmbientRumble); + bw.Write(AmbientGrind); + bw.Write(AmbientSqueal); + bw.Write(CarriagePitchCurve); + bw.Write(CarriageVolumeCurve); + bw.Write(DriveTonePitchCurve); + bw.Write(DriveToneVolumeCurve); + bw.Write(DriveToneSynthPitchCurve); + bw.Write(DriveToneSynthVolumeCurve); + bw.Write(GrindPitchCurve); + bw.Write(GrindVolumeCurve); + bw.Write(TrainIdlePitchCurve); + bw.Write(TrainIdleVolumeCurve); + bw.Write(SquealPitchCurve); + bw.Write(SquealVolumeCurve); + bw.Write(ScrapeSpeedVolumeCurve); + bw.Write(WheelVolumeCurve); + bw.Write(WheelDelayCurve); + bw.Write(RumbleVolumeCurve); + bw.Write(BrakeVelocityPitchCurve); + bw.Write(BrakeVelocityVolumeCurve); + bw.Write(BrakeAccelerationPitchCurve); + bw.Write(BrakeAccelerationVolumeCurve); + bw.Write(TrainApproachTrackRumble); + bw.Write(TrackRumbleDistanceToIntensity); + bw.Write(TrainDistanceToRollOffScale); + bw.Write(VehicleCollisions); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); + RelXml.StringTag(sb, indent, "DriveTone", RelXml.HashString(DriveTone)); + RelXml.StringTag(sb, indent, "DriveToneSynth", RelXml.HashString(DriveToneSynth)); + RelXml.StringTag(sb, indent, "IdleLoop", RelXml.HashString(IdleLoop)); + RelXml.StringTag(sb, indent, "Brakes", RelXml.HashString(Brakes)); RelXml.StringTag(sb, indent, "BigBrakeRelease", RelXml.HashString(BigBrakeRelease)); RelXml.StringTag(sb, indent, "BrakeRelease", RelXml.HashString(BrakeRelease)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Horn", RelXml.HashString(Horn)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Carriage", RelXml.HashString(Carriage)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); - RelXml.StringTag(sb, indent, "CarriagePitch", RelXml.HashString(CarriagePitch)); - RelXml.StringTag(sb, indent, "CarriageVolume", RelXml.HashString(CarriageVolume)); - RelXml.StringTag(sb, indent, "DriveTonePitch", RelXml.HashString(DriveTonePitch)); - RelXml.StringTag(sb, indent, "DriveToneVolume", RelXml.HashString(DriveToneVolume)); - RelXml.StringTag(sb, indent, "DriveToneSynthPitch", RelXml.HashString(DriveToneSynthPitch)); - RelXml.StringTag(sb, indent, "DriveToneSynthVolume", RelXml.HashString(DriveToneSynthVolume)); - RelXml.StringTag(sb, indent, "GrindPitch", RelXml.HashString(GrindPitch)); - RelXml.StringTag(sb, indent, "GrindVolume", RelXml.HashString(GrindVolume)); - RelXml.StringTag(sb, indent, "IdlePitch", RelXml.HashString(IdlePitch)); - RelXml.StringTag(sb, indent, "IdleVolume", RelXml.HashString(IdleVolume)); - RelXml.StringTag(sb, indent, "SquealPitch", RelXml.HashString(SquealPitch)); - RelXml.StringTag(sb, indent, "SquealVolume", RelXml.HashString(SquealVolume)); - RelXml.StringTag(sb, indent, "ScrapeSpeedVolume", RelXml.HashString(ScrapeSpeedVolume)); - RelXml.StringTag(sb, indent, "WheelVolume", RelXml.HashString(WheelVolume)); - RelXml.StringTag(sb, indent, "WheelDelay", RelXml.HashString(WheelDelay)); - RelXml.StringTag(sb, indent, "RumbleVolume", RelXml.HashString(RumbleVolume)); - RelXml.StringTag(sb, indent, "BrakeVelocityPitch", RelXml.HashString(BrakeVelocityPitch)); - RelXml.StringTag(sb, indent, "BrakeVelocityVolume", RelXml.HashString(BrakeVelocityVolume)); - RelXml.StringTag(sb, indent, "BrakeAccelerationPitch", RelXml.HashString(BrakeAccelerationPitch)); - RelXml.StringTag(sb, indent, "BrakeAccelerationVolume", RelXml.HashString(BrakeAccelerationVolume)); - RelXml.StringTag(sb, indent, "Unk35", RelXml.HashString(Unk35)); - RelXml.StringTag(sb, indent, "Unk36", RelXml.HashString(Unk36)); - RelXml.StringTag(sb, indent, "Unk37", RelXml.HashString(Unk37)); - RelXml.StringTag(sb, indent, "Collision", RelXml.HashString(Collision)); + RelXml.StringTag(sb, indent, "WheelDry", RelXml.HashString(WheelDry)); + RelXml.StringTag(sb, indent, "AirHornOneShot", RelXml.HashString(AirHornOneShot)); + RelXml.StringTag(sb, indent, "BellLoopCrossing", RelXml.HashString(BellLoopCrossing)); + RelXml.StringTag(sb, indent, "BellLoopEngine", RelXml.HashString(BellLoopEngine)); + RelXml.StringTag(sb, indent, "AmbientCarriage", RelXml.HashString(AmbientCarriage)); + RelXml.StringTag(sb, indent, "AmbientRumble", RelXml.HashString(AmbientRumble)); + RelXml.StringTag(sb, indent, "AmbientGrind", RelXml.HashString(AmbientGrind)); + RelXml.StringTag(sb, indent, "AmbientSqueal", RelXml.HashString(AmbientSqueal)); + RelXml.StringTag(sb, indent, "CarriagePitchCurve", RelXml.HashString(CarriagePitchCurve)); + RelXml.StringTag(sb, indent, "CarriageVolumeCurve", RelXml.HashString(CarriageVolumeCurve)); + RelXml.StringTag(sb, indent, "DriveTonePitchCurve", RelXml.HashString(DriveTonePitchCurve)); + RelXml.StringTag(sb, indent, "DriveToneVolumeCurve", RelXml.HashString(DriveToneVolumeCurve)); + RelXml.StringTag(sb, indent, "DriveToneSynthPitchCurve", RelXml.HashString(DriveToneSynthPitchCurve)); + RelXml.StringTag(sb, indent, "DriveToneSynthVolumeCurve", RelXml.HashString(DriveToneSynthVolumeCurve)); + RelXml.StringTag(sb, indent, "GrindPitchCurve", RelXml.HashString(GrindPitchCurve)); + RelXml.StringTag(sb, indent, "GrindVolumeCurve", RelXml.HashString(GrindVolumeCurve)); + RelXml.StringTag(sb, indent, "TrainIdlePitchCurve", RelXml.HashString(TrainIdlePitchCurve)); + RelXml.StringTag(sb, indent, "TrainIdleVolumeCurve", RelXml.HashString(TrainIdleVolumeCurve)); + RelXml.StringTag(sb, indent, "SquealPitchCurve", RelXml.HashString(SquealPitchCurve)); + RelXml.StringTag(sb, indent, "SquealVolumeCurve", RelXml.HashString(SquealVolumeCurve)); + RelXml.StringTag(sb, indent, "ScrapeSpeedVolumeCurve", RelXml.HashString(ScrapeSpeedVolumeCurve)); + RelXml.StringTag(sb, indent, "WheelVolumeCurve", RelXml.HashString(WheelVolumeCurve)); + RelXml.StringTag(sb, indent, "WheelDelayCurve", RelXml.HashString(WheelDelayCurve)); + RelXml.StringTag(sb, indent, "RumbleVolumeCurve", RelXml.HashString(RumbleVolumeCurve)); + RelXml.StringTag(sb, indent, "BrakeVelocityPitchCurve", RelXml.HashString(BrakeVelocityPitchCurve)); + RelXml.StringTag(sb, indent, "BrakeVelocityVolumeCurve", RelXml.HashString(BrakeVelocityVolumeCurve)); + RelXml.StringTag(sb, indent, "BrakeAccelerationPitchCurve", RelXml.HashString(BrakeAccelerationPitchCurve)); + RelXml.StringTag(sb, indent, "BrakeAccelerationVolumeCurve", RelXml.HashString(BrakeAccelerationVolumeCurve)); + RelXml.StringTag(sb, indent, "TrainApproachTrackRumble", RelXml.HashString(TrainApproachTrackRumble)); + RelXml.StringTag(sb, indent, "TrackRumbleDistanceToIntensity", RelXml.HashString(TrackRumbleDistanceToIntensity)); + RelXml.StringTag(sb, indent, "TrainDistanceToRollOffScale", RelXml.HashString(TrainDistanceToRollOffScale)); + RelXml.StringTag(sb, indent, "VehicleCollisions", RelXml.HashString(VehicleCollisions)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); + DriveTone = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveTone")); + DriveToneSynth = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneSynth")); + IdleLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleLoop")); + Brakes = XmlRel.GetHash(Xml.GetChildInnerText(node, "Brakes")); BigBrakeRelease = XmlRel.GetHash(Xml.GetChildInnerText(node, "BigBrakeRelease")); BrakeRelease = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeRelease")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Horn = XmlRel.GetHash(Xml.GetChildInnerText(node, "Horn")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Carriage = XmlRel.GetHash(Xml.GetChildInnerText(node, "Carriage")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); - CarriagePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "CarriagePitch")); - CarriageVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "CarriageVolume")); - DriveTonePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveTonePitch")); - DriveToneVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneVolume")); - DriveToneSynthPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneSynthPitch")); - DriveToneSynthVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneSynthVolume")); - GrindPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "GrindPitch")); - GrindVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "GrindVolume")); - IdlePitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdlePitch")); - IdleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "IdleVolume")); - SquealPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "SquealPitch")); - SquealVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "SquealVolume")); - ScrapeSpeedVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeSpeedVolume")); - WheelVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "WheelVolume")); - WheelDelay = XmlRel.GetHash(Xml.GetChildInnerText(node, "WheelDelay")); - RumbleVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "RumbleVolume")); - BrakeVelocityPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeVelocityPitch")); - BrakeVelocityVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeVelocityVolume")); - BrakeAccelerationPitch = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeAccelerationPitch")); - BrakeAccelerationVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeAccelerationVolume")); - Unk35 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk35")); - Unk36 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk36")); - Unk37 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk37")); - Collision = XmlRel.GetHash(Xml.GetChildInnerText(node, "Collision")); + WheelDry = XmlRel.GetHash(Xml.GetChildInnerText(node, "WheelDry")); + AirHornOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "AirHornOneShot")); + BellLoopCrossing = XmlRel.GetHash(Xml.GetChildInnerText(node, "BellLoopCrossing")); + BellLoopEngine = XmlRel.GetHash(Xml.GetChildInnerText(node, "BellLoopEngine")); + AmbientCarriage = XmlRel.GetHash(Xml.GetChildInnerText(node, "AmbientCarriage")); + AmbientRumble = XmlRel.GetHash(Xml.GetChildInnerText(node, "AmbientRumble")); + AmbientGrind = XmlRel.GetHash(Xml.GetChildInnerText(node, "AmbientGrind")); + AmbientSqueal = XmlRel.GetHash(Xml.GetChildInnerText(node, "AmbientSqueal")); + CarriagePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "CarriagePitchCurve")); + CarriageVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "CarriageVolumeCurve")); + DriveTonePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveTonePitchCurve")); + DriveToneVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneVolumeCurve")); + DriveToneSynthPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneSynthPitchCurve")); + DriveToneSynthVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DriveToneSynthVolumeCurve")); + GrindPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "GrindPitchCurve")); + GrindVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "GrindVolumeCurve")); + TrainIdlePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrainIdlePitchCurve")); + TrainIdleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrainIdleVolumeCurve")); + SquealPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "SquealPitchCurve")); + SquealVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "SquealVolumeCurve")); + ScrapeSpeedVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeSpeedVolumeCurve")); + WheelVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "WheelVolumeCurve")); + WheelDelayCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "WheelDelayCurve")); + RumbleVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "RumbleVolumeCurve")); + BrakeVelocityPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeVelocityPitchCurve")); + BrakeVelocityVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeVelocityVolumeCurve")); + BrakeAccelerationPitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeAccelerationPitchCurve")); + BrakeAccelerationVolumeCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "BrakeAccelerationVolumeCurve")); + TrainApproachTrackRumble = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrainApproachTrackRumble")); + TrackRumbleDistanceToIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrackRumbleDistanceToIntensity")); + TrainDistanceToRollOffScale = XmlRel.GetHash(Xml.GetChildInnerText(node, "TrainDistanceToRollOffScale")); + VehicleCollisions = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCollisions")); } public override MetaHash[] GetCurveHashes() { - return new[] { CarriagePitch, CarriageVolume, DriveTonePitch, DriveToneVolume, DriveToneSynthPitch, DriveToneSynthVolume, - GrindPitch, GrindVolume, IdlePitch, IdleVolume, SquealPitch, SquealVolume, ScrapeSpeedVolume, WheelVolume, WheelDelay, - RumbleVolume, BrakeVelocityPitch, BrakeVelocityVolume, BrakeAccelerationPitch, BrakeAccelerationVolume, Unk36, Unk37 }; + return new[] { CarriagePitchCurve, CarriageVolumeCurve, DriveTonePitchCurve, DriveToneVolumeCurve, DriveToneSynthPitchCurve, DriveToneSynthVolumeCurve, + GrindPitchCurve, GrindVolumeCurve, TrainIdlePitchCurve, TrainIdleVolumeCurve, SquealPitchCurve, SquealVolumeCurve, ScrapeSpeedVolumeCurve, WheelVolumeCurve, WheelDelayCurve, + RumbleVolumeCurve, BrakeVelocityPitchCurve, BrakeVelocityVolumeCurve, BrakeAccelerationPitchCurve, BrakeAccelerationVolumeCurve, TrackRumbleDistanceToIntensity, TrainDistanceToRollOffScale }; } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk03, Unk04, BigBrakeRelease, BrakeRelease, Unk07, Horn, Unk09, Unk10, Carriage, Unk12, Unk13, Unk14, Unk35 }; + return new[] { DriveTone, IdleLoop, Brakes, BigBrakeRelease, BrakeRelease, WheelDry, AirHornOneShot, BellLoopCrossing, BellLoopEngine, AmbientCarriage, AmbientRumble, AmbientGrind, AmbientSqueal, TrainApproachTrackRumble }; } public override MetaHash[] GetGameHashes() { - return new[] { Collision }; + return new[] { VehicleCollisions }; } } - [TC(typeof(EXP))] public class Dat151AnimalParamsItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151AnimalParamsItem : IMetaXmlItem { - public string Name { get; set; } - public float Unk1 { get; set; } - public float Unk2 { get; set; } - public int Unk3 { get; set; } - public float Unk4 { get; set; } - public int Unk5 { get; set; } - public int Unk6 { get; set; } - public float Unk7 { get; set; } - public byte Unk8 { get; set; } + public string ContextName { get; set; } + public float VolumeOffset { get; set; } + public float RollOff { get; set; } + public int Priority { get; set; } + public float Probability { get; set; } + public int MinTimeBetween { get; set; } + public int MaxTimeBetween { get; set; } + public float MaxDistance { get; set; } + public byte ContextBits { get; set; } public override string ToString() { - return Name; + return ContextName; } public Dat151AnimalParamsItem() @@ -14623,73 +14060,75 @@ namespace CodeWalker.GameFiles public Dat151AnimalParamsItem(BinaryReader br) { var data = br.ReadBytes(32); - Name = Encoding.ASCII.GetString(data).Replace("\0", ""); - Unk1 = br.ReadSingle(); - Unk2 = br.ReadSingle(); - Unk3 = br.ReadInt32(); - Unk4 = br.ReadSingle(); - Unk5 = br.ReadInt32(); - Unk6 = br.ReadInt32(); - Unk7 = br.ReadSingle(); - Unk8 = br.ReadByte(); + ContextName = Encoding.ASCII.GetString(data).Replace("\0", ""); + VolumeOffset = br.ReadSingle(); + RollOff = br.ReadSingle(); + Priority = br.ReadInt32(); + Probability = br.ReadSingle(); + MinTimeBetween = br.ReadInt32(); + MaxTimeBetween = br.ReadInt32(); + MaxDistance = br.ReadSingle(); + ContextBits = br.ReadByte(); } public void Write(BinaryWriter bw) { var data = new byte[32]; - int len = Math.Min(Name?.Length ?? 0, 32); + int len = Math.Min(ContextName?.Length ?? 0, 32); if (len > 0) { - Encoding.ASCII.GetBytes(Name, 0, len, data, 0); + Encoding.ASCII.GetBytes(ContextName, 0, len, data, 0); } bw.Write(data); - bw.Write(Unk1); - bw.Write(Unk2); - bw.Write(Unk3); - bw.Write(Unk4); - bw.Write(Unk5); - bw.Write(Unk6); - bw.Write(Unk7); - bw.Write(Unk8); + bw.Write(VolumeOffset); + bw.Write(RollOff); + bw.Write(Priority); + bw.Write(Probability); + bw.Write(MinTimeBetween); + bw.Write(MaxTimeBetween); + bw.Write(MaxDistance); + bw.Write(ContextBits); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Name", Name); - RelXml.ValueTag(sb, indent, "Unk1", FloatUtil.ToString(Unk1)); - RelXml.ValueTag(sb, indent, "Unk2", FloatUtil.ToString(Unk2)); - RelXml.ValueTag(sb, indent, "Unk3", Unk3.ToString()); - RelXml.ValueTag(sb, indent, "Unk4", FloatUtil.ToString(Unk4)); - RelXml.ValueTag(sb, indent, "Unk5", Unk5.ToString()); - RelXml.ValueTag(sb, indent, "Unk6", Unk6.ToString()); - RelXml.ValueTag(sb, indent, "Unk7", FloatUtil.ToString(Unk7)); - RelXml.ValueTag(sb, indent, "Unk8", Unk8.ToString()); + RelXml.StringTag(sb, indent, "ContextName", ContextName); + RelXml.ValueTag(sb, indent, "VolumeOffset", FloatUtil.ToString(VolumeOffset)); + RelXml.ValueTag(sb, indent, "RollOff", FloatUtil.ToString(RollOff)); + RelXml.ValueTag(sb, indent, "Priority", Priority.ToString()); + RelXml.ValueTag(sb, indent, "Probability", FloatUtil.ToString(Probability)); + RelXml.ValueTag(sb, indent, "MinTimeBetween", MinTimeBetween.ToString()); + RelXml.ValueTag(sb, indent, "MaxTimeBetween", MaxTimeBetween.ToString()); + RelXml.ValueTag(sb, indent, "MaxDistance", FloatUtil.ToString(MaxDistance)); + RelXml.ValueTag(sb, indent, "ContextBits", ContextBits.ToString()); } public void ReadXml(XmlNode node) { - Name = Xml.GetChildInnerText(node, "Name"); - Unk1 = Xml.GetChildFloatAttribute(node, "Unk1", "value"); - Unk2 = Xml.GetChildFloatAttribute(node, "Unk2", "value"); - Unk3 = Xml.GetChildIntAttribute(node, "Unk3", "value"); - Unk4 = Xml.GetChildFloatAttribute(node, "Unk4", "value"); - Unk5 = Xml.GetChildIntAttribute(node, "Unk5", "value"); - Unk6 = Xml.GetChildIntAttribute(node, "Unk6", "value"); - Unk7 = Xml.GetChildFloatAttribute(node, "Unk7", "value"); - Unk8 = (byte)Xml.GetChildUIntAttribute(node, "Unk8", "value"); + ContextName = Xml.GetChildInnerText(node, "ContextName"); + VolumeOffset = Xml.GetChildFloatAttribute(node, "VolumeOffset", "value"); + RollOff = Xml.GetChildFloatAttribute(node, "RollOff", "value"); + Priority = Xml.GetChildIntAttribute(node, "Priority", "value"); + Probability = Xml.GetChildFloatAttribute(node, "Probability", "value"); + MinTimeBetween = Xml.GetChildIntAttribute(node, "MinTimeBetween", "value"); + MaxTimeBetween = Xml.GetChildIntAttribute(node, "MaxTimeBetween", "value"); + MaxDistance = Xml.GetChildFloatAttribute(node, "MaxDistance", "value"); + ContextBits = (byte)Xml.GetChildUIntAttribute(node, "ContextBits", "value"); } } - [TC(typeof(EXP))] public class Dat151AnimalParams : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151AnimalParams : Dat151RelData { - public int Unk01 { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public int Unk04 { get; set; } - public byte Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; } - public float Unk09 { get; set; } - public MetaHash Unk10 { get; set; } - public byte ParamsCount { get; set; } - public Dat151AnimalParamsItem[] Params { get; set; } + public int BasePriority { get; set; } + public float MinFarDistance { get; set; } + public float MaxDistanceToBankLoad { get; set; } + public int MaxSoundInstances { get; set; } + public byte AnimalType { get; set; } + public MetaHash ScrapeVolCurve { get; set; } + public MetaHash ScrapePitchCurve { get; set; } + public MetaHash BigVehicleImpact { get; set; } + public float VehicleSpeedForBigImpact { get; set; } + public MetaHash RunOverSound { get; set; } + public byte ContextsCount { get; set; } + public Dat151AnimalParamsItem[] Contexts { get; set; } public Dat151AnimalParams(RelFile rel) : base(rel) { @@ -14699,99 +14138,97 @@ namespace CodeWalker.GameFiles public Dat151AnimalParams(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadByte(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - Unk09 = br.ReadSingle(); - Unk10 = br.ReadUInt32(); - ParamsCount = br.ReadByte(); + BasePriority = br.ReadInt32(); + MinFarDistance = br.ReadSingle(); + MaxDistanceToBankLoad = br.ReadSingle(); + MaxSoundInstances = br.ReadInt32(); + AnimalType = br.ReadByte(); + ScrapeVolCurve = br.ReadUInt32(); + ScrapePitchCurve = br.ReadUInt32(); + BigVehicleImpact = br.ReadUInt32(); + VehicleSpeedForBigImpact = br.ReadSingle(); + RunOverSound = br.ReadUInt32(); - var items = new Dat151AnimalParamsItem[ParamsCount]; - for (int i = 0; i < ParamsCount; i++) + ContextsCount = br.ReadByte(); + var items = new Dat151AnimalParamsItem[ContextsCount]; + for (int i = 0; i < ContextsCount; i++) { items[i] = new Dat151AnimalParamsItem(br); } - Params = items; - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - + Contexts = items; } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(ParamsCount); - for (int i = 0; i < ParamsCount; i++) + bw.Write(BasePriority); + bw.Write(MinFarDistance); + bw.Write(MaxDistanceToBankLoad); + bw.Write(MaxSoundInstances); + bw.Write(AnimalType); + bw.Write(ScrapeVolCurve); + bw.Write(ScrapePitchCurve); + bw.Write(BigVehicleImpact); + bw.Write(VehicleSpeedForBigImpact); + bw.Write(RunOverSound); + + bw.Write(ContextsCount); + for (int i = 0; i < ContextsCount; i++) { - Params[i].Write(bw); + Contexts[i].Write(bw); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.WriteItemArray(sb, Params, indent, "Params"); + RelXml.ValueTag(sb, indent, "BasePriority", BasePriority.ToString()); + RelXml.ValueTag(sb, indent, "MinFarDistance", FloatUtil.ToString(MinFarDistance)); + RelXml.ValueTag(sb, indent, "MaxDistanceToBankLoad", FloatUtil.ToString(MaxDistanceToBankLoad)); + RelXml.ValueTag(sb, indent, "MaxSoundInstances", MaxSoundInstances.ToString()); + RelXml.ValueTag(sb, indent, "AnimalType", AnimalType.ToString()); + RelXml.StringTag(sb, indent, "ScrapeVolCurve", RelXml.HashString(ScrapeVolCurve)); + RelXml.StringTag(sb, indent, "ScrapePitchCurve", RelXml.HashString(ScrapePitchCurve)); + RelXml.StringTag(sb, indent, "BigVehicleImpact", RelXml.HashString(BigVehicleImpact)); + RelXml.ValueTag(sb, indent, "VehicleSpeedForBigImpact", FloatUtil.ToString(VehicleSpeedForBigImpact)); + RelXml.StringTag(sb, indent, "RunOverSound", RelXml.HashString(RunOverSound)); + RelXml.WriteItemArray(sb, Contexts, indent, "Contexts"); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = (byte)Xml.GetChildUIntAttribute(node, "Unk05", "value"); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Params = XmlRel.ReadItemArray(node, "Params"); - ParamsCount = (byte)(Params?.Length ?? 0); + BasePriority = Xml.GetChildIntAttribute(node, "BasePriority", "value"); + MinFarDistance = Xml.GetChildFloatAttribute(node, "MinFarDistance", "value"); + MaxDistanceToBankLoad = Xml.GetChildFloatAttribute(node, "MaxDistanceToBankLoad", "value"); + MaxSoundInstances = Xml.GetChildIntAttribute(node, "MaxSoundInstances", "value"); + AnimalType = (byte)Xml.GetChildUIntAttribute(node, "AnimalType", "value"); + ScrapeVolCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeVolCurve")); + ScrapePitchCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapePitchCurve")); + BigVehicleImpact = XmlRel.GetHash(Xml.GetChildInnerText(node, "BigVehicleImpact")); + VehicleSpeedForBigImpact = Xml.GetChildFloatAttribute(node, "VehicleSpeedForBigImpact", "value"); + RunOverSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RunOverSound")); + Contexts = XmlRel.ReadItemArray(node, "Contexts"); + ContextsCount = (byte)(Contexts?.Length ?? 0); } public override MetaHash[] GetCurveHashes() { - return new[] { Unk06, Unk07 }; + return new[] { ScrapeVolCurve, ScrapePitchCurve }; } public override MetaHash[] GetSoundHashes() { - return new[] { Unk08, Unk10 }; + return new[] { BigVehicleImpact, RunOverSound }; } } - [TC(typeof(EXP))] public class Dat151SpeechParams : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151SpeechParams : Dat151RelData { - public FlagsUint Flags { get; set; } //0xAAA50405 - public int Unk01 { get; set; } //3 - public int Unk02 { get; set; } //30000 - public byte Unk03 { get; set; } //0x00000202 - public byte Unk04 { get; set; } - public short Unk05 { get; set; } //0 - public MetaHash Unk06 { get; set; } //0 - public int Unk07 { get; set; } //0xFFFFFFFF + public FlagsUint Flags { get; set; } + public int OverrideContextSettings { get; set; } + public uint PreloadTimeoutInMs { get; set; } + public byte RequestedVolume { get; set; } + public byte Audibility { get; set; } + public short padding01 { get; set; } + public int RepeatTime { get; set; } + public int RepeatTimeOnSameVoice { get; set; } public Dat151SpeechParams(RelFile rel) : base(rel) @@ -14802,201 +14239,332 @@ namespace CodeWalker.GameFiles public Dat151SpeechParams(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadByte(); - Unk04 = br.ReadByte(); - Unk05 = br.ReadInt16(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadInt32(); - - if (Unk01 > 0xFFFF) - { } - if (Unk02 > 0xFFFF) - { } - if (Unk05 != 0) - { } - if (Unk06 != 0) - { } - if (Unk07 != -1) - { } - - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + OverrideContextSettings = br.ReadInt32(); + PreloadTimeoutInMs = br.ReadUInt32(); + RequestedVolume = br.ReadByte(); + Audibility = br.ReadByte(); + padding01 = br.ReadInt16(); + RepeatTime = br.ReadInt32(); + RepeatTimeOnSameVoice = br.ReadInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); + bw.Write(OverrideContextSettings); + bw.Write(PreloadTimeoutInMs); + bw.Write(RequestedVolume); + bw.Write(Audibility); + bw.Write(padding01); + bw.Write(RepeatTime); + bw.Write(RepeatTimeOnSameVoice); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); + RelXml.ValueTag(sb, indent, "OverrideContextSettings", OverrideContextSettings.ToString()); + RelXml.ValueTag(sb, indent, "PreloadTimeoutInMs", PreloadTimeoutInMs.ToString()); + RelXml.ValueTag(sb, indent, "RequestedVolume", RequestedVolume.ToString()); + RelXml.ValueTag(sb, indent, "Audibility", Audibility.ToString()); + RelXml.StringTag(sb, indent, "RepeatTime", RepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "RepeatTimeOnSameVoice", RepeatTimeOnSameVoice.ToString()); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = (byte)Xml.GetChildUIntAttribute(node, "Unk03", "value"); - Unk04 = (byte)Xml.GetChildUIntAttribute(node, "Unk04", "value"); - Unk05 = (short)Xml.GetChildIntAttribute(node, "Unk05", "value"); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); + OverrideContextSettings = Xml.GetChildIntAttribute(node, "OverrideContextSettings", "value"); + PreloadTimeoutInMs = Xml.GetChildUIntAttribute(node, "PreloadTimeoutInMs", "value"); + RequestedVolume = (byte)Xml.GetChildUIntAttribute(node, "RequestedVolume", "value"); + Audibility = (byte)Xml.GetChildUIntAttribute(node, "Audibility", "value"); + RepeatTime = Xml.GetChildIntAttribute(node, "RepeatTime", "value"); + RepeatTimeOnSameVoice = Xml.GetChildIntAttribute(node, "RepeatTimeOnSameVoice", "value"); } } - [TC(typeof(EXP))] public class Dat151MeleeCombat : Dat151RelData - { - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public MetaHash Unk04 { get; set; } - public MetaHash Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; } - public MetaHash Unk09 { get; set; } - public MetaHash Unk10 { get; set; } - public MetaHash Unk11 { get; set; } - public MetaHash Unk12 { get; set; } - public MetaHash Unk13 { get; set; } - public MetaHash Unk14 { get; set; } - public MetaHash Unk15 { get; set; } - public MetaHash Unk16 { get; set; } - public MetaHash Unk17 { get; set; } - public MetaHash Unk18 { get; set; } - public Dat151MeleeCombat(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151MeleeCombatSettings : Dat151RelData + { + public MetaHash SwipeSound { get; set; } + public MetaHash GeneralHitSound { get; set; } + public MetaHash PedHitSound { get; set; } + public MetaHash PedResponseSound { get; set; } + public MetaHash HeadTakeDown { get; set; } + public MetaHash BodyTakeDown { get; set; } + public MetaHash SmallAnimalHitSound { get; set; } + public MetaHash SmallAnimalResponseSound { get; set; } + public MetaHash BigAnimalHitSound { get; set; } + public MetaHash BigAnimalResponseSound { get; set; } + public MetaHash SlowMoPedHitSound { get; set; } + public MetaHash SlowMoPedResponseSound { get; set; } + public MetaHash SlowMoHeadTakeDown { get; set; } + public MetaHash SlowMoBodyTakeDown { get; set; } + public MetaHash SlowMoSmallAnimalHitSound { get; set; } + public MetaHash SlowMoSmallAnimalResponseSound { get; set; } + public MetaHash SlowMoBigAnimalHitSound { get; set; } + public MetaHash SlowMoBigAnimalResponseSound { get; set; } + + public Dat151MeleeCombatSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.MeleeCombat; + Type = Dat151RelType.MeleeCombatSettings; TypeID = (byte)Type; } - public Dat151MeleeCombat(RelData d, BinaryReader br) : base(d, br) + public Dat151MeleeCombatSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadUInt32(); - Unk11 = br.ReadUInt32(); - Unk12 = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadUInt32(); - Unk15 = br.ReadUInt32(); - Unk16 = br.ReadUInt32(); - Unk17 = br.ReadUInt32(); - Unk18 = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + SwipeSound = br.ReadUInt32(); + GeneralHitSound = br.ReadUInt32(); + PedHitSound = br.ReadUInt32(); + PedResponseSound = br.ReadUInt32(); + HeadTakeDown = br.ReadUInt32(); + BodyTakeDown = br.ReadUInt32(); + SmallAnimalHitSound = br.ReadUInt32(); + SmallAnimalResponseSound = br.ReadUInt32(); + BigAnimalHitSound = br.ReadUInt32(); + BigAnimalResponseSound = br.ReadUInt32(); + SlowMoPedHitSound = br.ReadUInt32(); + SlowMoPedResponseSound = br.ReadUInt32(); + SlowMoHeadTakeDown = br.ReadUInt32(); + SlowMoBodyTakeDown = br.ReadUInt32(); + SlowMoSmallAnimalHitSound = br.ReadUInt32(); + SlowMoSmallAnimalResponseSound = br.ReadUInt32(); + SlowMoBigAnimalHitSound = br.ReadUInt32(); + SlowMoBigAnimalResponseSound = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); + bw.Write(SwipeSound); + bw.Write(GeneralHitSound); + bw.Write(PedHitSound); + bw.Write(PedResponseSound); + bw.Write(HeadTakeDown); + bw.Write(BodyTakeDown); + bw.Write(SmallAnimalHitSound); + bw.Write(SmallAnimalResponseSound); + bw.Write(BigAnimalHitSound); + bw.Write(BigAnimalResponseSound); + bw.Write(SlowMoPedHitSound); + bw.Write(SlowMoPedResponseSound); + bw.Write(SlowMoHeadTakeDown); + bw.Write(SlowMoBodyTakeDown); + bw.Write(SlowMoSmallAnimalHitSound); + bw.Write(SlowMoSmallAnimalResponseSound); + bw.Write(SlowMoBigAnimalHitSound); + bw.Write(SlowMoBigAnimalResponseSound); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); + RelXml.StringTag(sb, indent, "SwipeSound", RelXml.HashString(SwipeSound)); + RelXml.StringTag(sb, indent, "GeneralHitSound", RelXml.HashString(GeneralHitSound)); + RelXml.StringTag(sb, indent, "PedHitSound", RelXml.HashString(PedHitSound)); + RelXml.StringTag(sb, indent, "PedResponseSound", RelXml.HashString(PedResponseSound)); + RelXml.StringTag(sb, indent, "HeadTakeDown", RelXml.HashString(HeadTakeDown)); + RelXml.StringTag(sb, indent, "BodyTakeDown", RelXml.HashString(BodyTakeDown)); + RelXml.StringTag(sb, indent, "SmallAnimalHitSound", RelXml.HashString(SmallAnimalHitSound)); + RelXml.StringTag(sb, indent, "SmallAnimalResponseSound", RelXml.HashString(SmallAnimalResponseSound)); + RelXml.StringTag(sb, indent, "BigAnimalHitSound", RelXml.HashString(BigAnimalHitSound)); + RelXml.StringTag(sb, indent, "BigAnimalResponseSound", RelXml.HashString(BigAnimalResponseSound)); + RelXml.StringTag(sb, indent, "SlowMoPedHitSound", RelXml.HashString(SlowMoPedHitSound)); + RelXml.StringTag(sb, indent, "SlowMoPedResponseSound", RelXml.HashString(SlowMoPedResponseSound)); + RelXml.StringTag(sb, indent, "SlowMoHeadTakeDown", RelXml.HashString(SlowMoHeadTakeDown)); + RelXml.StringTag(sb, indent, "SlowMoBodyTakeDown", RelXml.HashString(SlowMoBodyTakeDown)); + RelXml.StringTag(sb, indent, "SlowMoSmallAnimalHitSound", RelXml.HashString(SlowMoSmallAnimalHitSound)); + RelXml.StringTag(sb, indent, "SlowMoSmallAnimalResponseSound", RelXml.HashString(SlowMoSmallAnimalResponseSound)); + RelXml.StringTag(sb, indent, "SlowMoBigAnimalHitSound", RelXml.HashString(SlowMoBigAnimalHitSound)); + RelXml.StringTag(sb, indent, "SlowMoBigAnimalResponseSound", RelXml.HashString(SlowMoBigAnimalResponseSound)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); + SwipeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SwipeSound")); + GeneralHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "GeneralHitSound")); + PedHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "PedHitSound")); + PedResponseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "PedResponseSound")); + HeadTakeDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "HeadTakeDown")); + BodyTakeDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "BodyTakeDown")); + SmallAnimalHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SmallAnimalHitSound")); + SmallAnimalResponseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SmallAnimalResponseSound")); + BigAnimalHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BigAnimalHitSound")); + BigAnimalResponseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BigAnimalResponseSound")); + SlowMoPedHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoPedHitSound")); + SlowMoPedResponseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoPedResponseSound")); + SlowMoHeadTakeDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoHeadTakeDown")); + SlowMoBodyTakeDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoBodyTakeDown")); + SlowMoSmallAnimalHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSmallAnimalHitSound")); + SlowMoSmallAnimalResponseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSmallAnimalResponseSound")); + SlowMoBigAnimalHitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoBigAnimalHitSound")); + SlowMoBigAnimalResponseSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoBigAnimalResponseSound")); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk02, Unk03, Unk04, Unk05, Unk06, Unk07, Unk08, Unk09, Unk10, Unk11, Unk12, Unk13, Unk14, Unk15, Unk16, Unk17, Unk18 }; + return new[] { SwipeSound, GeneralHitSound, PedHitSound, PedResponseSound, HeadTakeDown, BodyTakeDown, SmallAnimalHitSound, SmallAnimalResponseSound, BigAnimalHitSound, BigAnimalResponseSound, SlowMoPedHitSound, SlowMoPedResponseSound, SlowMoHeadTakeDown, SlowMoBodyTakeDown, SlowMoSmallAnimalHitSound, SlowMoSmallAnimalResponseSound, SlowMoBigAnimalHitSound, SlowMoBigAnimalResponseSound }; } } - [TC(typeof(EXP))] public class Dat151SpeechContext : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151TriggeredSpeechContextBackupSpeechContext : IMetaXmlItem + { + public MetaHash SpeechContext { get; set; } + public float Weight { get; set; } + + + public Dat151TriggeredSpeechContextBackupSpeechContext() + { } + + public Dat151TriggeredSpeechContextBackupSpeechContext(BinaryReader br) + { + SpeechContext = br.ReadUInt32(); + Weight = br.ReadSingle(); + } + + public void Write(BinaryWriter bw) + { + bw.Write(SpeechContext); + bw.Write(Weight); + } + + public void WriteXml(StringBuilder sb, int indent) + { + RelXml.StringTag(sb, indent, "SpeechContext", RelXml.HashString(SpeechContext)); + RelXml.ValueTag(sb, indent, "Weight", FloatUtil.ToString(Weight)); + } + + public void ReadXml(XmlNode node) + { + SpeechContext = XmlRel.GetHash(Xml.GetChildInnerText(node, "SpeechContext")); + Weight = Xml.GetChildFloatAttribute(node, "Weight", "value"); + } + public override string ToString() + { + return SpeechContext.ToString(); + } + } + + [TC(typeof(EXP))] + public class Dat151TriggeredSpeechContext : Dat151RelData { public FlagsUint Flags { get; set; } - public int Unk01 { get; set; } + public int TriggeredContextRepeatTime { get; set; } + public int PrimaryRepeatTime { get; set; } + public int PrimaryRepeatTimeOnSameVoice { get; set; } + public int BackupRepeatTime { get; set; } + public int BackupRepeatTimeOnSameVoice { get; set; } + public MetaHash TimeCanNextUseTriggeredContext { get; set; } + public MetaHash TimeCanNextPlayPrimary { get; set; } + public MetaHash TimeCanNextPlayBackup { get; set; } + public MetaHash PrimarySpeechContext { get; set; } + public int BackupSpeechContextCount { get; set; } + public Dat151TriggeredSpeechContextBackupSpeechContext[] BackupSpeechContexts { get; set; } + + + public Dat151TriggeredSpeechContext(RelFile rel) : base(rel) + { + Type = Dat151RelType.TriggeredSpeechContext; + TypeID = (byte)Type; + } + public Dat151TriggeredSpeechContext(RelData d, BinaryReader br) : base(d, br) + { + Flags = br.ReadUInt32(); + TriggeredContextRepeatTime = br.ReadInt32(); + PrimaryRepeatTime = br.ReadInt32(); + PrimaryRepeatTimeOnSameVoice = br.ReadInt32(); + BackupRepeatTime = br.ReadInt32(); + BackupRepeatTimeOnSameVoice = br.ReadInt32(); + TimeCanNextUseTriggeredContext = br.ReadUInt32(); + TimeCanNextPlayPrimary = br.ReadUInt32(); + TimeCanNextPlayBackup = br.ReadUInt32(); + PrimarySpeechContext = br.ReadUInt32(); + + BackupSpeechContextCount = br.ReadInt32(); + BackupSpeechContexts = new Dat151TriggeredSpeechContextBackupSpeechContext[BackupSpeechContextCount]; + for (int i = 0; i < BackupSpeechContextCount; i++) + { + BackupSpeechContexts[i] = new Dat151TriggeredSpeechContextBackupSpeechContext(br); + } + } + public override void Write(BinaryWriter bw) + { + WriteTypeAndOffset(bw); + + bw.Write(Flags); + bw.Write(TriggeredContextRepeatTime); + bw.Write(PrimaryRepeatTime); + bw.Write(PrimaryRepeatTimeOnSameVoice); + bw.Write(BackupRepeatTime); + bw.Write(BackupRepeatTimeOnSameVoice); + bw.Write(TimeCanNextUseTriggeredContext); + bw.Write(TimeCanNextPlayPrimary); + bw.Write(TimeCanNextPlayBackup); + bw.Write(PrimarySpeechContext); + + bw.Write(BackupSpeechContextCount); + for (int i = 0; i < BackupSpeechContextCount; i++) + { + BackupSpeechContexts[i].Write(bw); + } + } + public override void WriteXml(StringBuilder sb, int indent) + { + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); + RelXml.ValueTag(sb, indent, "TriggeredContextRepeatTime", TriggeredContextRepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "PrimaryRepeatTime", PrimaryRepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "PrimaryRepeatTimeOnSameVoice", PrimaryRepeatTimeOnSameVoice.ToString()); + RelXml.ValueTag(sb, indent, "BackupRepeatTime", BackupRepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "BackupRepeatTimeOnSameVoice", BackupRepeatTimeOnSameVoice.ToString()); + RelXml.StringTag(sb, indent, "TimeCanNextUseTriggeredContext", RelXml.HashString(TimeCanNextUseTriggeredContext)); + RelXml.StringTag(sb, indent, "TimeCanNextPlayPrimary", RelXml.HashString(TimeCanNextPlayPrimary)); + RelXml.StringTag(sb, indent, "TimeCanNextPlayBackup", RelXml.HashString(TimeCanNextPlayBackup)); + RelXml.StringTag(sb, indent, "PrimarySpeechContext", RelXml.HashString(PrimarySpeechContext)); + RelXml.WriteItemArray(sb, BackupSpeechContexts, indent, "BackupSpeechContexts"); + } + public override void ReadXml(XmlNode node) + { + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + TriggeredContextRepeatTime = Xml.GetChildIntAttribute(node, "TriggeredContextRepeatTime", "value"); + PrimaryRepeatTime = Xml.GetChildIntAttribute(node, "PrimaryRepeatTime", "value"); + PrimaryRepeatTimeOnSameVoice = Xml.GetChildIntAttribute(node, "PrimaryRepeatTimeOnSameVoice", "value"); + BackupRepeatTime = Xml.GetChildIntAttribute(node, "BackupRepeatTime", "value"); + BackupRepeatTimeOnSameVoice = Xml.GetChildIntAttribute(node, "BackupRepeatTimeOnSameVoice", "value"); + TimeCanNextUseTriggeredContext = XmlRel.GetHash(Xml.GetChildInnerText(node, "TimeCanNextUseTriggeredContext")); + TimeCanNextPlayPrimary = XmlRel.GetHash(Xml.GetChildInnerText(node, "TimeCanNextPlayPrimary")); + TimeCanNextPlayBackup = XmlRel.GetHash(Xml.GetChildInnerText(node, "TimeCanNextPlayBackup")); + PrimarySpeechContext = XmlRel.GetHash(Xml.GetChildInnerText(node, "PrimarySpeechContext")); + BackupSpeechContexts = XmlRel.ReadItemArray(node, "BackupSpeechContexts"); + BackupSpeechContextCount = (BackupSpeechContexts?.Length ?? 0); + } + public override MetaHash[] GetGameHashes() + { + var list = new List(); + list.Add(PrimarySpeechContext); + foreach (var item in BackupSpeechContexts) + { + list.Add(item.SpeechContext); + } + return list.ToArray(); + } + } + + [TC(typeof(EXP))] + public class Dat151SpeechContext : Dat151RelData + { + public FlagsUint Flags { get; set; } + public MetaHash Unk01 { get; set; } public int Unk02 { get; set; } public int Unk03 { get; set; } - public int Unk04 { get; set; } - public int Unk05 { get; set; } - public MetaHash Unk06 { get; set; }//0 - public MetaHash Unk07 { get; set; }//0 - public MetaHash Unk08 { get; set; }//0 + public byte Unk04 { get; set; } + public byte Unk05 { get; set; } + public byte Unk06 { get; set; } + public byte Unk07 { get; set; } + public MetaHash Unk08 { get; set; } public MetaHash Unk09 { get; set; } - public int ItemCount { get; set; } - public Dat151HashFloat[] Items { get; set; }//SpeechChoice, probability? + public byte Unk10 { get; set; } + public byte Unk11 { get; set; } + public byte Unk12 { get; set; } + public byte Unk13 { get; set; } + public byte Unk14 { get; set; } + public byte Unk15 { get; set; } + public byte Unk16 { get; set; } + public byte Unk17 { get; set; } public Dat151SpeechContext(RelFile rel) : base(rel) @@ -15005,125 +14573,6 @@ namespace CodeWalker.GameFiles TypeID = (byte)Type; } public Dat151SpeechContext(RelData d, BinaryReader br) : base(d, br) - { - Flags = br.ReadUInt32(); - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadInt32(); - Unk06 = br.ReadUInt32();//0 - Unk07 = br.ReadUInt32();//0 - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadUInt32(); - ItemCount = br.ReadInt32(); - - var items = new Dat151HashFloat[ItemCount]; - for (int i = 0; i < ItemCount; i++) - { - items[i] = new Dat151HashFloat(br); - } - Items = items; - - if (Unk06 != 0) - { } - if (Unk07 != 0) - { } - if (Unk08 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - } - public override void Write(BinaryWriter bw) - { - WriteTypeAndOffset(bw); - - bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(ItemCount); - for (int i = 0; i < ItemCount; i++) - { - Items[i].Write(bw); - } - } - public override void WriteXml(StringBuilder sb, int indent) - { - RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.WriteItemArray(sb, Items, indent, "Items"); - } - public override void ReadXml(XmlNode node) - { - Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildIntAttribute(node, "Unk05", "value"); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Items = XmlRel.ReadItemArray(node, "Items"); - ItemCount = (Items?.Length ?? 0); - } - public override MetaHash[] GetGameHashes() - { - var list = new List(); - list.Add(Unk09); - foreach (var item in Items) - { - list.Add(item.Hash); - } - return list.ToArray(); - } - } - [TC(typeof(EXP))] public class Dat151SpeechChoice : Dat151RelData - { - public FlagsUint Flags { get; set; } - public MetaHash Unk01 { get; set; }//????? must be responsible for the speech itself somehow - public int Unk02 { get; set; } - public int Unk03 { get; set; } - public byte Unk04 { get; set; } - public byte Unk05 { get; set; } - public byte Unk06 { get; set; }//0 - public byte Unk07 { get; set; }//0 - public MetaHash Unk08 { get; set; }//0 - public MetaHash Unk09 { get; set; }//0 - public byte Unk10 { get; set; } - public byte Unk11 { get; set; } - public byte Unk12 { get; set; } - public byte Unk13 { get; set; } - public byte Unk14 { get; set; }//only when Unk11>2 - public byte Unk15 { get; set; }//only when Unk11>2 - public byte Unk16 { get; set; }//only when Unk11>2 - public byte Unk17 { get; set; }//only when Unk11>2 - - - public Dat151SpeechChoice(RelFile rel) : base(rel) - { - Type = Dat151RelType.SpeechChoice; - TypeID = (byte)Type; - } - public Dat151SpeechChoice(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32(); @@ -15133,8 +14582,8 @@ namespace CodeWalker.GameFiles Unk05 = br.ReadByte(); Unk06 = br.ReadByte(); Unk07 = br.ReadByte(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadUInt32();//0 + Unk08 = br.ReadUInt32(); + Unk09 = br.ReadUInt32(); Unk10 = br.ReadByte(); Unk11 = br.ReadByte(); Unk12 = br.ReadByte(); @@ -15147,26 +14596,6 @@ namespace CodeWalker.GameFiles Unk16 = br.ReadByte(); Unk17 = br.ReadByte(); } - - - if (Unk05 > 3) - { } - if (Unk06 != 0) - { } - if (Unk07 != 0) - { } - if (Unk08 != 0) - { } - if (Unk09 != 0) - { } - if (Unk11 > 3) - { } - - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - } public override void Write(BinaryWriter bw) { @@ -15243,61 +14672,47 @@ namespace CodeWalker.GameFiles } } } - [TC(typeof(EXP))] public class Dat151VirtualSpeechChoice : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151SpeechContextVirtual : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Unk01 { get; set; }//????? must be something to do with speech item - public MetaHash Unk02 { get; set; }//0 + public MetaHash Unk01 { get; set; } + public MetaHash Unk02 { get; set; } public int Unk03 { get; set; } - public MetaHash Unk04 { get; set; }//0 - public MetaHash Unk05 { get; set; }//0 - public MetaHash Unk06 { get; set; }//0 - public byte Unk07 { get; set; }//3 - public byte Unk08 { get; set; }//0 + public MetaHash Unk04 { get; set; } + public MetaHash Unk05 { get; set; } + public MetaHash Unk06 { get; set; } + public byte Unk07 { get; set; } + public byte Unk08 { get; set; } public byte Unk09 { get; set; } public byte ItemCount { get; set; } - public MetaHash[] Items { get; set; }//SpeechContext or SpeechChoice + public MetaHash[] Items { get; set; } - public Dat151VirtualSpeechChoice(RelFile rel) : base(rel) + public Dat151SpeechContextVirtual(RelFile rel) : base(rel) { - Type = Dat151RelType.VirtualSpeechChoice; + Type = Dat151RelType.SpeechContextVirtual; TypeID = (byte)Type; } - public Dat151VirtualSpeechChoice(RelData d, BinaryReader br) : base(d, br) + public Dat151SpeechContextVirtual(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32();//0 + Unk02 = br.ReadUInt32(); Unk03 = br.ReadInt32(); - Unk04 = br.ReadUInt32();//0 - Unk05 = br.ReadUInt32();//0 - Unk06 = br.ReadUInt32();//0 - Unk07 = br.ReadByte();//3 - Unk08 = br.ReadByte();//0 + Unk04 = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); + Unk07 = br.ReadByte(); + Unk08 = br.ReadByte(); Unk09 = br.ReadByte(); + ItemCount = br.ReadByte(); Items = new MetaHash[ItemCount]; for (int i = 0; i < ItemCount; i++) { Items[i] = br.ReadUInt32(); } - - if (Unk02 != 0) - { } - if (Unk04 != 0) - { } - if (Unk05 != 0) - { } - if (Unk06 != 0) - { } - if (Unk07 != 3) - { } - if (Unk08 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -15313,6 +14728,7 @@ namespace CodeWalker.GameFiles bw.Write(Unk07); bw.Write(Unk08); bw.Write(Unk09); + bw.Write(ItemCount); for (int i = 0; i < ItemCount; i++) { @@ -15353,10 +14769,12 @@ namespace CodeWalker.GameFiles return Items; } } - [TC(typeof(EXP))] public class Dat151SpeechContextList : Dat151RelData //dlc_btl_nightclub_scl, dlc_btl_nightclub_queue_scl + + [TC(typeof(EXP))] + public class Dat151SpeechContextList : Dat151RelData { - public int SpeechContextsCount { get; set; } - public MetaHash[] SpeechContexts { get; set; } + public int TriggeredSpeechContextsCount { get; set; } + public MetaHash[] TriggeredSpeechContexts { get; set; } public Dat151SpeechContextList(RelFile rel) : base(rel) { @@ -15365,286 +14783,282 @@ namespace CodeWalker.GameFiles } public Dat151SpeechContextList(RelData d, BinaryReader br) : base(d, br) { - SpeechContextsCount = br.ReadInt32(); - SpeechContexts = new MetaHash[SpeechContextsCount]; - for (int i = 0; i < SpeechContextsCount; i++) + TriggeredSpeechContextsCount = br.ReadInt32(); + TriggeredSpeechContexts = new MetaHash[TriggeredSpeechContextsCount]; + for (int i = 0; i < TriggeredSpeechContextsCount; i++) { - SpeechContexts[i] = br.ReadUInt32(); + TriggeredSpeechContexts[i] = br.ReadUInt32(); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(SpeechContextsCount); - for (int i = 0; i < SpeechContextsCount; i++) + bw.Write(TriggeredSpeechContextsCount); + for (int i = 0; i < TriggeredSpeechContextsCount; i++) { - bw.Write(SpeechContexts[i]); + bw.Write(TriggeredSpeechContexts[i]); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.WriteHashItemArray(sb, SpeechContexts, indent, "SpeechContexts"); + RelXml.WriteHashItemArray(sb, TriggeredSpeechContexts, indent, "TriggeredSpeechContexts"); } public override void ReadXml(XmlNode node) { - SpeechContexts = XmlRel.ReadHashItemArray(node, "SpeechContexts"); - SpeechContextsCount = (SpeechContexts?.Length ?? 0); + TriggeredSpeechContexts = XmlRel.ReadHashItemArray(node, "TriggeredSpeechContexts"); + TriggeredSpeechContextsCount = (TriggeredSpeechContexts?.Length ?? 0); } public override MetaHash[] GetGameHashes() { - return SpeechContexts; + return TriggeredSpeechContexts; } } - [TC(typeof(EXP))] public class Dat151Shoe : Dat151RelData //shoe type + + [TC(typeof(EXP))] + public class Dat151ShoeAudioSettings : Dat151RelData { - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public MetaHash Unk04 { get; set; } - public MetaHash Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; } - public MetaHash Unk09 { get; set; } - public MetaHash Unk10 { get; set; } - public MetaHash Unk11 { get; set; } - public MetaHash Unk12 { get; set; } - public MetaHash Unk13 { get; set; } - public float Unk14 { get; set; } - public float Unk15 { get; set; } - public int Unk16 { get; set; } - public float Unk17 { get; set; } - public MetaHash Unk18 { get; set; } - public MetaHash Unk19 { get; set; } - public MetaHash Unk20 { get; set; } + public MetaHash Walk { get; set; } + public MetaHash DirtyWalk { get; set; } + public MetaHash CreakyWalk { get; set; } + public MetaHash GlassyWalk { get; set; } + public MetaHash Run { get; set; } + public MetaHash DirtyRun { get; set; } + public MetaHash CreakyRun { get; set; } + public MetaHash GlassyRun { get; set; } + public MetaHash WetWalk { get; set; } + public MetaHash WetRun { get; set; } + public MetaHash SoftWalk { get; set; } + public MetaHash Scuff { get; set; } + public MetaHash Land { get; set; } + public float ShoeHardness { get; set; } + public float ShoeCreakiness { get; set; } + public int ShoeType { get; set; } + public float ShoeFitness { get; set; } + public MetaHash LadderShoeDown { get; set; } + public MetaHash LadderShoeUp { get; set; } + public MetaHash Kick { get; set; } - public Dat151Shoe(RelFile rel) : base(rel) + public Dat151ShoeAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Shoe; + Type = Dat151RelType.ShoeAudioSettings; TypeID = (byte)Type; } - public Dat151Shoe(RelData d, BinaryReader br) : base(d, br) + public Dat151ShoeAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadUInt32(); - Unk11 = br.ReadUInt32(); - Unk12 = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadSingle(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadSingle(); - Unk18 = br.ReadUInt32(); - Unk19 = br.ReadUInt32(); - Unk20 = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Walk = br.ReadUInt32(); + DirtyWalk = br.ReadUInt32(); + CreakyWalk = br.ReadUInt32(); + GlassyWalk = br.ReadUInt32(); + Run = br.ReadUInt32(); + DirtyRun = br.ReadUInt32(); + CreakyRun = br.ReadUInt32(); + GlassyRun = br.ReadUInt32(); + WetWalk = br.ReadUInt32(); + WetRun = br.ReadUInt32(); + SoftWalk = br.ReadUInt32(); + Scuff = br.ReadUInt32(); + Land = br.ReadUInt32(); + ShoeHardness = br.ReadSingle(); + ShoeCreakiness = br.ReadSingle(); + ShoeType = br.ReadInt32(); + ShoeFitness = br.ReadSingle(); + LadderShoeDown = br.ReadUInt32(); + LadderShoeUp = br.ReadUInt32(); + Kick = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); + bw.Write(Walk); + bw.Write(DirtyWalk); + bw.Write(CreakyWalk); + bw.Write(GlassyWalk); + bw.Write(Run); + bw.Write(DirtyRun); + bw.Write(CreakyRun); + bw.Write(GlassyRun); + bw.Write(WetWalk); + bw.Write(WetRun); + bw.Write(SoftWalk); + bw.Write(Scuff); + bw.Write(Land); + bw.Write(ShoeHardness); + bw.Write(ShoeCreakiness); + bw.Write(ShoeType); + bw.Write(ShoeFitness); + bw.Write(LadderShoeDown); + bw.Write(LadderShoeUp); + bw.Write(Kick); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", FloatUtil.ToString(Unk15)); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", FloatUtil.ToString(Unk17)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); - RelXml.StringTag(sb, indent, "Unk19", RelXml.HashString(Unk19)); - RelXml.StringTag(sb, indent, "Unk20", RelXml.HashString(Unk20)); + RelXml.StringTag(sb, indent, "Walk", RelXml.HashString(Walk)); + RelXml.StringTag(sb, indent, "DirtyWalk", RelXml.HashString(DirtyWalk)); + RelXml.StringTag(sb, indent, "CreakyWalk", RelXml.HashString(CreakyWalk)); + RelXml.StringTag(sb, indent, "GlassyWalk", RelXml.HashString(GlassyWalk)); + RelXml.StringTag(sb, indent, "Run", RelXml.HashString(Run)); + RelXml.StringTag(sb, indent, "DirtyRun", RelXml.HashString(DirtyRun)); + RelXml.StringTag(sb, indent, "CreakyRun", RelXml.HashString(CreakyRun)); + RelXml.StringTag(sb, indent, "GlassyRun", RelXml.HashString(GlassyRun)); + RelXml.StringTag(sb, indent, "WetWalk", RelXml.HashString(WetWalk)); + RelXml.StringTag(sb, indent, "WetRun", RelXml.HashString(WetRun)); + RelXml.StringTag(sb, indent, "SoftWalk", RelXml.HashString(SoftWalk)); + RelXml.StringTag(sb, indent, "Scuff", RelXml.HashString(Scuff)); + RelXml.StringTag(sb, indent, "Land", RelXml.HashString(Land)); + RelXml.ValueTag(sb, indent, "ShoeHardness", FloatUtil.ToString(ShoeHardness)); + RelXml.ValueTag(sb, indent, "ShoeCreakiness", FloatUtil.ToString(ShoeCreakiness)); + RelXml.ValueTag(sb, indent, "ShoeType", ShoeType.ToString()); + RelXml.ValueTag(sb, indent, "ShoeFitness", FloatUtil.ToString(ShoeFitness)); + RelXml.StringTag(sb, indent, "LadderShoeDown", RelXml.HashString(LadderShoeDown)); + RelXml.StringTag(sb, indent, "LadderShoeUp", RelXml.HashString(LadderShoeUp)); + RelXml.StringTag(sb, indent, "Kick", RelXml.HashString(Kick)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildFloatAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildFloatAttribute(node, "Unk17", "value"); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); - Unk19 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk19")); - Unk20 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk20")); + Walk = XmlRel.GetHash(Xml.GetChildInnerText(node, "Walk")); + DirtyWalk = XmlRel.GetHash(Xml.GetChildInnerText(node, "DirtyWalk")); + CreakyWalk = XmlRel.GetHash(Xml.GetChildInnerText(node, "CreakyWalk")); + GlassyWalk = XmlRel.GetHash(Xml.GetChildInnerText(node, "GlassyWalk")); + Run = XmlRel.GetHash(Xml.GetChildInnerText(node, "Run")); + DirtyRun = XmlRel.GetHash(Xml.GetChildInnerText(node, "DirtyRun")); + CreakyRun = XmlRel.GetHash(Xml.GetChildInnerText(node, "CreakyRun")); + GlassyRun = XmlRel.GetHash(Xml.GetChildInnerText(node, "GlassyRun")); + WetWalk = XmlRel.GetHash(Xml.GetChildInnerText(node, "WetWalk")); + WetRun = XmlRel.GetHash(Xml.GetChildInnerText(node, "WetRun")); + SoftWalk = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoftWalk")); + Scuff = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scuff")); + Land = XmlRel.GetHash(Xml.GetChildInnerText(node, "Land")); + ShoeHardness = Xml.GetChildFloatAttribute(node, "ShoeHardness", "value"); + ShoeCreakiness = Xml.GetChildFloatAttribute(node, "ShoeCreakiness", "value"); + ShoeType = Xml.GetChildIntAttribute(node, "ShoeType", "value"); + ShoeFitness = Xml.GetChildFloatAttribute(node, "ShoeFitness", "value"); + LadderShoeDown = XmlRel.GetHash(Xml.GetChildInnerText(node, "LadderShoeDown")); + LadderShoeUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "LadderShoeUp")); + Kick = XmlRel.GetHash(Xml.GetChildInnerText(node, "Kick")); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk02, Unk03, Unk04, Unk05, Unk06, Unk07, Unk08, Unk09, Unk10, Unk11, Unk12, Unk13, Unk18, Unk19, Unk20 }; + return new[] { Walk, DirtyWalk, CreakyWalk, GlassyWalk, Run, DirtyRun, CreakyRun, GlassyRun, WetWalk, WetRun, SoftWalk, Scuff, Land, LadderShoeDown, LadderShoeUp, Kick }; } } - [TC(typeof(EXP))] public class Dat151Unk22Item : IMetaXmlItem - { - public MetaHash Unk01 { get; set; }//state name? eg. stop,walk,run,sprint,jump,stairs_stop,stairs_walk,stairs_run,slopes,slopes_run,ladder,vault - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public float Unk08 { get; set; } - public int Unk09 { get; set; } - public Dat151Unk22Item() + [TC(typeof(EXP))] + public class Dat151ModelPhysicsParamsItem : IMetaXmlItem + { + public MetaHash ModeName { get; set; } + public float GroundDistanceDownEpsilon { get; set; } + public float GroundDistanceUpEpsilon { get; set; } + public float DownSpeedEpsilon { get; set; } + public float HindGroundDistanceDownEpsilon { get; set; } + public float HindGroundDistanceUpEpsilon { get; set; } + public float SpeedSmootherIncreaseRate { get; set; } + public float SpeedSmootherDecreaseRate { get; set; } + public uint TimeToRetrigger { get; set; } + + public Dat151ModelPhysicsParamsItem() { } - public Dat151Unk22Item(BinaryReader br) + public Dat151ModelPhysicsParamsItem(BinaryReader br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadInt32(); + ModeName = br.ReadUInt32(); + GroundDistanceDownEpsilon = br.ReadSingle(); + GroundDistanceUpEpsilon = br.ReadSingle(); + DownSpeedEpsilon = br.ReadSingle(); + HindGroundDistanceDownEpsilon = br.ReadSingle(); + HindGroundDistanceUpEpsilon = br.ReadSingle(); + SpeedSmootherIncreaseRate = br.ReadSingle(); + SpeedSmootherDecreaseRate = br.ReadSingle(); + TimeToRetrigger = br.ReadUInt32(); } public void Write(BinaryWriter bw) { - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); + bw.Write(ModeName); + bw.Write(GroundDistanceDownEpsilon); + bw.Write(GroundDistanceUpEpsilon); + bw.Write(DownSpeedEpsilon); + bw.Write(HindGroundDistanceDownEpsilon); + bw.Write(HindGroundDistanceUpEpsilon); + bw.Write(SpeedSmootherIncreaseRate); + bw.Write(SpeedSmootherDecreaseRate); + bw.Write(TimeToRetrigger); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); + RelXml.StringTag(sb, indent, "ModeName", RelXml.HashString(ModeName)); + RelXml.ValueTag(sb, indent, "GroundDistanceDownEpsilon", FloatUtil.ToString(GroundDistanceDownEpsilon)); + RelXml.ValueTag(sb, indent, "GroundDistanceUpEpsilon", FloatUtil.ToString(GroundDistanceUpEpsilon)); + RelXml.ValueTag(sb, indent, "DownSpeedEpsilon", FloatUtil.ToString(DownSpeedEpsilon)); + RelXml.ValueTag(sb, indent, "HindGroundDistanceDownEpsilon", FloatUtil.ToString(HindGroundDistanceDownEpsilon)); + RelXml.ValueTag(sb, indent, "HindGroundDistanceUpEpsilon", FloatUtil.ToString(HindGroundDistanceUpEpsilon)); + RelXml.ValueTag(sb, indent, "SpeedSmootherIncreaseRate", FloatUtil.ToString(SpeedSmootherIncreaseRate)); + RelXml.ValueTag(sb, indent, "SpeedSmootherDecreaseRate", FloatUtil.ToString(SpeedSmootherDecreaseRate)); + RelXml.ValueTag(sb, indent, "TimeToRetrigger", TimeToRetrigger.ToString()); } public void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); + ModeName = XmlRel.GetHash(Xml.GetChildInnerText(node, "ModeName")); + GroundDistanceDownEpsilon = Xml.GetChildFloatAttribute(node, "GroundDistanceDownEpsilon", "value"); + GroundDistanceUpEpsilon = Xml.GetChildFloatAttribute(node, "GroundDistanceUpEpsilon", "value"); + DownSpeedEpsilon = Xml.GetChildFloatAttribute(node, "DownSpeedEpsilon", "value"); + HindGroundDistanceDownEpsilon = Xml.GetChildFloatAttribute(node, "HindGroundDistanceDownEpsilon", "value"); + HindGroundDistanceUpEpsilon = Xml.GetChildFloatAttribute(node, "HindGroundDistanceUpEpsilon", "value"); + SpeedSmootherIncreaseRate = Xml.GetChildFloatAttribute(node, "SpeedSmootherIncreaseRate", "value"); + SpeedSmootherDecreaseRate = Xml.GetChildFloatAttribute(node, "SpeedSmootherDecreaseRate", "value"); + TimeToRetrigger = Xml.GetChildUIntAttribute(node, "TimeToRetrigger", "value"); } public override string ToString() { - return Unk01.ToString(); + return ModeName.ToString(); } } - [TC(typeof(EXP))] public class Dat151Unk22 : Dat151RelData //player/creature? + + [TC(typeof(EXP))] + public class Dat151ModelPhysicsParams : Dat151RelData { - public int Unk01 { get; set; } - public int Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } + public uint NumFeet { get; set; } + public int PedType { get; set; } + public MetaHash FootstepTuningValues { get; set; } + public float StopSpeedThreshold { get; set; } + public float WalkSpeedThreshold { get; set; } + public float RunSpeedThreshold { get; set; } public int ItemCount { get; set; } - public Dat151Unk22Item[] Items { get; set; } + public Dat151ModelPhysicsParamsItem[] Items { get; set; } - public Dat151Unk22(RelFile rel) : base(rel) + public Dat151ModelPhysicsParams(RelFile rel) : base(rel) { - Type = Dat151RelType.Unk22; + Type = Dat151RelType.ModelPhysicsParams; TypeID = (byte)Type; } - public Dat151Unk22(RelData d, BinaryReader br) : base(d, br) + public Dat151ModelPhysicsParams(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); + NumFeet = br.ReadUInt32(); + PedType = br.ReadInt32(); + FootstepTuningValues = br.ReadUInt32(); + StopSpeedThreshold = br.ReadSingle(); + WalkSpeedThreshold = br.ReadSingle(); + RunSpeedThreshold = br.ReadSingle(); + ItemCount = br.ReadInt32(); - Items = new Dat151Unk22Item[ItemCount]; + Items = new Dat151ModelPhysicsParamsItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151Unk22Item(br); + Items[i] = new Dat151ModelPhysicsParamsItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); + bw.Write(NumFeet); + bw.Write(PedType); + bw.Write(FootstepTuningValues); + bw.Write(StopSpeedThreshold); + bw.Write(WalkSpeedThreshold); + bw.Write(RunSpeedThreshold); + bw.Write(ItemCount); for (int i = 0; i < ItemCount; i++) { @@ -15654,136 +15068,125 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); + RelXml.ValueTag(sb, indent, "NumFeet", NumFeet.ToString()); + RelXml.ValueTag(sb, indent, "PedType", PedType.ToString()); + RelXml.StringTag(sb, indent, "FootstepTuningValues", RelXml.HashString(FootstepTuningValues)); + RelXml.ValueTag(sb, indent, "StopSpeedThreshold", FloatUtil.ToString(StopSpeedThreshold)); + RelXml.ValueTag(sb, indent, "WalkSpeedThreshold", FloatUtil.ToString(WalkSpeedThreshold)); + RelXml.ValueTag(sb, indent, "RunSpeedThreshold", FloatUtil.ToString(RunSpeedThreshold)); RelXml.WriteItemArray(sb, Items, indent, "Items"); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Items = XmlRel.ReadItemArray(node, "Items"); + NumFeet = Xml.GetChildUIntAttribute(node, "NumFeet", "value"); + PedType = Xml.GetChildIntAttribute(node, "PedType", "value"); + FootstepTuningValues = XmlRel.GetHash(Xml.GetChildInnerText(node, "FootstepTuningValues")); + StopSpeedThreshold = Xml.GetChildFloatAttribute(node, "StopSpeedThreshold", "value"); + WalkSpeedThreshold = Xml.GetChildFloatAttribute(node, "WalkSpeedThreshold", "value"); + RunSpeedThreshold = Xml.GetChildFloatAttribute(node, "RunSpeedThreshold", "value"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (Items?.Length ?? 0); } public override MetaHash[] GetGameHashes() { - return new[] { Unk03 }; + return new[] { FootstepTuningValues }; } } - [TC(typeof(EXP))] public class Dat151Skis : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151SkiAudioSettings : Dat151RelData { - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; }//0 - public float Unk03 { get; set; } - public MetaHash Unk04 { get; set; } - public MetaHash Unk05 { get; set; }//0 - public float Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; }//0 - public float Unk09 { get; set; } + public MetaHash StraightSound { get; set; } + public float MinSpeed { get; set; } + public float MaxSpeed { get; set; } + public MetaHash TurnSound { get; set; } + public float MinTurn { get; set; } + public float MaxTurn { get; set; } + public MetaHash TurnEdgeSound { get; set; } + public float MinSlopeEdge { get; set; } + public float MaxSlopeEdge { get; set; } - public Dat151Skis(RelFile rel) : base(rel) + public Dat151SkiAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Skis; + Type = Dat151RelType.SkiAudioSettings; TypeID = (byte)Type; } - public Dat151Skis(RelData d, BinaryReader br) : base(d, br) + public Dat151SkiAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32();//0 - Unk03 = br.ReadSingle(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32();//0 - Unk06 = br.ReadSingle(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadSingle(); - - if (Unk02 != 0) - { } - if (Unk05 != 0) - { } - if (Unk08 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + StraightSound = br.ReadUInt32(); + MinSpeed = br.ReadSingle(); + MaxSpeed = br.ReadSingle(); + TurnSound = br.ReadUInt32(); + MinTurn = br.ReadSingle(); + MaxTurn = br.ReadSingle(); + TurnEdgeSound = br.ReadUInt32(); + MinSlopeEdge = br.ReadSingle(); + MaxSlopeEdge = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); + bw.Write(StraightSound); + bw.Write(MinSpeed); + bw.Write(MaxSpeed); + bw.Write(TurnSound); + bw.Write(MinTurn); + bw.Write(MaxTurn); + bw.Write(TurnEdgeSound); + bw.Write(MinSlopeEdge); + bw.Write(MaxSlopeEdge); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); + RelXml.StringTag(sb, indent, "StraightSound", RelXml.HashString(StraightSound)); + RelXml.StringTag(sb, indent, "MinSpeed", FloatUtil.ToString(MinSpeed)); + RelXml.ValueTag(sb, indent, "MaxSpeed", FloatUtil.ToString(MaxSpeed)); + RelXml.StringTag(sb, indent, "TurnSound", RelXml.HashString(TurnSound)); + RelXml.StringTag(sb, indent, "MinTurn", FloatUtil.ToString(MinTurn)); + RelXml.ValueTag(sb, indent, "MaxTurn", FloatUtil.ToString(MaxTurn)); + RelXml.StringTag(sb, indent, "TurnEdgeSound", RelXml.HashString(TurnEdgeSound)); + RelXml.StringTag(sb, indent, "MinSlopeEdge", FloatUtil.ToString(MinSlopeEdge)); + RelXml.ValueTag(sb, indent, "MaxSlopeEdge", FloatUtil.ToString(MaxSlopeEdge)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); + StraightSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "StraightSound")); + MinSpeed = Xml.GetChildFloatAttribute(node, "MinSpeed", "value"); + MaxSpeed = Xml.GetChildFloatAttribute(node, "MaxSpeed", "value"); + TurnSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurnSound")); + MinTurn = Xml.GetChildFloatAttribute(node, "MinTurn", "value"); + MaxTurn = Xml.GetChildFloatAttribute(node, "MaxTurn", "value"); + TurnEdgeSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "TurnEdgeSound")); + MinSlopeEdge = Xml.GetChildFloatAttribute(node, "MinSlopeEdge", "value"); + MaxSlopeEdge = Xml.GetChildFloatAttribute(node, "MaxSlopeEdge", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk04, Unk07 }; + return new[] { StraightSound, TurnSound, TurnEdgeSound }; } } - [TC(typeof(EXP))] public class Dat151RadioTrackCategory : Dat151RelData + + [TC(typeof(EXP))] + class Dat151RadioTrackCategoryData : Dat151RelData { public int ItemCount { get; set; } - public Dat151RadioTrackCategoryItem[] Items { get; set; } + public Dat151RadioTrackCategoryDataItem[] Items { get; set; } - public Dat151RadioTrackCategory(RelFile rel) : base(rel) + public Dat151RadioTrackCategoryData(RelFile rel) : base(rel) { - Type = Dat151RelType.RadioTrackCategory; + Type = Dat151RelType.RadioTrackCategoryData; TypeID = (byte)Type; } - public Dat151RadioTrackCategory(RelData d, BinaryReader br) : base(d, br) + public Dat151RadioTrackCategoryData(RelData d, BinaryReader br) : base(d, br) { ItemCount = br.ReadInt32(); - Items = new Dat151RadioTrackCategoryItem[ItemCount]; + Items = new Dat151RadioTrackCategoryDataItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151RadioTrackCategoryItem(br); + Items[i] = new Dat151RadioTrackCategoryDataItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -15801,20 +15204,20 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - Items = XmlRel.ReadItemArray(node, "Items"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (Items?.Length ?? 0); } } [TC(typeof(EXP))] - public class Dat151RadioTrackCategoryItem : IMetaXmlItem + public class Dat151RadioTrackCategoryDataItem : IMetaXmlItem { public int Track { get; set; } public int PreDelay { get; set; } - public Dat151RadioTrackCategoryItem() + public Dat151RadioTrackCategoryDataItem() { } - public Dat151RadioTrackCategoryItem(BinaryReader br) + public Dat151RadioTrackCategoryDataItem(BinaryReader br) { Track = br.ReadInt32(); PreDelay = br.ReadInt32(); @@ -15840,78 +15243,121 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151PoliceScannerCrime : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ScannerCrimeReportCrimeSet : IMetaXmlItem { - public MetaHash ReportedBy { get; set; } - public MetaHash ReportedByPed { get; set; } - public MetaHash ReportedByCop { get; set; } - public float Unk04 { get; set; } - public MetaHash CrimeCode { get; set; } - public int Unk06 { get; set; } - public MetaHash Crime { get; set; } - public float Unk08 { get; set; } + public MetaHash SoundRef { get; set; } + public float Weight { get; set; } - public Dat151PoliceScannerCrime(RelFile rel) : base(rel) + + public Dat151ScannerCrimeReportCrimeSet() + { } + + public Dat151ScannerCrimeReportCrimeSet(BinaryReader br) { - Type = Dat151RelType.PoliceScannerCrime; + SoundRef = br.ReadUInt32(); + Weight = br.ReadSingle(); + } + + public void Write(BinaryWriter bw) + { + bw.Write(SoundRef); + bw.Write(Weight); + } + + public void WriteXml(StringBuilder sb, int indent) + { + RelXml.StringTag(sb, indent, "SoundRef", RelXml.HashString(SoundRef)); + RelXml.ValueTag(sb, indent, "Weight", FloatUtil.ToString(Weight)); + } + + public void ReadXml(XmlNode node) + { + SoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundRef")); + Weight = Xml.GetChildFloatAttribute(node, "Weight", "value"); + } + public override string ToString() + { + return SoundRef.ToString(); + } + } + + [TC(typeof(EXP))] + public class Dat151ScannerCrimeReport : Dat151RelData + { + public MetaHash GenericReportedBySoundRef { get; set; } + public MetaHash ReportedByPedSoundRef { get; set; } + public MetaHash ReportedByCopSoundRef { get; set; } + public float AcknowledgeSituationProbability { get; set; } + public MetaHash SmallCrimeSoundRef { get; set; } + public int CrimeSetCount { get; set; } + public Dat151ScannerCrimeReportCrimeSet[] CrimeSets { get; set; } + + public Dat151ScannerCrimeReport(RelFile rel) : base(rel) + { + Type = Dat151RelType.ScannerCrimeReport; TypeID = (byte)Type; } - public Dat151PoliceScannerCrime(RelData d, BinaryReader br) : base(d, br) + public Dat151ScannerCrimeReport(RelData d, BinaryReader br) : base(d, br) { - ReportedBy = br.ReadUInt32(); - ReportedByPed = br.ReadUInt32(); - ReportedByCop = br.ReadUInt32(); - Unk04 = br.ReadSingle(); - CrimeCode = br.ReadUInt32(); - Unk06 = br.ReadInt32(); - Crime = br.ReadUInt32(); - Unk08 = br.ReadSingle(); + GenericReportedBySoundRef = br.ReadUInt32(); + ReportedByPedSoundRef = br.ReadUInt32(); + ReportedByCopSoundRef = br.ReadUInt32(); + AcknowledgeSituationProbability = br.ReadSingle(); + SmallCrimeSoundRef = br.ReadUInt32(); - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + CrimeSetCount = br.ReadInt32(); + CrimeSets = new Dat151ScannerCrimeReportCrimeSet[CrimeSetCount]; + for (int i = 0; i < CrimeSetCount; i++) + { + CrimeSets[i] = new Dat151ScannerCrimeReportCrimeSet(br); + } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(ReportedBy); - bw.Write(ReportedByPed); - bw.Write(ReportedByCop); - bw.Write(Unk04); - bw.Write(CrimeCode); - bw.Write(Unk06); - bw.Write(Crime); - bw.Write(Unk08); + bw.Write(GenericReportedBySoundRef); + bw.Write(ReportedByPedSoundRef); + bw.Write(ReportedByCopSoundRef); + bw.Write(AcknowledgeSituationProbability); + bw.Write(SmallCrimeSoundRef); + + bw.Write(CrimeSetCount); + for (int i = 0; i < CrimeSetCount; i++) + { + CrimeSets[i].Write(bw); + } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "ReportedBy", RelXml.HashString(ReportedBy)); - RelXml.StringTag(sb, indent, "ReportedByPed", RelXml.HashString(ReportedByPed)); - RelXml.StringTag(sb, indent, "ReportedByCop", RelXml.HashString(ReportedByCop)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.StringTag(sb, indent, "CrimeCode", RelXml.HashString(CrimeCode)); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.StringTag(sb, indent, "Crime", RelXml.HashString(Crime)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); + RelXml.StringTag(sb, indent, "GenericReportedBySoundRef", RelXml.HashString(GenericReportedBySoundRef)); + RelXml.StringTag(sb, indent, "ReportedByPedSoundRef", RelXml.HashString(ReportedByPedSoundRef)); + RelXml.StringTag(sb, indent, "ReportedByCopSoundRef", RelXml.HashString(ReportedByCopSoundRef)); + RelXml.ValueTag(sb, indent, "AcknowledgeSituationProbability", FloatUtil.ToString(AcknowledgeSituationProbability)); + RelXml.StringTag(sb, indent, "SmallCrimeSoundRef", RelXml.HashString(SmallCrimeSoundRef)); + RelXml.WriteItemArray(sb, CrimeSets, indent, "CrimeSets"); + } public override void ReadXml(XmlNode node) { - ReportedBy = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReportedBy")); - ReportedByPed = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReportedByPed")); - ReportedByCop = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReportedByCop")); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - CrimeCode = XmlRel.GetHash(Xml.GetChildInnerText(node, "CrimeCode")); - Unk06 = Xml.GetChildIntAttribute(node, "Unk06", "value"); - Crime = XmlRel.GetHash(Xml.GetChildInnerText(node, "Crime")); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); + GenericReportedBySoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "GenericReportedBySoundRef")); + ReportedByPedSoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReportedByPedSoundRef")); + ReportedByCopSoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "ReportedByCopSoundRef")); + AcknowledgeSituationProbability = Xml.GetChildFloatAttribute(node, "AcknowledgeSituationProbability", "value"); + SmallCrimeSoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "SmallCrimeSoundRef")); + CrimeSets = XmlRel.ReadItemArray(node, "CrimeSets"); + CrimeSetCount = (CrimeSets?.Length ?? 0); + } public override MetaHash[] GetSoundHashes() { - return new[] { ReportedBy, ReportedByPed, ReportedByCop, CrimeCode, Crime }; + return new[] { GenericReportedBySoundRef, ReportedByPedSoundRef, ReportedByCopSoundRef, SmallCrimeSoundRef }; } } - [TC(typeof(EXP))] public class Dat151RaceToPedVoiceGroup : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151PedRaceToPedVoiceGroup : Dat151RelData { public FlagsUint Flags { get; set; } public MetaHash Universal { get; set; }//uni @@ -15925,49 +15371,35 @@ namespace CodeWalker.GameFiles public MetaHash Korean { get; set; }//kor public MetaHash Italian { get; set; }//ita public MetaHash Pakistani { get; set; }//pak - public int PedTypesCount { get; set; } - public MetaHash[] PedTypes { get; set; }//PedType + public int FriendGroupsCount { get; set; } + public MetaHash[] FriendGroups { get; set; }//FriendGroup - public Dat151RaceToPedVoiceGroup(RelFile rel) : base(rel) + public Dat151PedRaceToPedVoiceGroup(RelFile rel) : base(rel) { - Type = Dat151RelType.RaceToPedVoiceGroup; + Type = Dat151RelType.PedRaceToPedVoiceGroup; TypeID = (byte)Type; } - public Dat151RaceToPedVoiceGroup(RelData d, BinaryReader br) : base(d, br) + public Dat151PedRaceToPedVoiceGroup(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Universal = br.ReadUInt32();//0 + Universal = br.ReadUInt32(); White = br.ReadUInt32(); Black = br.ReadUInt32(); Chinese = br.ReadUInt32(); Latino = br.ReadUInt32(); - Arabic = br.ReadUInt32();//0 - Baltic = br.ReadUInt32();//0 - Jamaican = br.ReadUInt32();//0 + Arabic = br.ReadUInt32(); + Baltic = br.ReadUInt32(); + Jamaican = br.ReadUInt32(); Korean = br.ReadUInt32(); - Italian = br.ReadUInt32();//0 + Italian = br.ReadUInt32(); Pakistani = br.ReadUInt32(); - PedTypesCount = br.ReadInt32(); - PedTypes = new MetaHash[PedTypesCount]; - for (int i = 0; i < PedTypesCount; i++) + + FriendGroupsCount = br.ReadInt32(); + FriendGroups = new MetaHash[FriendGroupsCount]; + for (int i = 0; i < FriendGroupsCount; i++) { - PedTypes[i] = br.ReadUInt32(); + FriendGroups[i] = br.ReadUInt32(); } - - if (Universal != 0) - { } - if (Arabic != 0) - { } - if (Baltic != 0) - { } - if (Jamaican != 0) - { } - if (Italian != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -15985,10 +15417,11 @@ namespace CodeWalker.GameFiles bw.Write(Korean); bw.Write(Italian); bw.Write(Pakistani); - bw.Write(PedTypesCount); - for (int i = 0; i < PedTypesCount; i++) + + bw.Write(FriendGroupsCount); + for (int i = 0; i < FriendGroupsCount; i++) { - bw.Write(PedTypes[i]); + bw.Write(FriendGroups[i]); } } public override void WriteXml(StringBuilder sb, int indent) @@ -16005,7 +15438,7 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "Korean", RelXml.HashString(Korean)); RelXml.StringTag(sb, indent, "Italian", RelXml.HashString(Italian)); RelXml.StringTag(sb, indent, "Pakistani", RelXml.HashString(Pakistani)); - RelXml.WriteHashItemArray(sb, PedTypes, indent, "PedTypes"); + RelXml.WriteHashItemArray(sb, FriendGroups, indent, "FriendGroups"); } public override void ReadXml(XmlNode node) { @@ -16021,33 +15454,31 @@ namespace CodeWalker.GameFiles Korean = XmlRel.GetHash(Xml.GetChildInnerText(node, "Korean")); Italian = XmlRel.GetHash(Xml.GetChildInnerText(node, "Italian")); Pakistani = XmlRel.GetHash(Xml.GetChildInnerText(node, "Pakistani")); - PedTypes = XmlRel.ReadHashItemArray(node, "PedTypes"); - PedTypesCount = (PedTypes?.Length ?? 0); + FriendGroups = XmlRel.ReadHashItemArray(node, "FriendGroups"); + FriendGroupsCount = (FriendGroups?.Length ?? 0); } public override MetaHash[] GetGameHashes() { var list = new List(); list.AddRange(new[] { Universal, White, Black, Chinese, Latino, Arabic, Baltic, Jamaican, Korean, Italian, Pakistani }); - if (PedTypes != null) list.AddRange(PedTypes); + if (FriendGroups != null) list.AddRange(FriendGroups); return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151PedType : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151FriendGroup : Dat151RelData { public FlagsUint Flags { get; set; } - public Dat151PedType(RelFile rel) : base(rel) + public Dat151FriendGroup(RelFile rel) : base(rel) { - Type = Dat151RelType.PedType; + Type = Dat151RelType.FriendGroup; TypeID = (byte)Type; } - public Dat151PedType(RelData d, BinaryReader br) : base(d, br) + public Dat151FriendGroup(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -16065,61 +15496,58 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151PoliceScannerReport : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ScriptedScannerLine : Dat151RelData { public FlagsUint Flags { get; set; } - public int ReportsCount { get; set; } - public Dat151PoliceScannerReportItem[] Reports { get; set; } + public int PhrasesCount { get; set; } + public Dat151ScriptedScannerLineItem[] Phrase { get; set; } - public Dat151PoliceScannerReport(RelFile rel) : base(rel) + public Dat151ScriptedScannerLine(RelFile rel) : base(rel) { - Type = Dat151RelType.PoliceScannerReport; + Type = Dat151RelType.ScriptedScannerLine; TypeID = (byte)Type; } - public Dat151PoliceScannerReport(RelData d, BinaryReader br) : base(d, br) + public Dat151ScriptedScannerLine(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - ReportsCount = br.ReadInt32(); - Reports = new Dat151PoliceScannerReportItem[ReportsCount]; - for (int i = 0; i < ReportsCount; i++) + PhrasesCount = br.ReadInt32(); + Phrase = new Dat151ScriptedScannerLineItem[PhrasesCount]; + for (int i = 0; i < PhrasesCount; i++) { - Reports[i] = new Dat151PoliceScannerReportItem(br); + Phrase[i] = new Dat151ScriptedScannerLineItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(ReportsCount); - for (int i = 0; i < ReportsCount; i++) + bw.Write(PhrasesCount); + for (int i = 0; i < PhrasesCount; i++) { - Reports[i].Write(bw); + Phrase[i].Write(bw); } } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.WriteItemArray(sb, Reports, indent, "Reports"); + RelXml.WriteItemArray(sb, Phrase, indent, "Phrase"); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Reports = XmlRel.ReadItemArray(node, "Reports"); - ReportsCount = (Reports?.Length ?? 0); + Phrase = XmlRel.ReadItemArray(node, "Phrase"); + PhrasesCount = (Phrase?.Length ?? 0); } public override MetaHash[] GetSoundHashes() { var list = new List(); - if (Reports != null) + if (Phrase != null) { - foreach (var item in Reports) + foreach (var item in Phrase) { - list.Add(item.Unk1); + list.Add(item.SoundRef); } } return list.ToArray(); @@ -16127,168 +15555,172 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public class Dat151PoliceScannerReportItem : IMetaXmlItem + public class Dat151ScriptedScannerLineItem : IMetaXmlItem { - public MetaHash Unk1 { get; set; } - public short Unk2 { get; set; } - public short Unk3 { get; set; } + public MetaHash SoundRef { get; set; } + public short Slot { get; set; } + public short PostDelay { get; set; } - public Dat151PoliceScannerReportItem() + public Dat151ScriptedScannerLineItem() { } - public Dat151PoliceScannerReportItem(BinaryReader br) + public Dat151ScriptedScannerLineItem(BinaryReader br) { - Unk1 = br.ReadUInt32(); - Unk2 = br.ReadInt16(); - Unk3 = br.ReadInt16(); + SoundRef = br.ReadUInt32(); + Slot = br.ReadInt16(); + PostDelay = br.ReadInt16(); } public void Write(BinaryWriter bw) { - bw.Write(Unk1); - bw.Write(Unk2); - bw.Write(Unk3); + bw.Write(SoundRef); + bw.Write(Slot); + bw.Write(PostDelay); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk1", RelXml.HashString(Unk1)); - RelXml.ValueTag(sb, indent, "Unk2", Unk2.ToString()); - RelXml.ValueTag(sb, indent, "Unk3", Unk3.ToString()); + RelXml.StringTag(sb, indent, "SoundRef", RelXml.HashString(SoundRef)); + RelXml.ValueTag(sb, indent, "Slot", Slot.ToString()); + RelXml.ValueTag(sb, indent, "PostDelay", PostDelay.ToString()); } public void ReadXml(XmlNode node) { - Unk1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk1")); - Unk2 = (short)Xml.GetChildIntAttribute(node, "Unk2", "value"); - Unk3 = (short)Xml.GetChildIntAttribute(node, "Unk3", "value"); + SoundRef = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundRef")); + Slot = (short)Xml.GetChildIntAttribute(node, "Slot", "value"); + PostDelay = (short)Xml.GetChildIntAttribute(node, "PostDelay", "value"); } public override string ToString() { - return Unk1.ToString() + ": " + Unk2.ToString() + ", " + Unk3.ToString(); + return SoundRef.ToString() + ": " + Slot.ToString() + ", " + PostDelay.ToString(); } } - - [TC(typeof(EXP))] public class Dat151PoliceScannerLocation : Dat151RelData + [TC(typeof(EXP))] + public class Dat151ScannerSpecificLocationSounds : IMetaXmlItem { - public MetaHash Unk01 { get; set; }//0 - public MetaHash Unk02 { get; set; }//0 - public MetaHash Unk03 { get; set; }//0 - public Vector3 Position { get; set; } - public MetaHash Unk04 { get; set; }//0 - public float Radius { get; set; } - public float Unk06 { get; set; } - public int Unk07 { get; set; } - public MetaHash Unk08 { get; set; } - public MetaHash Location { get; set; } - public MetaHash Unk10 { get; set; }//0 - public MetaHash Unk11 { get; set; }//0 - public MetaHash Unk12 { get; set; }//0 + public MetaHash Sound { get; set; } - public Dat151PoliceScannerLocation(RelFile rel) : base(rel) + public Dat151ScannerSpecificLocationSounds() + { } + + + public Dat151ScannerSpecificLocationSounds(BinaryReader br) { - Type = Dat151RelType.PoliceScannerLocation; + Sound = br.ReadUInt32(); + } + + public void Write(BinaryWriter bw) + { + bw.Write(Sound); + } + + public void WriteXml(StringBuilder sb, int indent) + { + RelXml.StringTag(sb, indent, "Sound", RelXml.HashString(Sound)); + } + + public void ReadXml(XmlNode node) + { + Sound = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sound")); + } + public override string ToString() + { + return Sound.ToString(); + } + + } + + [TC(typeof(EXP))] + public class Dat151ScannerSpecificLocation : Dat151RelData + { + public MetaHash padding00 { get; set; } + public MetaHash padding01 { get; set; } + public MetaHash padding02 { get; set; } + public Vector3 Position { get; set; } + public MetaHash padding03 { get; set; } + public float Radius { get; set; } + public float ProbOfPlaying { get; set; } + public int NumSounds { get; set; } + public MetaHash Sound { get; set; } + public MetaHash Location { get; set; } + public MetaHash padding04 { get; set; } + public MetaHash padding05 { get; set; } + public MetaHash padding06 { get; set; } + + public Dat151ScannerSpecificLocation(RelFile rel) : base(rel) + { + Type = Dat151RelType.ScannerSpecificLocation; TypeID = (byte)Type; } - public Dat151PoliceScannerLocation(RelData d, BinaryReader br) : base(d, br) + public Dat151ScannerSpecificLocation(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32();//0 - Unk02 = br.ReadUInt32();//0 - Unk03 = br.ReadUInt32();//0 + padding00 = br.ReadUInt32(); + padding01 = br.ReadUInt32(); + padding02 = br.ReadUInt32(); Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Unk04 = br.ReadUInt32();//0 + padding03 = br.ReadUInt32(); Radius = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadUInt32(); + ProbOfPlaying = br.ReadSingle(); + NumSounds = br.ReadInt32(); + Sound = br.ReadUInt32(); Location = br.ReadUInt32(); - Unk10 = br.ReadUInt32();//0 - Unk11 = br.ReadUInt32();//0 - Unk12 = br.ReadUInt32();//0 - - if (Unk01 != 0) - { } - if (Unk02 != 0) - { } - if (Unk03 != 0) - { } - if (Unk04 != 0) - { } - if (Unk10 != 0) - { } - if (Unk11 != 0) - { } - if (Unk12 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + padding04 = br.ReadUInt32(); + padding05 = br.ReadUInt32(); + padding06 = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); + bw.Write(padding00); + bw.Write(padding01); + bw.Write(padding02); bw.Write(Position.X); bw.Write(Position.Y); bw.Write(Position.Z); - bw.Write(Unk04); + bw.Write(padding03); bw.Write(Radius); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); + bw.Write(ProbOfPlaying); + bw.Write(NumSounds); + bw.Write(Sound); bw.Write(Location); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); + bw.Write(padding04); + bw.Write(padding05); + bw.Write(padding06); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); RelXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); RelXml.ValueTag(sb, indent, "Radius", FloatUtil.ToString(Radius)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); + RelXml.ValueTag(sb, indent, "ProbOfPlaying", FloatUtil.ToString(ProbOfPlaying)); + RelXml.ValueTag(sb, indent, "NumSounds", NumSounds.ToString()); + RelXml.StringTag(sb, indent, "Sound", RelXml.HashString(Sound)); RelXml.StringTag(sb, indent, "Location", RelXml.HashString(Location)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); Position = Xml.GetChildVector3Attributes(node, "Position"); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); Radius = Xml.GetChildFloatAttribute(node, "Radius", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); + ProbOfPlaying = Xml.GetChildFloatAttribute(node, "ProbOfPlaying", "value"); + NumSounds = Xml.GetChildIntAttribute(node, "NumSounds", "value"); + Sound = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sound")); Location = XmlRel.GetHash(Xml.GetChildInnerText(node, "Location")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk08, Location }; + return new[] { Sound, Location }; } } - [TC(typeof(EXP))] public class Dat151PoliceScannerLocationList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ScannerSpecificLocationList : Dat151RelData { public int LocationsCount { get; set; } public MetaHash[] Locations { get; set; } - public Dat151PoliceScannerLocationList(RelFile rel) : base(rel) + public Dat151ScannerSpecificLocationList(RelFile rel) : base(rel) { - Type = Dat151RelType.PoliceScannerLocationList; + Type = Dat151RelType.ScannerSpecificLocationList; TypeID = (byte)Type; } - public Dat151PoliceScannerLocationList(RelData d, BinaryReader br) : base(d, br) + public Dat151ScannerSpecificLocationList(RelData d, BinaryReader br) : base(d, br) { LocationsCount = br.ReadInt32(); Locations = new MetaHash[LocationsCount]; @@ -16296,10 +15728,6 @@ namespace CodeWalker.GameFiles { Locations[i] = br.ReadUInt32(); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -16325,65 +15753,65 @@ namespace CodeWalker.GameFiles return Locations; } } - [TC(typeof(EXP))] public class Dat151AmbienceSlotMapItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151AmbientSlotMapItem : IMetaXmlItem { public MetaHash WaveSlot { get; set; }//eg. amb_stream_bird_01 (from audioconfig) - public MetaHash BankName { get; set; }//eg. streamed_birds (also in AmbienceBankMap) - public int Unk3 { get; set; } + public MetaHash BankName { get; set; }//eg. streamed_birds (also in AmbientBankMap) + public int Priority { get; set; } - public Dat151AmbienceSlotMapItem() + public Dat151AmbientSlotMapItem() { } - public Dat151AmbienceSlotMapItem(BinaryReader br) + public Dat151AmbientSlotMapItem(BinaryReader br) { WaveSlot = br.ReadUInt32(); BankName = br.ReadUInt32(); - Unk3 = br.ReadInt32(); + Priority = br.ReadInt32(); } public void Write(BinaryWriter bw) { bw.Write(WaveSlot); bw.Write(BankName); - bw.Write(Unk3); + bw.Write(Priority); } public void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "WaveSlot", RelXml.HashString(WaveSlot)); RelXml.StringTag(sb, indent, "BankName", RelXml.HashString(BankName)); - RelXml.ValueTag(sb, indent, "Unk3", Unk3.ToString()); + RelXml.ValueTag(sb, indent, "Priority", Priority.ToString()); } public void ReadXml(XmlNode node) { WaveSlot = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaveSlot")); BankName = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankName")); - Unk3 = Xml.GetChildIntAttribute(node, "Unk3", "value"); + Priority = Xml.GetChildIntAttribute(node, "Priority", "value"); } public override string ToString() { - return WaveSlot.ToString() + ", " + BankName.ToString() + ", " + Unk3.ToString(); + return WaveSlot.ToString() + ", " + BankName.ToString() + ", " + Priority.ToString(); } } - [TC(typeof(EXP))] public class Dat151AmbienceSlotMap : Dat151RelData //contains eg amb_stream_bird_01 + + [TC(typeof(EXP))] + public class Dat151AmbientSlotMap : Dat151RelData { public int AmbienceSlotsCount { get; set; } - public Dat151AmbienceSlotMapItem[] AmbienceSlots { get; set; } + public Dat151AmbientSlotMapItem[] AmbienceSlots { get; set; } - public Dat151AmbienceSlotMap(RelFile rel) : base(rel) + public Dat151AmbientSlotMap(RelFile rel) : base(rel) { - Type = Dat151RelType.AmbienceSlotMap; + Type = Dat151RelType.AmbientSlotMap; TypeID = (byte)Type; } - public Dat151AmbienceSlotMap(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbientSlotMap(RelData d, BinaryReader br) : base(d, br) { AmbienceSlotsCount = br.ReadInt32(); - AmbienceSlots = new Dat151AmbienceSlotMapItem[AmbienceSlotsCount]; + AmbienceSlots = new Dat151AmbientSlotMapItem[AmbienceSlotsCount]; for (int i = 0; i < AmbienceSlotsCount; i++) { - AmbienceSlots[i] = new Dat151AmbienceSlotMapItem(br); + AmbienceSlots[i] = new Dat151AmbientSlotMapItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -16401,32 +15829,30 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - AmbienceSlots = XmlRel.ReadItemArray(node, "AmbienceSlots"); + AmbienceSlots = XmlRel.ReadItemArray(node, "AmbienceSlots"); AmbienceSlotsCount = (AmbienceSlots?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151AmbienceBankMap : Dat151RelData //ambience_bank_map_autogenerated + + [TC(typeof(EXP))] + public class Dat151AmbientBankMap : Dat151RelData { public int AmbienceBanksCount { get; set; } - public Dat151AmbienceBankMapItem[] AmbienceBanks { get; set; }//AwcName, BankName + public Dat151AmbientBankMapItem[] AmbienceBanks { get; set; } - public Dat151AmbienceBankMap(RelFile rel) : base(rel) + public Dat151AmbientBankMap(RelFile rel) : base(rel) { - Type = Dat151RelType.AmbienceBankMap; + Type = Dat151RelType.AmbientBankMap; TypeID = (byte)Type; } - public Dat151AmbienceBankMap(RelData d, BinaryReader br) : base(d, br) + public Dat151AmbientBankMap(RelData d, BinaryReader br) : base(d, br) { AmbienceBanksCount = br.ReadInt32(); - AmbienceBanks = new Dat151AmbienceBankMapItem[AmbienceBanksCount]; + AmbienceBanks = new Dat151AmbientBankMapItem[AmbienceBanksCount]; for (int i = 0; i < AmbienceBanksCount; i++) { - AmbienceBanks[i] = new Dat151AmbienceBankMapItem(br); + AmbienceBanks[i] = new Dat151AmbientBankMapItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -16444,17 +15870,18 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - AmbienceBanks = XmlRel.ReadItemArray(node, "AmbienceBanks"); + AmbienceBanks = XmlRel.ReadItemArray(node, "AmbienceBanks"); AmbienceBanksCount = (AmbienceBanks?.Length ?? 0); } } - [TC(typeof(EXP))] public struct Dat151AmbienceBankMapItem : IMetaXmlItem + [TC(typeof(EXP))] + public struct Dat151AmbientBankMapItem : IMetaXmlItem { public MetaHash AudioBank { get; set; } public MetaHash BankName { get; set; } - public Dat151AmbienceBankMapItem(BinaryReader br) + public Dat151AmbientBankMapItem(BinaryReader br) { AudioBank = br.ReadUInt32(); BankName = br.ReadUInt32(); @@ -16480,227 +15907,208 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat151AmbientZoneParams : Dat151RelData + [TC(typeof(EXP))] + public class Dat151EnvironmentRule : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Unk01 { get; set; }//0 - public float Unk02 { get; set; } - public MetaHash Unk03 { get; set; }//0 - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public MetaHash Unk08 { get; set; }//0 - public MetaHash Unk09 { get; set; }//0 - public MetaHash Unk10 { get; set; }//0 + public float ReverbSmall { get; set; } + public float ReverbMedium { get; set; } + public float ReverbLarge { get; set; } + public float ReverbDamp { get; set; } + public float EchoDelay { get; set; } + public float EchoDelayVariance { get; set; } + public float EchoAttenuation { get; set; } + public int EchoNumber { get; set; } + public uint EchoSoundList { get; set; } + public float BaseEchoVolumeModifier { get; set; } - public Dat151AmbientZoneParams(RelFile rel) : base(rel) + public Dat151EnvironmentRule(RelFile rel) : base(rel) { - Type = Dat151RelType.AmbientZoneParams; + Type = Dat151RelType.EnvironmentRule; TypeID = (byte)Type; } - public Dat151AmbientZoneParams(RelData d, BinaryReader br) : base(d, br) + public Dat151EnvironmentRule(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadUInt32();//0 - Unk02 = br.ReadSingle(); - Unk03 = br.ReadUInt32();//0 - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadUInt32();//0 - Unk10 = br.ReadUInt32();//0 - - if (Unk01 != 0) - { } - if (Unk03 != 0) - { } - if (Unk08 != 0) - { } - if (Unk09 != 0) - { } - if (Unk10 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + ReverbSmall = br.ReadSingle(); + ReverbMedium = br.ReadSingle(); + ReverbLarge = br.ReadSingle(); + ReverbDamp = br.ReadSingle(); + EchoDelay = br.ReadSingle(); + EchoDelayVariance = br.ReadSingle(); + EchoAttenuation = br.ReadSingle(); + EchoNumber = br.ReadInt32(); + EchoSoundList = br.ReadUInt32(); + BaseEchoVolumeModifier = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); + bw.Write(ReverbSmall); + bw.Write(ReverbMedium); + bw.Write(ReverbLarge); + bw.Write(ReverbDamp); + bw.Write(EchoDelay); + bw.Write(EchoDelayVariance); + bw.Write(EchoAttenuation); + bw.Write(EchoNumber); + bw.Write(EchoSoundList); + bw.Write(BaseEchoVolumeModifier); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); + RelXml.ValueTag(sb, indent, "ReverbSmall", FloatUtil.ToString(ReverbSmall)); + RelXml.ValueTag(sb, indent, "ReverbMedium", FloatUtil.ToString(ReverbMedium)); + RelXml.ValueTag(sb, indent, "ReverbLarge", FloatUtil.ToString(ReverbLarge)); + RelXml.ValueTag(sb, indent, "ReverbDamp", FloatUtil.ToString(ReverbDamp)); + RelXml.ValueTag(sb, indent, "EchoDelay", FloatUtil.ToString(EchoDelay)); + RelXml.ValueTag(sb, indent, "EchoDelayVariance", FloatUtil.ToString(EchoDelayVariance)); + RelXml.ValueTag(sb, indent, "EchoAttenuation", FloatUtil.ToString(EchoAttenuation)); + RelXml.ValueTag(sb, indent, "EchoNumber", EchoNumber.ToString()); + RelXml.ValueTag(sb, indent, "EchoSoundList", EchoSoundList.ToString()); + RelXml.ValueTag(sb, indent, "BaseEchoVolumeModifier", FloatUtil.ToString(BaseEchoVolumeModifier)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); + ReverbSmall = Xml.GetChildFloatAttribute(node, "ReverbSmall", "value"); + ReverbMedium = Xml.GetChildFloatAttribute(node, "ReverbMedium", "value"); + ReverbLarge = Xml.GetChildFloatAttribute(node, "ReverbLarge", "value"); + ReverbDamp = Xml.GetChildFloatAttribute(node, "ReverbDamp", "value"); + EchoDelay = Xml.GetChildFloatAttribute(node, "EchoDelay", "value"); + EchoDelayVariance = Xml.GetChildFloatAttribute(node, "EchoDelayVariance", "value"); + EchoAttenuation = Xml.GetChildFloatAttribute(node, "EchoAttenuation", "value"); + EchoNumber = Xml.GetChildIntAttribute(node, "EchoNumber", "value"); + EchoSoundList = Xml.GetChildUIntAttribute(node, "EchoSoundList", "value"); + BaseEchoVolumeModifier = Xml.GetChildFloatAttribute(node, "BaseEchoVolumeModifier", "value"); } } - [TC(typeof(EXP))] public class Dat151InteriorRoomParams : Dat151RelData - { - public float Unk01 { get; set; } - public float Unk02 { get; set; } - public int Unk03 { get; set; } - public int Unk04 { get; set; } - public float Unk05 { get; set; } - public Dat151InteriorRoomParams(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151InteriorWeaponMetrics : Dat151RelData + { + public float Wetness { get; set; } + public float Visability { get; set; } + public uint LPFCutoff { get; set; } + public uint PreDelay { get; set; } + public float Hold { get; set; } + + public Dat151InteriorWeaponMetrics(RelFile rel) : base(rel) { - Type = Dat151RelType.InteriorRoomParams; + Type = Dat151RelType.InteriorWeaponMetrics; TypeID = (byte)Type; } - public Dat151InteriorRoomParams(RelData d, BinaryReader br) : base(d, br) + public Dat151InteriorWeaponMetrics(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadSingle(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Wetness = br.ReadSingle(); + Visability = br.ReadSingle(); + LPFCutoff = br.ReadUInt32(); + PreDelay = br.ReadUInt32(); + Hold = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); + bw.Write(Wetness); + bw.Write(Visability); + bw.Write(LPFCutoff); + bw.Write(PreDelay); + bw.Write(Hold); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); + RelXml.ValueTag(sb, indent, "Wetness", FloatUtil.ToString(Wetness)); + RelXml.ValueTag(sb, indent, "Visability", FloatUtil.ToString(Visability)); + RelXml.ValueTag(sb, indent, "LPFCutoff", LPFCutoff.ToString()); + RelXml.ValueTag(sb, indent, "PreDelay", PreDelay.ToString()); + RelXml.ValueTag(sb, indent, "Hold", FloatUtil.ToString(Hold)); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); + Wetness = Xml.GetChildFloatAttribute(node, "Wetness", "value"); + Visability = Xml.GetChildFloatAttribute(node, "Visability", "value"); + LPFCutoff = Xml.GetChildUIntAttribute(node, "LPFCutoff", "value"); + PreDelay = Xml.GetChildUIntAttribute(node, "PreDelay", "value"); + Hold = Xml.GetChildFloatAttribute(node, "Hold", "value"); } } - [TC(typeof(EXP))] public class Dat151DoorParams : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151DoorTuningParams : Dat151RelData { public FlagsUint Flags { get; set; } - public float Unk01 { get; set; } - public MetaHash Unk02 { get; set; }//0 - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public int Unk08 { get; set; } + public float OpenThresh { get; set; } + public float HeadingThresh { get; set; } + public float ClosedThresh { get; set; } + public float SpeedThresh { get; set; } + public float SpeedScale { get; set; } + public float HeadingDeltaThreshold { get; set; } + public float AngularVelocityThreshold { get; set; } + public int DoorType { get; set; } - public Dat151DoorParams(RelFile rel) : base(rel) + public Dat151DoorTuningParams(RelFile rel) : base(rel) { - Type = Dat151RelType.DoorParams; + Type = Dat151RelType.DoorTuningParams; TypeID = (byte)Type; } - public Dat151DoorParams(RelData d, BinaryReader br) : base(d, br) + public Dat151DoorTuningParams(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadSingle(); - Unk02 = br.ReadUInt32();//0 - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadInt32(); - - if (Unk02 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + OpenThresh = br.ReadSingle(); + HeadingThresh = br.ReadSingle(); + ClosedThresh = br.ReadSingle(); + SpeedThresh = br.ReadSingle(); + SpeedScale = br.ReadSingle(); + HeadingDeltaThreshold = br.ReadSingle(); + AngularVelocityThreshold = br.ReadSingle(); + DoorType = br.ReadInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); + bw.Write(OpenThresh); + bw.Write(HeadingThresh); + bw.Write(ClosedThresh); + bw.Write(SpeedThresh); + bw.Write(SpeedScale); + bw.Write(HeadingDeltaThreshold); + bw.Write(AngularVelocityThreshold); + bw.Write(DoorType); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); + RelXml.ValueTag(sb, indent, "OpenThresh", FloatUtil.ToString(OpenThresh)); + RelXml.StringTag(sb, indent, "HeadingThresh", FloatUtil.ToString(HeadingThresh)); + RelXml.ValueTag(sb, indent, "ClosedThresh", FloatUtil.ToString(ClosedThresh)); + RelXml.ValueTag(sb, indent, "SpeedThresh", FloatUtil.ToString(SpeedThresh)); + RelXml.ValueTag(sb, indent, "SpeedScale", FloatUtil.ToString(SpeedScale)); + RelXml.ValueTag(sb, indent, "HeadingDeltaThreshold", FloatUtil.ToString(HeadingDeltaThreshold)); + RelXml.ValueTag(sb, indent, "AngularVelocityThreshold", FloatUtil.ToString(AngularVelocityThreshold)); + RelXml.ValueTag(sb, indent, "DoorType", DoorType.ToString()); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); + OpenThresh = Xml.GetChildFloatAttribute(node, "OpenThresh", "value"); + HeadingThresh = Xml.GetChildFloatAttribute(node, "HeadingThresh", "value"); + ClosedThresh = Xml.GetChildFloatAttribute(node, "ClosedThresh", "value"); + SpeedThresh = Xml.GetChildFloatAttribute(node, "SpeedThresh", "value"); + SpeedScale = Xml.GetChildFloatAttribute(node, "SpeedScale", "value"); + HeadingDeltaThreshold = Xml.GetChildFloatAttribute(node, "HeadingDeltaThreshold", "value"); + AngularVelocityThreshold = Xml.GetChildFloatAttribute(node, "AngularVelocityThreshold", "value"); + DoorType = Xml.GetChildIntAttribute(node, "DoorType", "value"); } } - [TC(typeof(EXP))] public class Dat151Climbing : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ClimbingAudioSettings : Dat151RelData { public MetaHash Launch { get; set; } public MetaHash Foot { get; set; } @@ -16708,22 +16116,18 @@ namespace CodeWalker.GameFiles public MetaHash Scrape { get; set; } public MetaHash Hand { get; set; } - public Dat151Climbing(RelFile rel) : base(rel) + public Dat151ClimbingAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Climbing; + Type = Dat151RelType.ClimbingAudioSettings; TypeID = (byte)Type; } - public Dat151Climbing(RelData d, BinaryReader br) : base(d, br) + public Dat151ClimbingAudioSettings(RelData d, BinaryReader br) : base(d, br) { Launch = br.ReadUInt32(); Foot = br.ReadUInt32(); Knee = br.ReadUInt32(); Scrape = br.ReadUInt32(); Hand = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -16756,105 +16160,107 @@ namespace CodeWalker.GameFiles return new[] { Launch, Foot, Knee, Scrape, Hand }; } } - [TC(typeof(EXP))] public class Dat151WeatherType : Dat151RelData - { - public float Unk01 { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Scene { get; set; } - public MetaHash Unk08 { get; set; } - public int ItemCount { get; set; } - public MetaHash[] Items { get; set; } - public Dat151WeatherType(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151WeatherAudioSettings : Dat151RelData + { + public float Strength { get; set; } + public float Blustery { get; set; } + public float Temperature { get; set; } + public float TimeOfDayAffectsTemperature { get; set; } + public float WhistleVolumeOffset { get; set; } + public MetaHash WindGust { get; set; } + public MetaHash AudioScene { get; set; } + public MetaHash WindGustEnd { get; set; } + public int WindSoundsCount { get; set; } + public MetaHash[] WindSounds { get; set; } + + public Dat151WeatherAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.WeatherType; + Type = Dat151RelType.WeatherAudioSettings; TypeID = (byte)Type; } - public Dat151WeatherType(RelData d, BinaryReader br) : base(d, br) + public Dat151WeatherAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadSingle(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadUInt32(); - Scene = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - ItemCount = br.ReadInt32(); - Items = new MetaHash[ItemCount]; - for (int i = 0; i < ItemCount; i++) - { - Items[i] = br.ReadUInt32(); - } + Strength = br.ReadSingle(); + Blustery = br.ReadSingle(); + Temperature = br.ReadSingle(); + TimeOfDayAffectsTemperature = br.ReadSingle(); + WhistleVolumeOffset = br.ReadSingle(); + WindGust = br.ReadUInt32(); + AudioScene = br.ReadUInt32(); + WindGustEnd = br.ReadUInt32(); - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + WindSoundsCount = br.ReadInt32(); + WindSounds = new MetaHash[WindSoundsCount]; + for (int i = 0; i < WindSoundsCount; i++) + { + WindSounds[i] = br.ReadUInt32(); + } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Scene); - bw.Write(Unk08); - bw.Write(ItemCount); - for (int i = 0; i < ItemCount; i++) + bw.Write(Strength); + bw.Write(Blustery); + bw.Write(Temperature); + bw.Write(TimeOfDayAffectsTemperature); + bw.Write(WhistleVolumeOffset); + bw.Write(WindGust); + bw.Write(AudioScene); + bw.Write(WindGustEnd); + + bw.Write(WindSoundsCount); + for (int i = 0; i < WindSoundsCount; i++) { - bw.Write(Items[i]); + bw.Write(WindSounds[i]); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Scene", RelXml.HashString(Scene)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.WriteHashItemArray(sb, Items, indent, "Items"); + RelXml.ValueTag(sb, indent, "Strength", FloatUtil.ToString(Strength)); + RelXml.ValueTag(sb, indent, "Blustery", FloatUtil.ToString(Blustery)); + RelXml.ValueTag(sb, indent, "Temperature", FloatUtil.ToString(Temperature)); + RelXml.ValueTag(sb, indent, "TimeOfDayAffectsTemperature", FloatUtil.ToString(TimeOfDayAffectsTemperature)); + RelXml.ValueTag(sb, indent, "WhistleVolumeOffset", FloatUtil.ToString(WhistleVolumeOffset)); + RelXml.StringTag(sb, indent, "WindGust", RelXml.HashString(WindGust)); + RelXml.StringTag(sb, indent, "AudioScene", RelXml.HashString(AudioScene)); + RelXml.StringTag(sb, indent, "WindGustEnd", RelXml.HashString(WindGustEnd)); + RelXml.WriteHashItemArray(sb, WindSounds, indent, "WindSounds"); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Scene = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scene")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Items = XmlRel.ReadHashItemArray(node, "Items"); - ItemCount = (Items?.Length ?? 0); + Strength = Xml.GetChildFloatAttribute(node, "Strength", "value"); + Blustery = Xml.GetChildFloatAttribute(node, "Blustery", "value"); + Temperature = Xml.GetChildFloatAttribute(node, "Temperature", "value"); + TimeOfDayAffectsTemperature = Xml.GetChildFloatAttribute(node, "TimeOfDayAffectsTemperature", "value"); + WhistleVolumeOffset = Xml.GetChildFloatAttribute(node, "WhistleVolumeOffset", "value"); + WindGust = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindGust")); + AudioScene = XmlRel.GetHash(Xml.GetChildInnerText(node, "AudioScene")); + WindGustEnd = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindGustEnd")); + WindSounds = XmlRel.ReadHashItemArray(node, "WindSounds"); + WindSoundsCount = (WindSounds?.Length ?? 0); } public override MetaHash[] GetMixerHashes() { - return new[] { Scene }; + return new[] { AudioScene }; } public override MetaHash[] GetSoundHashes() { var list = new List(); - list.Add(Unk06); - list.Add(Unk08); - if (Items != null) + list.Add(WindGust); + list.Add(WindGustEnd); + if (WindSounds != null) { - list.AddRange(Items); + list.AddRange(WindSounds); } return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151StemMix : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151StemMix : Dat151RelData { public short Stem1Volume { get; set; } public short Stem2Volume { get; set; } @@ -16880,10 +16286,6 @@ namespace CodeWalker.GameFiles Stem6Volume = br.ReadInt16(); Stem7Volume = br.ReadInt16(); Stem8Volume = br.ReadInt16(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -16921,407 +16323,432 @@ namespace CodeWalker.GameFiles Stem8Volume = (short)Xml.GetChildIntAttribute(node, "Stem8Volume", "value"); } } - [TC(typeof(EXP))] public class Dat151MusicBeat : Dat151RelData - { - public ushort Unk01 { get; set; } - public Dat151MusicBeat(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151BeatConstraint : Dat151RelData + { + public ushort ValidSixteenths { get; set; } + + public Dat151BeatConstraint(RelFile rel) : base(rel) { - Type = Dat151RelType.MusicBeat; + Type = Dat151RelType.BeatConstraint; TypeID = (byte)Type; } - public Dat151MusicBeat(RelData d, BinaryReader br) : base(d, br) + public Dat151BeatConstraint(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt16(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + ValidSixteenths = br.ReadUInt16(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); + bw.Write(ValidSixteenths); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); + RelXml.ValueTag(sb, indent, "ValidSixteenths", ValidSixteenths.ToString()); } public override void ReadXml(XmlNode node) { - Unk01 = (ushort)Xml.GetChildUIntAttribute(node, "Unk01", "value"); + ValidSixteenths = (ushort)Xml.GetChildUIntAttribute(node, "ValidSixteenths", "value"); } } - [TC(typeof(EXP))] public class Dat151MusicBar : Dat151RelData - { - public int Unk01 { get; set; } //beat count? - public int Unk02 { get; set; } - public Dat151MusicBar(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151BarConstraint : Dat151RelData + { + public int PatternLength { get; set; } + public int ValidBar { get; set; } + + public Dat151BarConstraint(RelFile rel) : base(rel) { - Type = Dat151RelType.MusicBar; + Type = Dat151RelType.BarConstraint; TypeID = (byte)Type; } - public Dat151MusicBar(RelData d, BinaryReader br) : base(d, br) + public Dat151BarConstraint(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + PatternLength = br.ReadInt32(); + ValidBar = br.ReadInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); + bw.Write(PatternLength); + bw.Write(ValidBar); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); + RelXml.ValueTag(sb, indent, "PatternLength", PatternLength.ToString()); + RelXml.ValueTag(sb, indent, "ValidBar", ValidBar.ToString()); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); + PatternLength = Xml.GetChildIntAttribute(node, "PatternLength", "value"); + ValidBar = Xml.GetChildIntAttribute(node, "ValidBar", "value"); } } - [TC(typeof(EXP))] public class Dat151DependentAmbience : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151DirectionalAmbience : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash ChildSound1 { get; set; } - public MetaHash ChildSound2 { get; set; } - public MetaHash ChildSound3 { get; set; } - public MetaHash ChildSound4 { get; set; } - public float Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; } - public MetaHash Unk09 { get; set; } - public MetaHash Unk10 { get; set; } - public MetaHash Unk11 { get; set; } - public MetaHash Unk12 { get; set; } - public MetaHash Unk13 { get; set; } - public float Unk14 { get; set; } - public MetaHash Unk15 { get; set; } - public MetaHash Unk16 { get; set; } - public MetaHash Unk17 { get; set; } - public float Unk18 { get; set; } + public MetaHash SoundNorth { get; set; } + public MetaHash SoundEast { get; set; } + public MetaHash SoundSouth { get; set; } + public MetaHash SoundWest { get; set; } + public float VolumeSmoothing { get; set; } + public MetaHash TimeToVolume { get; set; } + public MetaHash OcclusionToVol { get; set; } + public MetaHash HeightToCutOff { get; set; } + public MetaHash OcclusionToCutOff { get; set; } + public MetaHash BuiltUpFactorToVol { get; set; } + public MetaHash BuildingDensityToVol { get; set; } + public MetaHash TreeDensityToVol { get; set; } + public MetaHash WaterFactorToVol { get; set; } + public float InstanceVolumeScale { get; set; } + public MetaHash HeightAboveBlanketToVol { get; set; } + public MetaHash HighwayFactorToVol { get; set; } + public MetaHash VehicleCountToVol { get; set; } + public float MaxDistanceOutToSea { get; set; } - public Dat151DependentAmbience(RelFile rel) : base(rel) + public Dat151DirectionalAmbience(RelFile rel) : base(rel) { - Type = Dat151RelType.DependentAmbience; + Type = Dat151RelType.DirectionalAmbience; TypeID = (byte)Type; } - public Dat151DependentAmbience(RelData d, BinaryReader br) : base(d, br) + public Dat151DirectionalAmbience(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - ChildSound1 = br.ReadUInt32(); - ChildSound2 = br.ReadUInt32(); - ChildSound3 = br.ReadUInt32(); - ChildSound4 = br.ReadUInt32(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadUInt32(); - Unk11 = br.ReadUInt32(); - Unk12 = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadUInt32(); - Unk16 = br.ReadUInt32(); - Unk17 = br.ReadUInt32(); - Unk18 = br.ReadSingle(); - - if (ChildSound2 != 0) - { } - if (ChildSound3 != 0) - { } - if (ChildSound4 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + SoundNorth = br.ReadUInt32(); + SoundEast = br.ReadUInt32(); + SoundSouth = br.ReadUInt32(); + SoundWest = br.ReadUInt32(); + VolumeSmoothing = br.ReadSingle(); + TimeToVolume = br.ReadUInt32(); + OcclusionToVol = br.ReadUInt32(); + HeightToCutOff = br.ReadUInt32(); + OcclusionToCutOff = br.ReadUInt32(); + BuiltUpFactorToVol = br.ReadUInt32(); + BuildingDensityToVol = br.ReadUInt32(); + TreeDensityToVol = br.ReadUInt32(); + WaterFactorToVol = br.ReadUInt32(); + InstanceVolumeScale = br.ReadSingle(); + HeightAboveBlanketToVol = br.ReadUInt32(); + HighwayFactorToVol = br.ReadUInt32(); + VehicleCountToVol = br.ReadUInt32(); + MaxDistanceOutToSea = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(ChildSound1); - bw.Write(ChildSound2); - bw.Write(ChildSound3); - bw.Write(ChildSound4); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); + bw.Write(SoundNorth); + bw.Write(SoundEast); + bw.Write(SoundSouth); + bw.Write(SoundWest); + bw.Write(VolumeSmoothing); + bw.Write(TimeToVolume); + bw.Write(OcclusionToVol); + bw.Write(HeightToCutOff); + bw.Write(OcclusionToCutOff); + bw.Write(BuiltUpFactorToVol); + bw.Write(BuildingDensityToVol); + bw.Write(TreeDensityToVol); + bw.Write(WaterFactorToVol); + bw.Write(InstanceVolumeScale); + bw.Write(HeightAboveBlanketToVol); + bw.Write(HighwayFactorToVol); + bw.Write(VehicleCountToVol); + bw.Write(MaxDistanceOutToSea); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "ChildSound1", RelXml.HashString(ChildSound1)); - RelXml.StringTag(sb, indent, "ChildSound2", RelXml.HashString(ChildSound2)); - RelXml.StringTag(sb, indent, "ChildSound3", RelXml.HashString(ChildSound3)); - RelXml.StringTag(sb, indent, "ChildSound4", RelXml.HashString(ChildSound4)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.ValueTag(sb, indent, "Unk18", FloatUtil.ToString(Unk18)); + RelXml.StringTag(sb, indent, "SoundNorth", RelXml.HashString(SoundNorth)); + RelXml.StringTag(sb, indent, "SoundEast", RelXml.HashString(SoundEast)); + RelXml.StringTag(sb, indent, "SoundSouth", RelXml.HashString(SoundSouth)); + RelXml.StringTag(sb, indent, "SoundWest", RelXml.HashString(SoundWest)); + RelXml.ValueTag(sb, indent, "VolumeSmoothing", FloatUtil.ToString(VolumeSmoothing)); + RelXml.StringTag(sb, indent, "TimeToVolume", RelXml.HashString(TimeToVolume)); + RelXml.StringTag(sb, indent, "OcclusionToVol", RelXml.HashString(OcclusionToVol)); + RelXml.StringTag(sb, indent, "HeightToCutOff", RelXml.HashString(HeightToCutOff)); + RelXml.StringTag(sb, indent, "OcclusionToCutOff", RelXml.HashString(OcclusionToCutOff)); + RelXml.StringTag(sb, indent, "BuiltUpFactorToVol", RelXml.HashString(BuiltUpFactorToVol)); + RelXml.StringTag(sb, indent, "BuildingDensityToVol", RelXml.HashString(BuildingDensityToVol)); + RelXml.StringTag(sb, indent, "TreeDensityToVol", RelXml.HashString(TreeDensityToVol)); + RelXml.StringTag(sb, indent, "WaterFactorToVol", RelXml.HashString(WaterFactorToVol)); + RelXml.ValueTag(sb, indent, "InstanceVolumeScale", FloatUtil.ToString(InstanceVolumeScale)); + RelXml.StringTag(sb, indent, "HeightAboveBlanketToVol", RelXml.HashString(HeightAboveBlanketToVol)); + RelXml.StringTag(sb, indent, "HighwayFactorToVol", RelXml.HashString(HighwayFactorToVol)); + RelXml.StringTag(sb, indent, "VehicleCountToVol", RelXml.HashString(VehicleCountToVol)); + RelXml.ValueTag(sb, indent, "MaxDistanceOutToSea", FloatUtil.ToString(MaxDistanceOutToSea)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - ChildSound1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound1")); - ChildSound2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound2")); - ChildSound3 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound3")); - ChildSound4 = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound4")); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = Xml.GetChildFloatAttribute(node, "Unk18", "value"); + SoundNorth = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundNorth")); + SoundEast = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundEast")); + SoundSouth = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundSouth")); + SoundWest = XmlRel.GetHash(Xml.GetChildInnerText(node, "SoundWest")); + VolumeSmoothing = Xml.GetChildFloatAttribute(node, "VolumeSmoothing", "value"); + TimeToVolume = XmlRel.GetHash(Xml.GetChildInnerText(node, "TimeToVolume")); + OcclusionToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "OcclusionToVol")); + HeightToCutOff = XmlRel.GetHash(Xml.GetChildInnerText(node, "HeightToCutOff")); + OcclusionToCutOff = XmlRel.GetHash(Xml.GetChildInnerText(node, "OcclusionToCutOff")); + BuiltUpFactorToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "BuiltUpFactorToVol")); + BuildingDensityToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "BuildingDensityToVol")); + TreeDensityToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "TreeDensityToVol")); + WaterFactorToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "WaterFactorToVol")); + InstanceVolumeScale = Xml.GetChildFloatAttribute(node, "InstanceVolumeScale", "value"); + HeightAboveBlanketToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "HeightAboveBlanketToVol")); + HighwayFactorToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "HighwayFactorToVol")); + VehicleCountToVol = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleCountToVol")); + MaxDistanceOutToSea = Xml.GetChildFloatAttribute(node, "MaxDistanceOutToSea", "value"); } public override MetaHash[] GetCurveHashes() { - return new[] { Unk06, Unk07, Unk08, Unk09, Unk10, Unk11, Unk12, Unk13, Unk15, Unk16, Unk17 }; + return new[] { TimeToVolume, OcclusionToVol, HeightToCutOff, OcclusionToCutOff, BuiltUpFactorToVol, BuildingDensityToVol, TreeDensityToVol, WaterFactorToVol, HeightAboveBlanketToVol, HighwayFactorToVol, VehicleCountToVol }; } public override MetaHash[] GetSoundHashes() { - return new[] { ChildSound1, ChildSound2, ChildSound3, ChildSound4 }; + return new[] { SoundNorth, SoundEast, SoundSouth, SoundWest }; } } - [TC(typeof(EXP))] public class Dat151ConductorState : Dat151RelData - { - public int Unk01 { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public float Unk08 { get; set; } - public float Unk09 { get; set; } - public MetaHash Unk10 { get; set; }//0 - public MetaHash Unk11 { get; set; }//0 - public MetaHash Unk12 { get; set; } - public MetaHash Unk13 { get; set; } - public MetaHash Unk14 { get; set; } - public MetaHash Unk15 { get; set; } - public Dat151ConductorState(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151GunfightConductorIntensitySettings : Dat151RelData + { + public int MaxTimeAfterLastShot { get; set; } + public float TimeToFakeBulletImpacts { get; set; } + public float CoverMinTimeToReTriggerFakeBulletImpacts { get; set; } + public float CoverMaxTimeToReTriggerFakeBulletImpacts { get; set; } + public float RunningAwayMinTimeToFakeBulletImpacts { get; set; } + public float RunningAwayMaxTimeToFakeBulletImpacts { get; set; } + public float VfxProbability { get; set; } + public float OpenSpaceMinTimeToFakeBulletImpacts { get; set; } + public float OpenSpaceMaxTimeToFakeBulletImpacts { get; set; } + public MetaHash ObjectsMediumIntensity { get; set; } + public MetaHash ObjectsHighIntensity { get; set; } + public MetaHash VehiclesMediumIntensity { get; set; } + public MetaHash VehiclesHighIntensity { get; set; } + public MetaHash GroundMediumIntensity { get; set; } + public MetaHash GroundHighIntensity { get; set; } + + public Dat151GunfightConductorIntensitySettings(RelFile rel) : base(rel) { - Type = Dat151RelType.ConductorState; + Type = Dat151RelType.GunfightConductorIntensitySettings; TypeID = (byte)Type; } - public Dat151ConductorState(RelData d, BinaryReader br) : base(d, br) + public Dat151GunfightConductorIntensitySettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadSingle(); - Unk10 = br.ReadUInt32();//0 - Unk11 = br.ReadUInt32();//0 - Unk12 = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadUInt32(); - Unk15 = br.ReadUInt32(); - - if (Unk10 != 0) - { } - if (Unk11 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MaxTimeAfterLastShot = br.ReadInt32(); + TimeToFakeBulletImpacts = br.ReadSingle(); + CoverMinTimeToReTriggerFakeBulletImpacts = br.ReadSingle(); + CoverMaxTimeToReTriggerFakeBulletImpacts = br.ReadSingle(); + RunningAwayMinTimeToFakeBulletImpacts = br.ReadSingle(); + RunningAwayMaxTimeToFakeBulletImpacts = br.ReadSingle(); + VfxProbability = br.ReadSingle(); + OpenSpaceMinTimeToFakeBulletImpacts = br.ReadSingle(); + OpenSpaceMaxTimeToFakeBulletImpacts = br.ReadSingle(); + ObjectsMediumIntensity = br.ReadUInt32(); + ObjectsHighIntensity = br.ReadUInt32(); + VehiclesMediumIntensity = br.ReadUInt32(); + VehiclesHighIntensity = br.ReadUInt32(); + GroundMediumIntensity = br.ReadUInt32(); + GroundHighIntensity = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); + bw.Write(MaxTimeAfterLastShot); + bw.Write(TimeToFakeBulletImpacts); + bw.Write(CoverMinTimeToReTriggerFakeBulletImpacts); + bw.Write(CoverMaxTimeToReTriggerFakeBulletImpacts); + bw.Write(RunningAwayMinTimeToFakeBulletImpacts); + bw.Write(RunningAwayMaxTimeToFakeBulletImpacts); + bw.Write(VfxProbability); + bw.Write(OpenSpaceMinTimeToFakeBulletImpacts); + bw.Write(OpenSpaceMaxTimeToFakeBulletImpacts); + bw.Write(ObjectsMediumIntensity); + bw.Write(ObjectsHighIntensity); + bw.Write(VehiclesMediumIntensity); + bw.Write(VehiclesHighIntensity); + bw.Write(GroundMediumIntensity); + bw.Write(GroundHighIntensity); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); + RelXml.ValueTag(sb, indent, "MaxTimeAfterLastShot", MaxTimeAfterLastShot.ToString()); + RelXml.ValueTag(sb, indent, "TimeToFakeBulletImpacts", FloatUtil.ToString(TimeToFakeBulletImpacts)); + RelXml.ValueTag(sb, indent, "CoverMinTimeToReTriggerFakeBulletImpacts", FloatUtil.ToString(CoverMinTimeToReTriggerFakeBulletImpacts)); + RelXml.ValueTag(sb, indent, "CoverMaxTimeToReTriggerFakeBulletImpacts", FloatUtil.ToString(CoverMaxTimeToReTriggerFakeBulletImpacts)); + RelXml.ValueTag(sb, indent, "RunningAwayMinTimeToFakeBulletImpacts", FloatUtil.ToString(RunningAwayMinTimeToFakeBulletImpacts)); + RelXml.ValueTag(sb, indent, "RunningAwayMaxTimeToFakeBulletImpacts", FloatUtil.ToString(RunningAwayMaxTimeToFakeBulletImpacts)); + RelXml.ValueTag(sb, indent, "VfxProbability", FloatUtil.ToString(VfxProbability)); + RelXml.ValueTag(sb, indent, "OpenSpaceMinTimeToFakeBulletImpacts", FloatUtil.ToString(OpenSpaceMinTimeToFakeBulletImpacts)); + RelXml.ValueTag(sb, indent, "OpenSpaceMaxTimeToFakeBulletImpacts", FloatUtil.ToString(OpenSpaceMaxTimeToFakeBulletImpacts)); + RelXml.StringTag(sb, indent, "ObjectsMediumIntensity", RelXml.HashString(ObjectsMediumIntensity)); + RelXml.StringTag(sb, indent, "ObjectsHighIntensity", RelXml.HashString(ObjectsHighIntensity)); + RelXml.StringTag(sb, indent, "VehiclesMediumIntensity", RelXml.HashString(VehiclesMediumIntensity)); + RelXml.StringTag(sb, indent, "VehiclesHighIntensity", RelXml.HashString(VehiclesHighIntensity)); + RelXml.StringTag(sb, indent, "GroundMediumIntensity", RelXml.HashString(GroundMediumIntensity)); + RelXml.StringTag(sb, indent, "GroundHighIntensity", RelXml.HashString(GroundHighIntensity)); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); + MaxTimeAfterLastShot = Xml.GetChildIntAttribute(node, "MaxTimeAfterLastShot", "value"); + TimeToFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "TimeToFakeBulletImpacts", "value"); + CoverMinTimeToReTriggerFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "CoverMinTimeToReTriggerFakeBulletImpacts", "value"); + CoverMaxTimeToReTriggerFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "CoverMaxTimeToReTriggerFakeBulletImpacts", "value"); + RunningAwayMinTimeToFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "RunningAwayMinTimeToFakeBulletImpacts", "value"); + RunningAwayMaxTimeToFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "RunningAwayMaxTimeToFakeBulletImpacts", "value"); + VfxProbability = Xml.GetChildFloatAttribute(node, "VfxProbability", "value"); + OpenSpaceMinTimeToFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "OpenSpaceMinTimeToFakeBulletImpacts", "value"); + OpenSpaceMaxTimeToFakeBulletImpacts = Xml.GetChildFloatAttribute(node, "OpenSpaceMaxTimeToFakeBulletImpacts", "value"); + ObjectsMediumIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "ObjectsMediumIntensity")); + ObjectsHighIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "ObjectsHighIntensity")); + VehiclesMediumIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehiclesMediumIntensity")); + VehiclesHighIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehiclesHighIntensity")); + GroundMediumIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "GroundMediumIntensity")); + GroundHighIntensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "GroundHighIntensity")); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk12, Unk13, Unk14, Unk15 }; + return new[] { VehiclesMediumIntensity, VehiclesHighIntensity, GroundMediumIntensity, GroundHighIntensity }; } } - [TC(typeof(EXP))] public class Dat151AnimalSoundsItem : IMetaXmlItem - { - public byte Unk1 { get; set; } - public byte ItemCount1 { get; set; } //indicates how many are used - public Dat151HashFloat[] Items1 { get; set; } //always array of 8 - probably links to speech.dat somehow - public byte ItemCount2 { get; set; } //indicates how many are used - public Dat151HashFloat[] Items2 { get; set; } //always array of 8 - public Dat151AnimalSoundsItem() - { } - public Dat151AnimalSoundsItem(BinaryReader br) + [TC(typeof(EXP))] + public class Dat151AnimalVocalAnimTriggerItem : IMetaXmlItem + { + public byte Animal { get; set; } + public byte AngryContextsCount { get; set; } + public Contexts[] AngryContexts { get; set; } + public byte PlayfulContextsCount { get; set; } + public Contexts[] PlayfulContexts { get; set; } + public struct Contexts : IMetaXmlItem { - Unk1 = br.ReadByte(); - ItemCount1 = br.ReadByte(); - Items1 = new Dat151HashFloat[8]; - for (int i = 0; i < 8; i++) + public MetaHash Context { get; set; } + public float Weight { get; set; } + public Contexts(BinaryReader br) { - Items1[i] = new Dat151HashFloat(br); + Context = br.ReadUInt32(); + Weight = br.ReadSingle(); } - ItemCount2 = br.ReadByte(); - Items2 = new Dat151HashFloat[8]; - for (int i = 0; i < 8; i++) + public void Write(BinaryWriter bw) { - Items2[i] = new Dat151HashFloat(br); + bw.Write(Context); + bw.Write(Weight); + } + public void WriteXml(StringBuilder sb, int indent) + { + RelXml.StringTag(sb, indent, "Context", RelXml.HashString(Context)); + RelXml.ValueTag(sb, indent, "Weight", FloatUtil.ToString(Weight)); + } + public void ReadXml(XmlNode node) + { + Context = XmlRel.GetHash(Xml.GetChildInnerText(node, "Context")); + Weight = Xml.GetChildFloatAttribute(node, "Weight", "value"); + } + public override string ToString() + { + return Context.ToString() + ": " + FloatUtil.ToString(Weight); + } + } + public Dat151AnimalVocalAnimTriggerItem() + { } + public Dat151AnimalVocalAnimTriggerItem(BinaryReader br) + { + Animal = br.ReadByte(); + + AngryContextsCount = br.ReadByte(); + AngryContexts = new Contexts[AngryContextsCount]; + for (int i = 0; i < AngryContextsCount; i++) + { + AngryContexts[i] = new Contexts(br); + } + if (AngryContextsCount < 8) + { + br.BaseStream.Seek((8 - AngryContextsCount) * 8, SeekOrigin.Current); + } + + PlayfulContextsCount = br.ReadByte(); + PlayfulContexts = new Contexts[PlayfulContextsCount]; + for (int i = 0; i < PlayfulContextsCount; i++) + { + PlayfulContexts[i] = new Contexts(br); + } + if (PlayfulContextsCount < 8) + { + br.BaseStream.Seek((8 - PlayfulContextsCount) * 8, SeekOrigin.Current); } } public void Write(BinaryWriter bw) { - bw.Write(Unk1); - bw.Write(ItemCount1); - for (int i = 0; i < 8; i++) + bw.Write(Animal); + + bw.Write(AngryContextsCount); + for (int i = 0; i < AngryContextsCount; i++) { - Items1[i].Write(bw); + AngryContexts[i].Write(bw); } - bw.Write(ItemCount2); - for (int i = 0; i < 8; i++) + if (AngryContextsCount < 8) { - Items2[i].Write(bw); + bw.Write(new byte[(8 - AngryContextsCount) * 8]); + } + + bw.Write(PlayfulContextsCount); + for (int i = 0; i < PlayfulContextsCount; i++) + { + PlayfulContexts[i].Write(bw); + } + if (PlayfulContextsCount < 8) + { + bw.Write(new byte[(8 - PlayfulContextsCount) * 8]); } } public void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk1", Unk1.ToString()); - RelXml.ValueTag(sb, indent, "ItemCount1", ItemCount1.ToString()); - RelXml.WriteItemArray(sb, Items1, indent, "Items1"); - RelXml.ValueTag(sb, indent, "ItemCount2", ItemCount2.ToString()); - RelXml.WriteItemArray(sb, Items2, indent, "Items2"); + RelXml.ValueTag(sb, indent, "Animal", Animal.ToString()); + RelXml.WriteItemArray(sb, AngryContexts, indent, "AngryContexts"); + RelXml.WriteItemArray(sb, PlayfulContexts, indent, "PlayfulContexts"); } public void ReadXml(XmlNode node) { - Unk1 = (byte)Xml.GetChildUIntAttribute(node, "Unk1", "value"); - ItemCount1 = (byte)Xml.GetChildUIntAttribute(node, "ItemCount1", "value"); - Items1 = XmlRel.ReadItemArray(node, "Items1"); - ItemCount2 = (byte)Xml.GetChildUIntAttribute(node, "ItemCount2", "value"); - Items2 = XmlRel.ReadItemArray(node, "Items2"); - //probably should make an error if Items1/2 are not an array of 8... + Animal = (byte)Xml.GetChildUIntAttribute(node, "Animal", "value"); + AngryContexts = XmlRel.ReadItemArray(node, "AngryContexts"); + AngryContextsCount = (byte)(AngryContexts?.Length ?? 0); + PlayfulContexts = XmlRel.ReadItemArray(node, "PlayfulContexts"); + PlayfulContextsCount = (byte)(PlayfulContexts?.Length ?? 0); } public override string ToString() { - return Unk1.ToString() + ": " + ItemCount1.ToString() + ", " + ItemCount2.ToString(); + return Animal.ToString() + ": " + AngryContextsCount.ToString() + ", " + PlayfulContextsCount.ToString(); } } - [TC(typeof(EXP))] public class Dat151AnimalSounds : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151AnimalVocalAnimTrigger : Dat151RelData { public byte ItemCount { get; set; } - public Dat151AnimalSoundsItem[] Items { get; set; } + public Dat151AnimalVocalAnimTriggerItem[] Items { get; set; } - public Dat151AnimalSounds(RelFile rel) : base(rel) + public Dat151AnimalVocalAnimTrigger(RelFile rel) : base(rel) { - Type = Dat151RelType.AnimalSounds; + Type = Dat151RelType.AnimalVocalAnimTrigger; TypeID = (byte)Type; } - public Dat151AnimalSounds(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalVocalAnimTrigger(RelData d, BinaryReader br) : base(d, br) { - ItemCount = br.ReadByte();//1 - Items = new Dat151AnimalSoundsItem[ItemCount]; + ItemCount = br.ReadByte(); + Items = new Dat151AnimalVocalAnimTriggerItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151AnimalSoundsItem(br); + Items[i] = new Dat151AnimalVocalAnimTriggerItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -17339,11 +16766,13 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - Items = XmlRel.ReadItemArray(node, "Items"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (byte)(Items?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151VehicleScannerColourList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ScannerVoiceParams : Dat151RelData { public MetaHash Black { get; set; } public MetaHash Blue { get; set; } @@ -17361,63 +16790,63 @@ namespace CodeWalker.GameFiles public MetaHash MetallicBlack { get; set; } public MetaHash MetallicBlue { get; set; } public MetaHash MetallicBrown { get; set; } - public MetaHash MetallicBeige { get; set; }//0 - public MetaHash MetallicGraphite { get; set; }//0 + public MetaHash MetallicBeige { get; set; } + public MetaHash MetallicGraphite { get; set; } public MetaHash MetallicGreen { get; set; } public MetaHash MetallicGrey { get; set; } - public MetaHash MetallicOrange { get; set; }//0 - public MetaHash MetallicPink { get; set; }//0 + public MetaHash MetallicOrange { get; set; } + public MetaHash MetallicPink { get; set; } public MetaHash MetallicRed { get; set; } public MetaHash MetallicSilver { get; set; } - public MetaHash MetallicWhite { get; set; }//0 + public MetaHash MetallicWhite { get; set; } public MetaHash MetallicYellow { get; set; } - public MetaHash LightBlack { get; set; }//0 + public MetaHash LightBlack { get; set; } public MetaHash LightBlue { get; set; } public MetaHash LightBrown { get; set; } - public MetaHash LightBeige { get; set; }//0 - public MetaHash LightGraphite { get; set; }//0 + public MetaHash LightBeige { get; set; } + public MetaHash LightGraphite { get; set; } public MetaHash LightGreen { get; set; } public MetaHash LightGrey { get; set; } public MetaHash LightOrange { get; set; } - public MetaHash LightPink { get; set; }//0 + public MetaHash LightPink { get; set; } public MetaHash LightRed { get; set; } public MetaHash LightSilver { get; set; } - public MetaHash LightWhite { get; set; }//0 + public MetaHash LightWhite { get; set; } public MetaHash LightYellow { get; set; } - public MetaHash DarkBlack { get; set; }//0 + public MetaHash DarkBlack { get; set; } public MetaHash DarkBlue { get; set; } public MetaHash DarkBrown { get; set; } - public MetaHash DarkBeige { get; set; }//0 - public MetaHash DarkGraphite { get; set; }//0 + public MetaHash DarkBeige { get; set; } + public MetaHash DarkGraphite { get; set; } public MetaHash DarkGreen { get; set; } public MetaHash DarkGrey { get; set; } public MetaHash DarkOrange { get; set; } - public MetaHash DarkPink { get; set; }//0 + public MetaHash DarkPink { get; set; } public MetaHash DarkRed { get; set; } public MetaHash DarkSilver { get; set; } - public MetaHash DarkWhite { get; set; }//0 + public MetaHash DarkWhite { get; set; } public MetaHash DarkYellow { get; set; } - public MetaHash Unk53 { get; set; }//0 + public MetaHash Unk53 { get; set; } public MetaHash BeatUp { get; set; } - public MetaHash Unk55 { get; set; }//0 + public MetaHash Unk55 { get; set; } public MetaHash Custom { get; set; } - public MetaHash Unk57 { get; set; }//0 - public MetaHash Unk58 { get; set; }//0 - public MetaHash Unk59 { get; set; }//0 + public MetaHash Unk57 { get; set; } + public MetaHash Unk58 { get; set; } + public MetaHash Unk59 { get; set; } public MetaHash Dirty { get; set; } - public MetaHash Unk61 { get; set; }//0 + public MetaHash Unk61 { get; set; } public MetaHash Mint { get; set; } - public MetaHash Unk63 { get; set; }//0 - public MetaHash Unk64 { get; set; }//0 - public MetaHash Unk65 { get; set; }//0 + public MetaHash Unk63 { get; set; } + public MetaHash Unk64 { get; set; } + public MetaHash Unk65 { get; set; } public MetaHash Rusty { get; set; } - public Dat151VehicleScannerColourList(RelFile rel) : base(rel) + public Dat151ScannerVoiceParams(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleScannerColourList; + Type = Dat151RelType.ScannerVoiceParams; TypeID = (byte)Type; } - public Dat151VehicleScannerColourList(RelData d, BinaryReader br) : base(d, br) + public Dat151ScannerVoiceParams(RelData d, BinaryReader br) : base(d, br) { Black = br.ReadUInt32(); Blue = br.ReadUInt32(); @@ -17485,10 +16914,6 @@ namespace CodeWalker.GameFiles Unk64 = br.ReadUInt32();//0 Unk65 = br.ReadUInt32();//0 Rusty = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -17708,154 +17133,150 @@ namespace CodeWalker.GameFiles Unk53,BeatUp,Unk55,Custom,Unk57,Unk58,Unk59,Dirty,Unk61,Mint,Unk63,Unk64,Unk65,Rusty }; } } - [TC(typeof(EXP))] public class Dat151Unk77 : Dat151RelData - { - public MetaHash Unk01 { get; set; }//0 - public float Unk02 { get; set; } - public Dat151Unk77(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151AudioRoadInfo : Dat151RelData + { + public MetaHash RoadName { get; set; } + public float TyreBumpDistance { get; set; } + + public Dat151AudioRoadInfo(RelFile rel) : base(rel) { - Type = Dat151RelType.Unk77; + Type = Dat151RelType.AudioRoadInfo; TypeID = (byte)Type; } - public Dat151Unk77(RelData d, BinaryReader br) : base(d, br) + public Dat151AudioRoadInfo(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32();//0 - Unk02 = br.ReadSingle(); - - if (Unk01 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + RoadName = br.ReadUInt32(); + TyreBumpDistance = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); + bw.Write(RoadName); + bw.Write(TyreBumpDistance); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); + RelXml.StringTag(sb, indent, "RoadName", RelXml.HashString(RoadName)); + RelXml.ValueTag(sb, indent, "TyreBumpDistance", FloatUtil.ToString(TyreBumpDistance)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); + RoadName = XmlRel.GetHash(Xml.GetChildInnerText(node, "RoadName")); + TyreBumpDistance = Xml.GetChildFloatAttribute(node, "TyreBumpDistance", "value"); } } - [TC(typeof(EXP))] public class Dat151MicrophoneItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151MicrophoneItem : IMetaXmlItem { - public float Unk01 { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public int Unk07 { get; set; } - public float Unk08 { get; set; } - public float Unk09 { get; set; } + public float ListenerContribution { get; set; } + public float RearAttenuationFrontConeAngle { get; set; } + public float RearAttenuationRearConeAngle { get; set; } + public float CloseRearAttenuation { get; set; } + public float FarRearAttenuation { get; set; } + public float RollOff { get; set; } + public int RearAttenuationType { get; set; } + public float MicLength { get; set; } + public float MicToPlayerLocalEnvironmentRatio { get; set; } public Dat151MicrophoneItem() { } public Dat151MicrophoneItem(BinaryReader br) { - Unk01 = br.ReadSingle(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadSingle(); + ListenerContribution = br.ReadSingle(); + RearAttenuationFrontConeAngle = br.ReadSingle(); + RearAttenuationRearConeAngle = br.ReadSingle(); + CloseRearAttenuation = br.ReadSingle(); + FarRearAttenuation = br.ReadSingle(); + RollOff = br.ReadSingle(); + RearAttenuationType = br.ReadInt32(); + MicLength = br.ReadSingle(); + MicToPlayerLocalEnvironmentRatio = br.ReadSingle(); } public void Write(BinaryWriter bw) { - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); + bw.Write(ListenerContribution); + bw.Write(RearAttenuationFrontConeAngle); + bw.Write(RearAttenuationRearConeAngle); + bw.Write(CloseRearAttenuation); + bw.Write(FarRearAttenuation); + bw.Write(RollOff); + bw.Write(RearAttenuationType); + bw.Write(MicLength); + bw.Write(MicToPlayerLocalEnvironmentRatio); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09)); + RelXml.ValueTag(sb, indent, "ListenerContribution", FloatUtil.ToString(ListenerContribution)); + RelXml.ValueTag(sb, indent, "RearAttenuationFrontConeAngle", FloatUtil.ToString(RearAttenuationFrontConeAngle)); + RelXml.ValueTag(sb, indent, "RearAttenuationRearConeAngle", FloatUtil.ToString(RearAttenuationRearConeAngle)); + RelXml.ValueTag(sb, indent, "CloseRearAttenuation", FloatUtil.ToString(CloseRearAttenuation)); + RelXml.ValueTag(sb, indent, "FarRearAttenuation", FloatUtil.ToString(FarRearAttenuation)); + RelXml.ValueTag(sb, indent, "RollOff", FloatUtil.ToString(RollOff)); + RelXml.ValueTag(sb, indent, "RearAttenuationType", RearAttenuationType.ToString()); + RelXml.ValueTag(sb, indent, "MicLength", FloatUtil.ToString(MicLength)); + RelXml.ValueTag(sb, indent, "MicToPlayerLocalEnvironmentRatio", FloatUtil.ToString(MicToPlayerLocalEnvironmentRatio)); } public void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value"); + ListenerContribution = Xml.GetChildFloatAttribute(node, "ListenerContribution", "value"); + RearAttenuationFrontConeAngle = Xml.GetChildFloatAttribute(node, "RearAttenuationFrontConeAngle", "value"); + RearAttenuationRearConeAngle = Xml.GetChildFloatAttribute(node, "RearAttenuationRearConeAngle", "value"); + CloseRearAttenuation = Xml.GetChildFloatAttribute(node, "CloseRearAttenuation", "value"); + FarRearAttenuation = Xml.GetChildFloatAttribute(node, "FarRearAttenuation", "value"); + RollOff = Xml.GetChildFloatAttribute(node, "RollOff", "value"); + RearAttenuationType = Xml.GetChildIntAttribute(node, "RearAttenuationType", "value"); + MicLength = Xml.GetChildFloatAttribute(node, "MicLength", "value"); + MicToPlayerLocalEnvironmentRatio = Xml.GetChildFloatAttribute(node, "MicToPlayerLocalEnvironmentRatio", "value"); } public override string ToString() { - return string.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}", Unk01, Unk02, Unk03, Unk04, Unk05, Unk06, Unk07, Unk08, Unk09); + return string.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}", ListenerContribution, RearAttenuationFrontConeAngle, RearAttenuationRearConeAngle, CloseRearAttenuation, FarRearAttenuation, RollOff, RearAttenuationType, MicLength, MicToPlayerLocalEnvironmentRatio); } } - [TC(typeof(EXP))] public class Dat151Microphone : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151MicrophoneSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public byte Unk01 { get; set; } + public byte MicType { get; set; } public byte MicrophonesCount { get; set; } - public byte Unk02 { get; set; } - public byte Unk03 { get; set; } + public byte padding00 { get; set; } + public byte padding01 { get; set; } public Dat151MicrophoneItem[] Microphones { get; set; } - public Dat151Microphone(RelFile rel) : base(rel) + public Dat151MicrophoneSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Microphone; + Type = Dat151RelType.MicrophoneSettings; TypeID = (byte)Type; } - public Dat151Microphone(RelData d, BinaryReader br) : base(d, br) + public Dat151MicrophoneSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadByte(); - MicrophonesCount = br.ReadByte(); - Unk02 = br.ReadByte(); - Unk03 = br.ReadByte(); + MicType = br.ReadByte(); + MicrophonesCount = br.ReadByte(); + padding00 = br.ReadByte(); + padding01 = br.ReadByte(); Microphones = new Dat151MicrophoneItem[MicrophonesCount]; for (int i = 0; i < MicrophonesCount; i++) { Microphones[i] = new Dat151MicrophoneItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); + bw.Write(MicType); + bw.Write(MicrophonesCount); - bw.Write(Unk02); - bw.Write(Unk03); + bw.Write(padding00); + bw.Write(padding01); for (int i = 0; i < MicrophonesCount; i++) { Microphones[i].Write(bw); @@ -17864,58 +17285,52 @@ namespace CodeWalker.GameFiles public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); + RelXml.ValueTag(sb, indent, "MicType", MicType.ToString()); RelXml.WriteItemArray(sb, Microphones, indent, "Microphones"); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = (byte)Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = (byte)Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = (byte)Xml.GetChildIntAttribute(node, "Unk03", "value"); + MicType = (byte)Xml.GetChildIntAttribute(node, "MicType", "value"); Microphones = XmlRel.ReadItemArray(node, "Microphones"); MicrophonesCount = (byte)(Microphones?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151VehicleRecording : Dat151RelData //vehicle record audio? (YVR) + + [TC(typeof(EXP))] + public class Dat151CarRecordingAudioSettings : Dat151RelData { public MetaHash Group { get; set; } public int Duration { get; set; } public int ItemCount { get; set; } - public Dat151VehicleRecordingItem[] Items { get; set; } + public Dat151CarRecordingAudioSettingsItem[] Items { get; set; } public int ItemCount2 { get; set; } - public Dat151VehicleRecordingItem2[] Items2 { get; set; } + public Dat151CarRecordingAudioSettingsItem2[] Items2 { get; set; } - public Dat151VehicleRecording(RelFile rel) : base(rel) + public Dat151CarRecordingAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.VehicleRecording; + Type = Dat151RelType.CarRecordingAudioSettings; TypeID = (byte)Type; } - public Dat151VehicleRecording(RelData d, BinaryReader br) : base(d, br) + public Dat151CarRecordingAudioSettings(RelData d, BinaryReader br) : base(d, br) { Group = br.ReadUInt32(); Duration = br.ReadInt32(); ItemCount = br.ReadInt32(); - Items = new Dat151VehicleRecordingItem[ItemCount]; + Items = new Dat151CarRecordingAudioSettingsItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151VehicleRecordingItem(br); + Items[i] = new Dat151CarRecordingAudioSettingsItem(br); } if (ItemCount != 0) { ItemCount2 = br.ReadInt32(); - Items2 = new Dat151VehicleRecordingItem2[ItemCount2]; + Items2 = new Dat151CarRecordingAudioSettingsItem2[ItemCount2]; for (int i = 0; i < ItemCount2; i++) { - Items2[i] = new Dat151VehicleRecordingItem2(br); + Items2[i] = new Dat151CarRecordingAudioSettingsItem2(br); } } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -17951,11 +17366,11 @@ namespace CodeWalker.GameFiles { Group = XmlRel.GetHash(Xml.GetChildInnerText(node, "Group")); Duration = Xml.GetChildIntAttribute(node, "Duration", "value"); - Items = XmlRel.ReadItemArray(node, "Items"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (Items?.Length ?? 0); if (ItemCount > 0) { - Items2 = XmlRel.ReadItemArray(node, "Items2"); + Items2 = XmlRel.ReadItemArray(node, "Items2"); ItemCount2 = (Items2?.Length ?? 0); } else @@ -17999,15 +17414,15 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public class Dat151VehicleRecordingItem : IMetaXmlItem + public class Dat151CarRecordingAudioSettingsItem : IMetaXmlItem { public float Time { get; set; } public MetaHash Sound { get; set; } public MetaHash Scene { get; set; } - public Dat151VehicleRecordingItem() + public Dat151CarRecordingAudioSettingsItem() { } - public Dat151VehicleRecordingItem(BinaryReader br) + public Dat151CarRecordingAudioSettingsItem(BinaryReader br) { Time = br.ReadSingle(); Sound = br.ReadUInt32(); @@ -18036,16 +17451,17 @@ namespace CodeWalker.GameFiles return Time.ToString() + ", " + Sound.ToString() + ", " + Scene.ToString(); } } + [TC(typeof(EXP))] - public class Dat151VehicleRecordingItem2 : IMetaXmlItem + public class Dat151CarRecordingAudioSettingsItem2 : IMetaXmlItem { public MetaHash Scene { get; set; } public float FadeIn { get; set; } public float FadeOut { get; set; } - public Dat151VehicleRecordingItem2() + public Dat151CarRecordingAudioSettingsItem2() { } - public Dat151VehicleRecordingItem2(BinaryReader br) + public Dat151CarRecordingAudioSettingsItem2(BinaryReader br) { Scene = br.ReadUInt32(); FadeIn = br.ReadSingle(); @@ -18074,208 +17490,201 @@ namespace CodeWalker.GameFiles return Scene.ToString() + ", " + FadeIn.ToString() + ", " + FadeOut.ToString(); } } - [TC(typeof(EXP))] public class Dat151AnimalFootsteps : Dat151RelData - { - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public MetaHash Unk04 { get; set; } - public MetaHash Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; } - public MetaHash Unk09 { get; set; } - public int Unk10 { get; set; } - public Dat151AnimalFootsteps(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151AnimalFootstepSettings : Dat151RelData + { + public MetaHash WalkAndTrot { get; set; } + public MetaHash Gallop1 { get; set; } + public MetaHash Gallop2 { get; set; } + public MetaHash Scuff { get; set; } + public MetaHash Jump { get; set; } + public MetaHash Land { get; set; } + public MetaHash LandHard { get; set; } + public MetaHash Clumsy { get; set; } + public MetaHash SlideLoop { get; set; } + public int AudioEventLoudness { get; set; } + + public Dat151AnimalFootstepSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.AnimalFootsteps; + Type = Dat151RelType.AnimalFootstepSettings; TypeID = (byte)Type; } - public Dat151AnimalFootsteps(RelData d, BinaryReader br) : base(d, br) + public Dat151AnimalFootstepSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + WalkAndTrot = br.ReadUInt32(); + Gallop1 = br.ReadUInt32(); + Gallop2 = br.ReadUInt32(); + Scuff = br.ReadUInt32(); + Jump = br.ReadUInt32(); + Land = br.ReadUInt32(); + LandHard = br.ReadUInt32(); + Clumsy = br.ReadUInt32(); + SlideLoop = br.ReadUInt32(); + AudioEventLoudness = br.ReadInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); + bw.Write(WalkAndTrot); + bw.Write(Gallop1); + bw.Write(Gallop2); + bw.Write(Scuff); + bw.Write(Jump); + bw.Write(Land); + bw.Write(LandHard); + bw.Write(Clumsy); + bw.Write(SlideLoop); + bw.Write(AudioEventLoudness); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); + RelXml.StringTag(sb, indent, "WalkAndTrot", RelXml.HashString(WalkAndTrot)); + RelXml.StringTag(sb, indent, "Gallop1", RelXml.HashString(Gallop1)); + RelXml.StringTag(sb, indent, "Gallop2", RelXml.HashString(Gallop2)); + RelXml.StringTag(sb, indent, "Scuff", RelXml.HashString(Scuff)); + RelXml.StringTag(sb, indent, "Jump", RelXml.HashString(Jump)); + RelXml.StringTag(sb, indent, "Land", RelXml.HashString(Land)); + RelXml.StringTag(sb, indent, "LandHard", RelXml.HashString(LandHard)); + RelXml.StringTag(sb, indent, "Clumsy", RelXml.HashString(Clumsy)); + RelXml.StringTag(sb, indent, "SlideLoop", RelXml.HashString(SlideLoop)); + RelXml.ValueTag(sb, indent, "AudioEventLoudness", AudioEventLoudness.ToString()); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); + WalkAndTrot = XmlRel.GetHash(Xml.GetChildInnerText(node, "WalkAndTrot")); + Gallop1 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Gallop1")); + Gallop2 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Gallop2")); + Scuff = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scuff")); + Jump = XmlRel.GetHash(Xml.GetChildInnerText(node, "Jump")); + Land = XmlRel.GetHash(Xml.GetChildInnerText(node, "Land")); + LandHard = XmlRel.GetHash(Xml.GetChildInnerText(node, "LandHard")); + Clumsy = XmlRel.GetHash(Xml.GetChildInnerText(node, "Clumsy")); + SlideLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlideLoop")); + AudioEventLoudness = Xml.GetChildIntAttribute(node, "AudioEventLoudness", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk02, Unk03, Unk04, Unk05, Unk06, Unk07, Unk08, Unk09 }; + return new[] { WalkAndTrot, Gallop1, Gallop2, Scuff, Jump, Land, LandHard, Clumsy, SlideLoop }; } } - [TC(typeof(EXP))] public class Dat151Cloth : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ClothAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public MetaHash Unk04 { get; set; } - public MetaHash Unk05 { get; set; } - public MetaHash Unk06 { get; set; } - public MetaHash Unk07 { get; set; } - public MetaHash Unk08 { get; set; }//0 - public MetaHash Unk09 { get; set; }//another cloth... - public MetaHash Unk10 { get; set; } - public MetaHash Unk11 { get; set; } - public MetaHash Unk12 { get; set; }//0 - public MetaHash Unk13 { get; set; } - public MetaHash Unk14 { get; set; } + public MetaHash ImpactSound { get; set; } + public MetaHash WalkSound { get; set; } + public MetaHash RunSound { get; set; } + public MetaHash SprintSound { get; set; } + public MetaHash IntoCoverSound { get; set; } + public MetaHash OutOfCoverSound { get; set; } + public MetaHash WindSound { get; set; } + public float Intensity { get; set; } + public MetaHash PlayerVersion { get; set; } + public MetaHash BulletImpacts { get; set; } + public MetaHash PedRollSound { get; set; } + public MetaHash ScrapeMaterialSettings { get; set; } + public MetaHash JumpLandSound { get; set; } + public MetaHash MeleeSwingSound { get; set; } - public Dat151Cloth(RelFile rel) : base(rel) + public Dat151ClothAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Cloth; + Type = Dat151RelType.ClothAudioSettings; TypeID = (byte)Type; } - public Dat151Cloth(RelData d, BinaryReader br) : base(d, br) + public Dat151ClothAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadUInt32(); - Unk05 = br.ReadUInt32(); - Unk06 = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadUInt32(); - Unk11 = br.ReadUInt32(); - Unk12 = br.ReadUInt32();//0 - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadUInt32(); - - if (Unk08 != 0) - { } - if (Unk12 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + ImpactSound = br.ReadUInt32(); + WalkSound = br.ReadUInt32(); + RunSound = br.ReadUInt32(); + SprintSound = br.ReadUInt32(); + IntoCoverSound = br.ReadUInt32(); + OutOfCoverSound = br.ReadUInt32(); + WindSound = br.ReadUInt32(); + Intensity = br.ReadSingle(); + PlayerVersion = br.ReadUInt32(); + BulletImpacts = br.ReadUInt32(); + PedRollSound = br.ReadUInt32(); + ScrapeMaterialSettings = br.ReadUInt32(); + JumpLandSound = br.ReadUInt32(); + MeleeSwingSound = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); + bw.Write(ImpactSound); + bw.Write(WalkSound); + bw.Write(RunSound); + bw.Write(SprintSound); + bw.Write(IntoCoverSound); + bw.Write(OutOfCoverSound); + bw.Write(WindSound); + bw.Write(Intensity); + bw.Write(PlayerVersion); + bw.Write(BulletImpacts); + bw.Write(PedRollSound); + bw.Write(ScrapeMaterialSettings); + bw.Write(JumpLandSound); + bw.Write(MeleeSwingSound); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10)); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); + RelXml.StringTag(sb, indent, "ImpactSound", RelXml.HashString(ImpactSound)); + RelXml.StringTag(sb, indent, "WalkSound", RelXml.HashString(WalkSound)); + RelXml.StringTag(sb, indent, "RunSound", RelXml.HashString(RunSound)); + RelXml.StringTag(sb, indent, "SprintSound", RelXml.HashString(SprintSound)); + RelXml.StringTag(sb, indent, "IntoCoverSound", RelXml.HashString(IntoCoverSound)); + RelXml.StringTag(sb, indent, "OutOfCoverSound", RelXml.HashString(OutOfCoverSound)); + RelXml.StringTag(sb, indent, "WindSound", RelXml.HashString(WindSound)); + RelXml.ValueTag(sb, indent, "Intensity", FloatUtil.ToString(Intensity)); + RelXml.StringTag(sb, indent, "PlayerVersion", RelXml.HashString(PlayerVersion)); + RelXml.StringTag(sb, indent, "BulletImpacts", RelXml.HashString(BulletImpacts)); + RelXml.StringTag(sb, indent, "PedRollSound", RelXml.HashString(PedRollSound)); + RelXml.StringTag(sb, indent, "ScrapeMaterialSettings", RelXml.HashString(ScrapeMaterialSettings)); + RelXml.StringTag(sb, indent, "JumpLandSound", RelXml.HashString(JumpLandSound)); + RelXml.StringTag(sb, indent, "MeleeSwingSound", RelXml.HashString(MeleeSwingSound)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10")); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); + ImpactSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ImpactSound")); + WalkSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WalkSound")); + RunSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "RunSound")); + SprintSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SprintSound")); + IntoCoverSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "IntoCoverSound")); + OutOfCoverSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "OutOfCoverSound")); + WindSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "WindSound")); + Intensity = XmlRel.GetHash(Xml.GetChildInnerText(node, "Intensity")); + PlayerVersion = XmlRel.GetHash(Xml.GetChildInnerText(node, "PlayerVersion")); + BulletImpacts = XmlRel.GetHash(Xml.GetChildInnerText(node, "BulletImpacts")); + PedRollSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "PedRollSound")); + ScrapeMaterialSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "ScrapeMaterialSettings")); + JumpLandSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "JumpLandSound")); + MeleeSwingSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "MeleeSwingSound")); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk02, Unk03, Unk04, Unk05, Unk06, Unk07, Unk10, Unk11, Unk13, Unk14 }; + return new[] { ImpactSound, WalkSound, RunSound, SprintSound, IntoCoverSound, OutOfCoverSound, WindSound, BulletImpacts, PedRollSound, JumpLandSound, MeleeSwingSound }; } public override MetaHash[] GetGameHashes() { - return new[] { Unk09 };//is this necessary here? + return new[] { PlayerVersion }; } } - [TC(typeof(EXP))] public class Dat151RadioTrackSettings : Dat151RelData //_rts, _radio_settings (plays a specific radio track song) + + [TC(typeof(EXP))] + public class Dat151RadioTrackSettings : Dat151RelData //_rts, _radio_settings (plays a specific radio track song) { - public MetaHash Unk01 { get; set; } - public int Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public float Unk04 { get; set; } + public MetaHash Sound { get; set; } + public int Category { get; set; } + public MetaHash HistorySound { get; set; } + public float StartOffset { get; set; } public Dat151RadioTrackSettings(RelFile rel) : base(rel) { @@ -18284,241 +17693,230 @@ namespace CodeWalker.GameFiles } public Dat151RadioTrackSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadUInt32(); - Unk04 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Sound = br.ReadUInt32(); + Category = br.ReadInt32(); + HistorySound = br.ReadUInt32(); + StartOffset = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); + bw.Write(Sound); + bw.Write(Category); + bw.Write(HistorySound); + bw.Write(StartOffset); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); + RelXml.StringTag(sb, indent, "Sound", RelXml.HashString(Sound)); + RelXml.ValueTag(sb, indent, "Category", Category.ToString()); + RelXml.StringTag(sb, indent, "HistorySound", RelXml.HashString(HistorySound)); + RelXml.ValueTag(sb, indent, "StartOffset", FloatUtil.ToString(StartOffset)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); + Sound = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sound")); + Category = Xml.GetChildIntAttribute(node, "Category", "value"); + HistorySound = XmlRel.GetHash(Xml.GetChildInnerText(node, "HistorySound")); + StartOffset = Xml.GetChildFloatAttribute(node, "StartOffset", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk03 }; + return new[] { Sound, HistorySound }; } } - [TC(typeof(EXP))] public class Dat151StealthSettingsItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151ModelFootStepTuningItem : IMetaXmlItem { - public MetaHash Unk01 { get; set; }//name eg. default, good_stealth, bad_stealth, soft_steps, drunk - public float Unk02 { get; set; } - public int Unk03 { get; set; } - public int Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public int Unk07 { get; set; } - public MetaHash Unk08 { get; set; }//0 - public MetaHash Unk09 { get; set; }//??? not matching anything in dat.rel files - public float Unk10 { get; set; } - public int Unk11 { get; set; } - public MetaHash Unk12 { get; set; }//0 - public MetaHash Unk13 { get; set; }//??? not matching anything in dat.rel files - public float Unk14 { get; set; } - public int Unk15 { get; set; } - public MetaHash Unk16 { get; set; }//0 - public MetaHash Unk17 { get; set; }//??? not matching anything in dat.rel files - public float Unk18 { get; set; } - public int Unk19 { get; set; } - public int Unk20 { get; set; } - public MetaHash Unk21 { get; set; }//??? not matching anything in dat.rel files - public float Unk22 { get; set; } - public int Unk23 { get; set; } - public MetaHash Unk24 { get; set; }//0 - public float Unk25 { get; set; } + public MetaHash ModeName { get; set; } + public float ShoeVolumeOffset { get; set; } + public uint ShoeLPFCutoff { get; set; } + public uint ShoeAttackTime { get; set; } + public float DragScuffProbability { get; set; } + public float DirtVolumeOffset { get; set; } + public uint DirtLPFCutoff { get; set; } + public uint DirtAttackTime { get; set; } + public MetaHash DirtSweetenerCurve { get; set; } + public float CreakVolumeOffset { get; set; } + public uint CreakLPFCutoff { get; set; } + public uint CreakAttackTime { get; set; } + public MetaHash CreakSweetenerCurve { get; set; } + public float GlassVolumeOffset { get; set; } + public uint GlassLPFCutoff { get; set; } + public uint GlassAttackTime { get; set; } + public MetaHash GlassSweetenerCurve { get; set; } + public float WetVolumeOffset { get; set; } + public uint WetLPFCutoff { get; set; } + public uint WetAttackTime { get; set; } + public MetaHash WetSweetenerCurve { get; set; } + public float CustomVolumeOffset { get; set; } + public uint CustomLPFCutoff { get; set; } + public uint CustomAttackTime { get; set; } + public float MaterialImpactImpulseScale { get; set; } - public Dat151StealthSettingsItem() + public Dat151ModelFootStepTuningItem() { } - public Dat151StealthSettingsItem(BinaryReader br) + public Dat151ModelFootStepTuningItem(BinaryReader br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadSingle(); - Unk11 = br.ReadInt32(); - Unk12 = br.ReadUInt32();//0 - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadInt32(); - Unk16 = br.ReadUInt32();//0 - Unk17 = br.ReadUInt32(); - Unk18 = br.ReadSingle(); - Unk19 = br.ReadInt32(); - Unk20 = br.ReadInt32(); - Unk21 = br.ReadUInt32(); - Unk22 = br.ReadSingle(); - Unk23 = br.ReadInt32(); - Unk24 = br.ReadUInt32();//0 - Unk25 = br.ReadSingle(); - - if (Unk08 != 0) - { } - if (Unk12 != 0) - { } - if (Unk16 != 0) - { } - if (Unk24 != 0) - { } + ModeName = br.ReadUInt32(); + ShoeVolumeOffset = br.ReadSingle(); + ShoeLPFCutoff = br.ReadUInt32(); + ShoeAttackTime = br.ReadUInt32(); + DragScuffProbability = br.ReadSingle(); + DirtVolumeOffset = br.ReadSingle(); + DirtLPFCutoff = br.ReadUInt32(); + DirtAttackTime = br.ReadUInt32(); + DirtSweetenerCurve = br.ReadUInt32(); + CreakVolumeOffset = br.ReadSingle(); + CreakLPFCutoff = br.ReadUInt32(); + CreakAttackTime = br.ReadUInt32(); + CreakSweetenerCurve = br.ReadUInt32(); + GlassVolumeOffset = br.ReadSingle(); + GlassLPFCutoff = br.ReadUInt32(); + GlassAttackTime = br.ReadUInt32(); + GlassSweetenerCurve = br.ReadUInt32(); + WetVolumeOffset = br.ReadSingle(); + WetLPFCutoff = br.ReadUInt32(); + WetAttackTime = br.ReadUInt32(); + WetSweetenerCurve = br.ReadUInt32(); + CustomVolumeOffset = br.ReadSingle(); + CustomLPFCutoff = br.ReadUInt32(); + CustomAttackTime = br.ReadUInt32(); + MaterialImpactImpulseScale = br.ReadSingle(); } public void Write(BinaryWriter bw) { - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Unk24); - bw.Write(Unk25); + bw.Write(ModeName); + bw.Write(ShoeVolumeOffset); + bw.Write(ShoeLPFCutoff); + bw.Write(ShoeAttackTime); + bw.Write(DragScuffProbability); + bw.Write(DirtVolumeOffset); + bw.Write(DirtLPFCutoff); + bw.Write(DirtAttackTime); + bw.Write(DirtSweetenerCurve); + bw.Write(CreakVolumeOffset); + bw.Write(CreakLPFCutoff); + bw.Write(CreakAttackTime); + bw.Write(CreakSweetenerCurve); + bw.Write(GlassVolumeOffset); + bw.Write(GlassLPFCutoff); + bw.Write(GlassAttackTime); + bw.Write(GlassSweetenerCurve); + bw.Write(WetVolumeOffset); + bw.Write(WetLPFCutoff); + bw.Write(WetAttackTime); + bw.Write(WetSweetenerCurve); + bw.Write(CustomVolumeOffset); + bw.Write(CustomLPFCutoff); + bw.Write(CustomAttackTime); + bw.Write(MaterialImpactImpulseScale); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", FloatUtil.ToString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16)); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.ValueTag(sb, indent, "Unk18", FloatUtil.ToString(Unk18)); - RelXml.ValueTag(sb, indent, "Unk19", Unk19.ToString()); - RelXml.ValueTag(sb, indent, "Unk20", Unk20.ToString()); - RelXml.StringTag(sb, indent, "Unk21", RelXml.HashString(Unk21)); - RelXml.ValueTag(sb, indent, "Unk22", FloatUtil.ToString(Unk22)); - RelXml.ValueTag(sb, indent, "Unk23", Unk23.ToString()); - RelXml.StringTag(sb, indent, "Unk24", RelXml.HashString(Unk24)); - RelXml.ValueTag(sb, indent, "Unk25", FloatUtil.ToString(Unk25)); + RelXml.StringTag(sb, indent, "ModeName", RelXml.HashString(ModeName)); + RelXml.ValueTag(sb, indent, "ShoeVolumeOffset", FloatUtil.ToString(ShoeVolumeOffset)); + RelXml.ValueTag(sb, indent, "ShoeLPFCutoff", ShoeLPFCutoff.ToString()); + RelXml.ValueTag(sb, indent, "ShoeAttackTime", ShoeAttackTime.ToString()); + RelXml.ValueTag(sb, indent, "DragScuffProbability", FloatUtil.ToString(DragScuffProbability)); + RelXml.ValueTag(sb, indent, "DirtVolumeOffset", FloatUtil.ToString(DirtVolumeOffset)); + RelXml.ValueTag(sb, indent, "DirtLPFCutoff", DirtLPFCutoff.ToString()); + RelXml.StringTag(sb, indent, "DirtAttackTime", DirtAttackTime.ToString()); + RelXml.StringTag(sb, indent, "DirtSweetenerCurve", RelXml.HashString(DirtSweetenerCurve)); + RelXml.ValueTag(sb, indent, "CreakVolumeOffset", FloatUtil.ToString(CreakVolumeOffset)); + RelXml.ValueTag(sb, indent, "CreakLPFCutoff", CreakLPFCutoff.ToString()); + RelXml.StringTag(sb, indent, "CreakAttackTime", CreakAttackTime.ToString()); + RelXml.StringTag(sb, indent, "CreakSweetenerCurve", RelXml.HashString(CreakSweetenerCurve)); + RelXml.ValueTag(sb, indent, "GlassVolumeOffset", FloatUtil.ToString(GlassVolumeOffset)); + RelXml.ValueTag(sb, indent, "GlassLPFCutoff", GlassLPFCutoff.ToString()); + RelXml.StringTag(sb, indent, "GlassAttackTime", GlassAttackTime.ToString()); + RelXml.StringTag(sb, indent, "GlassSweetenerCurve", RelXml.HashString(GlassSweetenerCurve)); + RelXml.ValueTag(sb, indent, "WetVolumeOffset", FloatUtil.ToString(WetVolumeOffset)); + RelXml.ValueTag(sb, indent, "WetLPFCutoff", WetLPFCutoff.ToString()); + RelXml.ValueTag(sb, indent, "WetAttackTime", WetAttackTime.ToString()); + RelXml.StringTag(sb, indent, "WetSweetenerCurve", RelXml.HashString(WetSweetenerCurve)); + RelXml.ValueTag(sb, indent, "CustomVolumeOffset", FloatUtil.ToString(CustomVolumeOffset)); + RelXml.ValueTag(sb, indent, "CustomLPFCutoff", CustomLPFCutoff.ToString()); + RelXml.StringTag(sb, indent, "CustomAttackTime", CustomAttackTime.ToString()); + RelXml.ValueTag(sb, indent, "MaterialImpactImpulseScale", FloatUtil.ToString(MaterialImpactImpulseScale)); } public void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = Xml.GetChildFloatAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); - Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildIntAttribute(node, "Unk15", "value"); - Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16")); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = Xml.GetChildFloatAttribute(node, "Unk18", "value"); - Unk19 = Xml.GetChildIntAttribute(node, "Unk19", "value"); - Unk20 = Xml.GetChildIntAttribute(node, "Unk20", "value"); - Unk21 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk21")); - Unk22 = Xml.GetChildFloatAttribute(node, "Unk22", "value"); - Unk23 = Xml.GetChildIntAttribute(node, "Unk23", "value"); - Unk24 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk24")); - Unk25 = Xml.GetChildFloatAttribute(node, "Unk25", "value"); + ModeName = XmlRel.GetHash(Xml.GetChildInnerText(node, "ModeName")); + ShoeVolumeOffset = Xml.GetChildFloatAttribute(node, "ShoeVolumeOffset", "value"); + ShoeLPFCutoff = Xml.GetChildUIntAttribute(node, "ShoeLPFCutoff", "value"); + ShoeAttackTime = Xml.GetChildUIntAttribute(node, "ShoeAttackTime", "value"); + DragScuffProbability = Xml.GetChildFloatAttribute(node, "DragScuffProbability", "value"); + DirtVolumeOffset = Xml.GetChildFloatAttribute(node, "DirtVolumeOffset", "value"); + DirtLPFCutoff = Xml.GetChildUIntAttribute(node, "DirtLPFCutoff", "value"); + DirtAttackTime = Xml.GetChildUIntAttribute(node, "DirtAttackTime", "value"); + DirtSweetenerCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "DirtSweetenerCurve")); + CreakVolumeOffset = Xml.GetChildFloatAttribute(node, "CreakVolumeOffset", "value"); + CreakLPFCutoff = Xml.GetChildUIntAttribute(node, "CreakLPFCutoff", "value"); + CreakAttackTime = Xml.GetChildUIntAttribute(node, "CreakAttackTime", "value"); + CreakSweetenerCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "CreakSweetenerCurve")); + GlassVolumeOffset = Xml.GetChildFloatAttribute(node, "GlassVolumeOffset", "value"); + GlassLPFCutoff = Xml.GetChildUIntAttribute(node, "GlassLPFCutoff", "value"); + GlassAttackTime = Xml.GetChildUIntAttribute(node, "GlassAttackTime", "value"); + GlassSweetenerCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "GlassSweetenerCurve")); + WetVolumeOffset = Xml.GetChildFloatAttribute(node, "WetVolumeOffset", "value"); + WetLPFCutoff = Xml.GetChildUIntAttribute(node, "WetLPFCutoff", "value"); + WetAttackTime = Xml.GetChildUIntAttribute(node, "WetAttackTime", "value"); + WetSweetenerCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "WetSweetenerCurve")); + CustomVolumeOffset = Xml.GetChildFloatAttribute(node, "CustomVolumeOffset", "value"); + CustomLPFCutoff = Xml.GetChildUIntAttribute(node, "CustomLPFCutoff", "value"); + CustomAttackTime = Xml.GetChildUIntAttribute(node, "CustomAttackTime", "value"); + MaterialImpactImpulseScale = Xml.GetChildFloatAttribute(node, "MaterialImpactImpulseScale", "value"); } public override string ToString() { - return Unk01.ToString(); + return ModeName.ToString(); } } - [TC(typeof(EXP))] public class Dat151StealthSettings : Dat151RelData - { - public float Unk01 { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public int ItemCount { get; set; } - public Dat151StealthSettingsItem[] Items { get; set; } - public Dat151StealthSettings(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151ModelFootStepTuning : Dat151RelData + { + public float FootstepPitchRatioMin { get; set; } + public float FootstepPitchRatioMax { get; set; } + public float InLeftPocketProbability { get; set; } + public float HasKeysProbability { get; set; } + public float HasMoneyProbability { get; set; } + public int ItemCount { get; set; } + public Dat151ModelFootStepTuningItem[] Items { get; set; } + + public Dat151ModelFootStepTuning(RelFile rel) : base(rel) { - Type = Dat151RelType.StealthSettings; + Type = Dat151RelType.ModelFootStepTuning; TypeID = (byte)Type; } - public Dat151StealthSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151ModelFootStepTuning(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadSingle(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); + FootstepPitchRatioMin = br.ReadSingle(); + FootstepPitchRatioMax = br.ReadSingle(); + InLeftPocketProbability = br.ReadSingle(); + HasKeysProbability = br.ReadSingle(); + HasMoneyProbability = br.ReadSingle(); + ItemCount = br.ReadInt32(); - Items = new Dat151StealthSettingsItem[ItemCount]; + Items = new Dat151ModelFootStepTuningItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151StealthSettingsItem(br); + Items[i] = new Dat151ModelFootStepTuningItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); + bw.Write(FootstepPitchRatioMin); + bw.Write(FootstepPitchRatioMax); + bw.Write(InLeftPocketProbability); + bw.Write(HasKeysProbability); + bw.Write(HasMoneyProbability); + bw.Write(ItemCount); for (int i = 0; i < ItemCount; i++) { @@ -18527,277 +17925,260 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); + RelXml.ValueTag(sb, indent, "FootstepPitchRatioMin", FloatUtil.ToString(FootstepPitchRatioMin)); + RelXml.ValueTag(sb, indent, "FootstepPitchRatioMax", FloatUtil.ToString(FootstepPitchRatioMax)); + RelXml.ValueTag(sb, indent, "InLeftPocketProbability", FloatUtil.ToString(InLeftPocketProbability)); + RelXml.ValueTag(sb, indent, "HasKeysProbability", FloatUtil.ToString(HasKeysProbability)); + RelXml.ValueTag(sb, indent, "HasMoneyProbability", FloatUtil.ToString(HasMoneyProbability)); RelXml.WriteItemArray(sb, Items, indent, "Items"); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Items = XmlRel.ReadItemArray(node, "Items"); + FootstepPitchRatioMin = Xml.GetChildFloatAttribute(node, "FootstepPitchRatioMin", "value"); + FootstepPitchRatioMax = Xml.GetChildFloatAttribute(node, "FootstepPitchRatioMax", "value"); + InLeftPocketProbability = Xml.GetChildFloatAttribute(node, "InLeftPocketProbability", "value"); + HasKeysProbability = Xml.GetChildFloatAttribute(node, "HasKeysProbability", "value"); + HasMoneyProbability = Xml.GetChildFloatAttribute(node, "HasMoneyProbability", "value"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (Items?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat151Unk99 : Dat151RelData - { - public float Unk01 { get; set; } - public Dat151Unk99(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151SilenceConstraint : Dat151RelData + { + public float MinimumDuration { get; set; } + + public Dat151SilenceConstraint(RelFile rel) : base(rel) { - Type = Dat151RelType.Unk99; + Type = Dat151RelType.SilenceConstraint; TypeID = (byte)Type; } - public Dat151Unk99(RelData d, BinaryReader br) : base(d, br) + public Dat151SilenceConstraint(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MinimumDuration = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); + bw.Write(MinimumDuration); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); + RelXml.ValueTag(sb, indent, "MinimumDuration", FloatUtil.ToString(MinimumDuration)); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); + MinimumDuration = Xml.GetChildFloatAttribute(node, "MinimumDuration", "value"); } } - [TC(typeof(EXP))] public class Dat151Tunnel : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151ReflectionsSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public float Unk01 { get; set; } - public float Unk02 { get; set; } - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public MetaHash In { get; set; } - public MetaHash Out { get; set; } - public MetaHash Unk07 { get; set; } - public float Unk08 { get; set; } - public int Unk09 { get; set; } - public float Unk10 { get; set; } - public int Unk11 { get; set; } - public float Unk12 { get; set; } - public float Unk13 { get; set; } - public float Unk14 { get; set; } - public float Unk15 { get; set; } - public float Unk16 { get; set; } - public float Unk17 { get; set; } - public MetaHash Unk18 { get; set; }//what is this? + public float MinDelay { get; set; } + public float MaxDelay { get; set; } + public float DelayTimeScalar { get; set; } + public float DelayTimeAddition { get; set; } + public MetaHash EnterSound { get; set; } + public MetaHash ExitSound { get; set; } + public MetaHash SubmixVoice { get; set; } + public float Smoothing { get; set; } + public int PostSubmixVolumeAttenuation { get; set; } + public float RollOffScale { get; set; } + public int FilterMode { get; set; } + public float FilterFrequencyMin { get; set; } + public float FilterFrequencyMax { get; set; } + public float FilterResonanceMin { get; set; } + public float FilterResonanceMax { get; set; } + public float FilterBandwidthMin { get; set; } + public float FilterBandwidthMax { get; set; } + public MetaHash DistanceToFilterInput { get; set; } - public Dat151Tunnel(RelFile rel) : base(rel) + public Dat151ReflectionsSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Tunnel; + Type = Dat151RelType.ReflectionsSettings; TypeID = (byte)Type; } - public Dat151Tunnel(RelData d, BinaryReader br) : base(d, br) + public Dat151ReflectionsSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadSingle(); - Unk02 = br.ReadSingle(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - In = br.ReadUInt32(); - Out = br.ReadUInt32(); - Unk07 = br.ReadUInt32(); - Unk08 = br.ReadSingle(); - Unk09 = br.ReadInt32(); - Unk10 = br.ReadSingle(); - Unk11 = br.ReadInt32(); - Unk12 = br.ReadSingle(); - Unk13 = br.ReadSingle(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadSingle(); - Unk16 = br.ReadSingle(); - Unk17 = br.ReadSingle(); - Unk18 = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MinDelay = br.ReadSingle(); + MaxDelay = br.ReadSingle(); + DelayTimeScalar = br.ReadSingle(); + DelayTimeAddition = br.ReadSingle(); + EnterSound = br.ReadUInt32(); + ExitSound = br.ReadUInt32(); + SubmixVoice = br.ReadUInt32(); + Smoothing = br.ReadSingle(); + PostSubmixVolumeAttenuation = br.ReadInt32(); + RollOffScale = br.ReadSingle(); + FilterMode = br.ReadInt32(); + FilterFrequencyMin = br.ReadSingle(); + FilterFrequencyMax = br.ReadSingle(); + FilterResonanceMin = br.ReadSingle(); + FilterResonanceMax = br.ReadSingle(); + FilterBandwidthMin = br.ReadSingle(); + FilterBandwidthMax = br.ReadSingle(); + DistanceToFilterInput = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(In); - bw.Write(Out); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); + bw.Write(MinDelay); + bw.Write(MaxDelay); + bw.Write(DelayTimeScalar); + bw.Write(DelayTimeAddition); + bw.Write(EnterSound); + bw.Write(ExitSound); + bw.Write(SubmixVoice); + bw.Write(Smoothing); + bw.Write(PostSubmixVolumeAttenuation); + bw.Write(RollOffScale); + bw.Write(FilterMode); + bw.Write(FilterFrequencyMin); + bw.Write(FilterFrequencyMax); + bw.Write(FilterResonanceMin); + bw.Write(FilterResonanceMax); + bw.Write(FilterBandwidthMin); + bw.Write(FilterBandwidthMax); + bw.Write(DistanceToFilterInput); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.StringTag(sb, indent, "In", RelXml.HashString(In)); - RelXml.StringTag(sb, indent, "Out", RelXml.HashString(Out)); - RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", FloatUtil.ToString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", FloatUtil.ToString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", FloatUtil.ToString(Unk12)); - RelXml.ValueTag(sb, indent, "Unk13", FloatUtil.ToString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", FloatUtil.ToString(Unk15)); - RelXml.ValueTag(sb, indent, "Unk16", FloatUtil.ToString(Unk16)); - RelXml.ValueTag(sb, indent, "Unk17", FloatUtil.ToString(Unk17)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); + RelXml.ValueTag(sb, indent, "MinDelay", FloatUtil.ToString(MinDelay)); + RelXml.ValueTag(sb, indent, "MaxDelay", FloatUtil.ToString(MaxDelay)); + RelXml.ValueTag(sb, indent, "DelayTimeScalar", FloatUtil.ToString(DelayTimeScalar)); + RelXml.ValueTag(sb, indent, "DelayTimeAddition", FloatUtil.ToString(DelayTimeAddition)); + RelXml.StringTag(sb, indent, "EnterSound", RelXml.HashString(EnterSound)); + RelXml.StringTag(sb, indent, "ExitSound", RelXml.HashString(ExitSound)); + RelXml.StringTag(sb, indent, "SubmixVoice", RelXml.HashString(SubmixVoice)); + RelXml.ValueTag(sb, indent, "Smoothing", FloatUtil.ToString(Smoothing)); + RelXml.ValueTag(sb, indent, "PostSubmixVolumeAttenuation", PostSubmixVolumeAttenuation.ToString()); + RelXml.ValueTag(sb, indent, "RollOffScale", FloatUtil.ToString(RollOffScale)); + RelXml.ValueTag(sb, indent, "FilterMode", FilterMode.ToString()); + RelXml.ValueTag(sb, indent, "FilterFrequencyMin", FloatUtil.ToString(FilterFrequencyMin)); + RelXml.ValueTag(sb, indent, "FilterFrequencyMax", FloatUtil.ToString(FilterFrequencyMax)); + RelXml.ValueTag(sb, indent, "FilterResonanceMin", FloatUtil.ToString(FilterResonanceMin)); + RelXml.ValueTag(sb, indent, "FilterResonanceMax", FloatUtil.ToString(FilterResonanceMax)); + RelXml.ValueTag(sb, indent, "FilterBandwidthMin", FloatUtil.ToString(FilterBandwidthMin)); + RelXml.ValueTag(sb, indent, "FilterBandwidthMax", FloatUtil.ToString(FilterBandwidthMax)); + RelXml.StringTag(sb, indent, "DistanceToFilterInput", RelXml.HashString(DistanceToFilterInput)); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - In = XmlRel.GetHash(Xml.GetChildInnerText(node, "In")); - Out = XmlRel.GetHash(Xml.GetChildInnerText(node, "Out")); - Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07")); - Unk08 = Xml.GetChildFloatAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildFloatAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildFloatAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildFloatAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildFloatAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildFloatAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildFloatAttribute(node, "Unk17", "value"); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); + MinDelay = Xml.GetChildFloatAttribute(node, "MinDelay", "value"); + MaxDelay = Xml.GetChildFloatAttribute(node, "MaxDelay", "value"); + DelayTimeScalar = Xml.GetChildFloatAttribute(node, "DelayTimeScalar", "value"); + DelayTimeAddition = Xml.GetChildFloatAttribute(node, "DelayTimeAddition", "value"); + EnterSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "EnterSound")); + ExitSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ExitSound")); + SubmixVoice = XmlRel.GetHash(Xml.GetChildInnerText(node, "SubmixVoice")); + Smoothing = Xml.GetChildFloatAttribute(node, "Smoothing", "value"); + PostSubmixVolumeAttenuation = Xml.GetChildIntAttribute(node, "PostSubmixVolumeAttenuation", "value"); + RollOffScale = Xml.GetChildFloatAttribute(node, "RollOffScale", "value"); + FilterMode = Xml.GetChildIntAttribute(node, "FilterMode", "value"); + FilterFrequencyMin = Xml.GetChildFloatAttribute(node, "FilterFrequencyMin", "value"); + FilterFrequencyMax = Xml.GetChildFloatAttribute(node, "FilterFrequencyMax", "value"); + FilterResonanceMin = Xml.GetChildFloatAttribute(node, "FilterResonanceMin", "value"); + FilterResonanceMax = Xml.GetChildFloatAttribute(node, "FilterResonanceMax", "value"); + FilterBandwidthMin = Xml.GetChildFloatAttribute(node, "FilterBandwidthMin", "value"); + FilterBandwidthMax = Xml.GetChildFloatAttribute(node, "FilterBandwidthMax", "value"); + DistanceToFilterInput = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistanceToFilterInput")); } public override MetaHash[] GetSoundHashes() { - return new[] { In, Out, Unk07 }; + return new[] { EnterSound, ExitSound, SubmixVoice }; } } - [TC(typeof(EXP))] public class Dat151Alarm : Dat151RelData - { - public MetaHash DistantAlarm { get; set; } - public MetaHash Curve { get; set; } - public int Unk03 { get; set; } - public MetaHash Interior { get; set; }//interior name: v_jewel2 - public MetaHash Alarm { get; set; }//alarm sound: script/alarm_bell_01 - public MetaHash Unk04 { get; set; }//0 - public MetaHash Unk05 { get; set; }//0 - public Vector3 Position { get; set; } - public MetaHash Unk06 { get; set; }//0 - public Dat151Alarm(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151AlarmSettings : Dat151RelData + { + public MetaHash AlarmLoop { get; set; } + public MetaHash AlarmDecayCurve { get; set; } + public uint StopDistance { get; set; } + public MetaHash InteriorSettings { get; set; } + public MetaHash BankName { get; set; } + public uint padding00 { get; set; } + public uint padding01 { get; set; } + public Vector3 Position { get; set; } + public uint padding02 { get; set; } + + public Dat151AlarmSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Alarm; + Type = Dat151RelType.AlarmSettings; TypeID = (byte)Type; } - public Dat151Alarm(RelData d, BinaryReader br) : base(d, br) + public Dat151AlarmSettings(RelData d, BinaryReader br) : base(d, br) { - DistantAlarm = br.ReadUInt32(); - Curve = br.ReadUInt32(); - Unk03 = br.ReadInt32(); - Interior = br.ReadUInt32();//interior name: v_jewel2 - Alarm = br.ReadUInt32();//alarm sound: script/alarm_bell_01 - Unk04 = br.ReadUInt32();//0 - Unk05 = br.ReadUInt32();//0 + AlarmLoop = br.ReadUInt32(); + AlarmDecayCurve = br.ReadUInt32(); + StopDistance = br.ReadUInt32(); + InteriorSettings = br.ReadUInt32(); + BankName = br.ReadUInt32(); + padding00 = br.ReadUInt32(); + padding01 = br.ReadUInt32(); Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Unk06 = br.ReadUInt32();//0 - - if (Unk04 != 0) - { } - if (Unk05 != 0) - { } - if (Unk06 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + padding02 = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(DistantAlarm); - bw.Write(Curve); - bw.Write(Unk03); - bw.Write(Interior); - bw.Write(Alarm); - bw.Write(Unk04); - bw.Write(Unk05); + bw.Write(AlarmLoop); + bw.Write(AlarmDecayCurve); + bw.Write(StopDistance); + bw.Write(InteriorSettings); + bw.Write(BankName); + bw.Write(padding00); + bw.Write(padding01); bw.Write(Position.X); bw.Write(Position.Y); bw.Write(Position.Z); - bw.Write(Unk06); + bw.Write(padding02); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "DistantAlarm", RelXml.HashString(DistantAlarm)); - RelXml.StringTag(sb, indent, "Curve", RelXml.HashString(Curve)); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.StringTag(sb, indent, "Interior", RelXml.HashString(Interior)); - RelXml.StringTag(sb, indent, "Alarm", RelXml.HashString(Alarm)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); + RelXml.StringTag(sb, indent, "AlarmLoop", RelXml.HashString(AlarmLoop)); + RelXml.StringTag(sb, indent, "AlarmDecayCurve", RelXml.HashString(AlarmDecayCurve)); + RelXml.ValueTag(sb, indent, "StopDistance", StopDistance.ToString()); + RelXml.StringTag(sb, indent, "InteriorSettings", RelXml.HashString(InteriorSettings)); + RelXml.StringTag(sb, indent, "BankName", RelXml.HashString(BankName)); RelXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position)); - RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06)); } public override void ReadXml(XmlNode node) { - DistantAlarm = XmlRel.GetHash(Xml.GetChildInnerText(node, "DistantAlarm")); - Curve = XmlRel.GetHash(Xml.GetChildInnerText(node, "Curve")); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Interior = XmlRel.GetHash(Xml.GetChildInnerText(node, "Interior")); - Alarm = XmlRel.GetHash(Xml.GetChildInnerText(node, "Alarm")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); + AlarmLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "AlarmLoop")); + AlarmDecayCurve = XmlRel.GetHash(Xml.GetChildInnerText(node, "AlarmDecayCurve")); + StopDistance = Xml.GetChildUIntAttribute(node, "StopDistance", "value"); + InteriorSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "InteriorSettings")); + BankName = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankName")); Position = Xml.GetChildVector3Attributes(node, "Position"); - Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06")); } public override MetaHash[] GetCurveHashes() { - return new[] { Curve }; + return new[] { AlarmDecayCurve }; } public override MetaHash[] GetSoundHashes() { - return new[] { DistantAlarm }; + return new[] { AlarmLoop }; } } - [TC(typeof(EXP))] public class Dat151SlowMoSettings : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151SlowMoSettings : Dat151RelData { public MetaHash Scene { get; set; } - public int Unk02 { get; set; } - public MetaHash Unk03 { get; set; }//0 - public MetaHash Unk04 { get; set; } + public int Priority { get; set; } + public float Release { get; set; } + public MetaHash SlowMoSound { get; set; } public Dat151SlowMoSettings(RelFile rel) : base(rel) { @@ -18807,39 +18188,32 @@ namespace CodeWalker.GameFiles public Dat151SlowMoSettings(RelData d, BinaryReader br) : base(d, br) { Scene = br.ReadUInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadUInt32();//0 - Unk04 = br.ReadUInt32(); - - if (Unk03 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Priority = br.ReadInt32(); + Release = br.ReadSingle(); + SlowMoSound = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Scene); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); + bw.Write(Priority); + bw.Write(Release); + bw.Write(SlowMoSound); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Scene", RelXml.HashString(Scene)); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); - RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04)); + RelXml.ValueTag(sb, indent, "Priority", Priority.ToString()); + RelXml.ValueTag(sb, indent, "Release", FloatUtil.ToString(Release)); + RelXml.StringTag(sb, indent, "SlowMoSound", RelXml.HashString(SlowMoSound)); } public override void ReadXml(XmlNode node) { Scene = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scene")); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); - Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04")); + Priority = Xml.GetChildIntAttribute(node, "Priority", "value"); + Release = Xml.GetChildFloatAttribute(node, "Release", "value"); + SlowMoSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SlowMoSound")); } public override MetaHash[] GetMixerHashes() { @@ -18847,48 +18221,48 @@ namespace CodeWalker.GameFiles } public override MetaHash[] GetSoundHashes() { - return new[] { Unk04 }; + return new[] { SlowMoSound }; } } - [TC(typeof(EXP))] public class Dat151Scenario : Dat151RelData //eg world_human_musician + + [TC(typeof(EXP))] + public class Dat151PedScenarioAudioSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public int Unk01 { get; set; } + public int MaxInstances { get; set; } public MetaHash Sound { get; set; } - public float Unk03 { get; set; } + public float SharedOwnershipRadius { get; set; } public int VariationsCount { get; set; } - public Dat151ScenarioItem[] Variations { get; set; } + public Dat151PedScenarioAudioSettingsItem[] Variations { get; set; } - public Dat151Scenario(RelFile rel) : base(rel) + public Dat151PedScenarioAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Scenario; + Type = Dat151RelType.PedScenarioAudioSettings; TypeID = (byte)Type; } - public Dat151Scenario(RelData d, BinaryReader br) : base(d, br) + public Dat151PedScenarioAudioSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadInt32(); + MaxInstances = br.ReadInt32(); Sound = br.ReadUInt32(); - Unk03 = br.ReadSingle(); + SharedOwnershipRadius = br.ReadSingle(); + VariationsCount = br.ReadInt32(); - Variations = new Dat151ScenarioItem[VariationsCount]; + Variations = new Dat151PedScenarioAudioSettingsItem[VariationsCount]; for (int i = 0; i < VariationsCount; i++) { - Variations[i] = new Dat151ScenarioItem(br); + Variations[i] = new Dat151PedScenarioAudioSettingsItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); + bw.Write(MaxInstances); bw.Write(Sound); - bw.Write(Unk03); + bw.Write(SharedOwnershipRadius); + bw.Write(VariationsCount); for (int i = 0; i < VariationsCount; i++) { @@ -18898,18 +18272,18 @@ namespace CodeWalker.GameFiles public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); + RelXml.ValueTag(sb, indent, "MaxInstances", MaxInstances.ToString()); RelXml.StringTag(sb, indent, "Sound", RelXml.HashString(Sound)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); + RelXml.ValueTag(sb, indent, "SharedOwnershipRadius", FloatUtil.ToString(SharedOwnershipRadius)); RelXml.WriteItemArray(sb, Variations, indent, "Variations"); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); + MaxInstances = Xml.GetChildIntAttribute(node, "MaxInstances", "value"); Sound = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sound")); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Variations = XmlRel.ReadItemArray(node, "Variations"); + SharedOwnershipRadius = Xml.GetChildFloatAttribute(node, "SharedOwnershipRadius", "value"); + Variations = XmlRel.ReadItemArray(node, "Variations"); VariationsCount = (Variations?.Length ?? 0); } public override MetaHash[] GetSoundHashes() @@ -18928,12 +18302,12 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] - public struct Dat151ScenarioItem : IMetaXmlItem + public struct Dat151PedScenarioAudioSettingsItem : IMetaXmlItem { public MetaHash Prop { get; set; } public MetaHash Sound { get; set; } - public Dat151ScenarioItem(BinaryReader br) + public Dat151PedScenarioAudioSettingsItem(BinaryReader br) { Prop = br.ReadUInt32(); Sound = br.ReadUInt32(); @@ -18958,7 +18332,9 @@ namespace CodeWalker.GameFiles return Prop.ToString() + ": " + Sound.ToString(); } } - [TC(typeof(EXP))] public class Dat151PortalSettings : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151PortalSettings : Dat151RelData { //used in conjunction with the 'SET_PORTAL_SETTINGS_OVERRIDE' //and 'REMOVE_PORTAL_SETTINGS_OVERRIDE' natives to do real time changes to audio occlusion for interior portals. @@ -18973,10 +18349,6 @@ namespace CodeWalker.GameFiles public Dat151PortalSettings(RelData d, BinaryReader br) : base(d, br) { MaxOcclusion = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -18993,325 +18365,318 @@ namespace CodeWalker.GameFiles MaxOcclusion = Xml.GetChildFloatAttribute(node, "MaxOcclusion", "value"); } } - [TC(typeof(EXP))] public class Dat151ElectricEngine : Dat151RelData - { - public int Unk01 { get; set; } - public MetaHash Transmission { get; set; } //hybrid_tezeract_transmission - public int Unk03 { get; set; } - public int Unk04 { get; set; } - public int Unk05 { get; set; } - public MetaHash Turbo { get; set; } //hybrid_tezeract_turbo_whine - public int Unk07 { get; set; } - public int Unk08 { get; set; } - public int Unk09 { get; set; } - public int Unk10 { get; set; } - public MetaHash RevsOff { get; set; } //streamed_vehicles_hybrid_hybrid_gas_revs_off - public int Unk12 { get; set; } - public int Unk13 { get; set; } - public int Unk14 { get; set; } - public MetaHash Unk15 { get; set; } //idle loop..? - public MetaHash Start { get; set; } //streamed_vehicles_hybrid_voltic_start - public Dat151ElectricEngine(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151ElectricEngineAudioSettings : Dat151RelData + { + public uint MasterVolume { get; set; } + public MetaHash SpeedLoop { get; set; } + public int SpeedLoop_MinPitch { get; set; } + public int SpeedLoop_MaxPitch { get; set; } + public int SpeedLoop_ThrottleVol { get; set; } + public MetaHash BoostLoop { get; set; } + public int BoostLoop_MinPitch { get; set; } + public int BoostLoop_MaxPitch { get; set; } + public int BoostLoop_SpinupSpeed { get; set; } + public int BoostLoop_Vol { get; set; } + public MetaHash RevsOffLoop { get; set; } + public int RevsOffLoop_MinPitch { get; set; } + public int RevsOffLoop_MaxPitch { get; set; } + public int RevsOffLoop_Vol { get; set; } + public MetaHash BankLoadSound { get; set; } + public MetaHash EngineStartUp { get; set; } + + public Dat151ElectricEngineAudioSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.ElectricEngine; + Type = Dat151RelType.ElectricEngineAudioSettings; TypeID = (byte)Type; } - public Dat151ElectricEngine(RelData d, BinaryReader br) : base(d, br) + public Dat151ElectricEngineAudioSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Transmission = br.ReadUInt32(); - Unk03 = br.ReadInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadInt32(); - Turbo = br.ReadUInt32(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadInt32(); - Unk09 = br.ReadInt32(); - Unk10 = br.ReadInt32(); - RevsOff = br.ReadUInt32(); - Unk12 = br.ReadInt32(); - Unk13 = br.ReadInt32(); - Unk14 = br.ReadInt32(); - Unk15 = br.ReadUInt32(); - Start = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MasterVolume = br.ReadUInt32(); + SpeedLoop = br.ReadUInt32(); + SpeedLoop_MinPitch = br.ReadInt32(); + SpeedLoop_MaxPitch = br.ReadInt32(); + SpeedLoop_ThrottleVol = br.ReadInt32(); + BoostLoop = br.ReadUInt32(); + BoostLoop_MinPitch = br.ReadInt32(); + BoostLoop_MaxPitch = br.ReadInt32(); + BoostLoop_SpinupSpeed = br.ReadInt32(); + BoostLoop_Vol = br.ReadInt32(); + RevsOffLoop = br.ReadUInt32(); + RevsOffLoop_MinPitch = br.ReadInt32(); + RevsOffLoop_MaxPitch = br.ReadInt32(); + RevsOffLoop_Vol = br.ReadInt32(); + BankLoadSound = br.ReadUInt32(); + EngineStartUp = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Transmission); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Turbo); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(RevsOff); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Start); + bw.Write(MasterVolume); + bw.Write(SpeedLoop); + bw.Write(SpeedLoop_MinPitch); + bw.Write(SpeedLoop_MaxPitch); + bw.Write(SpeedLoop_ThrottleVol); + bw.Write(BoostLoop); + bw.Write(BoostLoop_MinPitch); + bw.Write(BoostLoop_MaxPitch); + bw.Write(BoostLoop_SpinupSpeed); + bw.Write(BoostLoop_Vol); + bw.Write(RevsOffLoop); + bw.Write(RevsOffLoop_MinPitch); + bw.Write(RevsOffLoop_MaxPitch); + bw.Write(RevsOffLoop_Vol); + bw.Write(BankLoadSound); + bw.Write(EngineStartUp); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.StringTag(sb, indent, "Transmission", RelXml.HashString(Transmission)); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.StringTag(sb, indent, "Turbo", RelXml.HashString(Turbo)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.StringTag(sb, indent, "RevsOff", RelXml.HashString(RevsOff)); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15)); - RelXml.StringTag(sb, indent, "Start", RelXml.HashString(Start)); + RelXml.ValueTag(sb, indent, "MasterVolume", MasterVolume.ToString()); + RelXml.StringTag(sb, indent, "SpeedLoop", RelXml.HashString(SpeedLoop)); + RelXml.ValueTag(sb, indent, "SpeedLoop_MinPitch", SpeedLoop_MinPitch.ToString()); + RelXml.ValueTag(sb, indent, "SpeedLoop_MaxPitch", SpeedLoop_MaxPitch.ToString()); + RelXml.ValueTag(sb, indent, "SpeedLoop_ThrottleVol", SpeedLoop_ThrottleVol.ToString()); + RelXml.StringTag(sb, indent, "BoostLoop", RelXml.HashString(BoostLoop)); + RelXml.ValueTag(sb, indent, "BoostLoop_MinPitch", BoostLoop_MinPitch.ToString()); + RelXml.ValueTag(sb, indent, "BoostLoop_MaxPitch", BoostLoop_MaxPitch.ToString()); + RelXml.ValueTag(sb, indent, "BoostLoop_SpinupSpeed", BoostLoop_SpinupSpeed.ToString()); + RelXml.ValueTag(sb, indent, "BoostLoop_Vol", BoostLoop_Vol.ToString()); + RelXml.StringTag(sb, indent, "RevsOffLoop", RelXml.HashString(RevsOffLoop)); + RelXml.ValueTag(sb, indent, "RevsOffLoop_MinPitch", RevsOffLoop_MinPitch.ToString()); + RelXml.ValueTag(sb, indent, "RevsOffLoop_MaxPitch", RevsOffLoop_MaxPitch.ToString()); + RelXml.ValueTag(sb, indent, "RevsOffLoop_Vol", RevsOffLoop_Vol.ToString()); + RelXml.StringTag(sb, indent, "BankLoadSound", RelXml.HashString(BankLoadSound)); + RelXml.StringTag(sb, indent, "EngineStartUp", RelXml.HashString(EngineStartUp)); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Transmission = XmlRel.GetHash(Xml.GetChildInnerText(node, "Transmission")); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildIntAttribute(node, "Unk05", "value"); - Turbo = XmlRel.GetHash(Xml.GetChildInnerText(node, "Turbo")); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - RevsOff = XmlRel.GetHash(Xml.GetChildInnerText(node, "RevsOff")); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildIntAttribute(node, "Unk14", "value"); - Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15")); - Start = XmlRel.GetHash(Xml.GetChildInnerText(node, "Start")); + MasterVolume = Xml.GetChildUIntAttribute(node, "MasterVolume", "value"); + SpeedLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "SpeedLoop")); + SpeedLoop_MinPitch = Xml.GetChildIntAttribute(node, "SpeedLoop_MinPitch", "value"); + SpeedLoop_MaxPitch = Xml.GetChildIntAttribute(node, "SpeedLoop_MaxPitch", "value"); + SpeedLoop_ThrottleVol = Xml.GetChildIntAttribute(node, "SpeedLoop_ThrottleVol", "value"); + BoostLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "BoostLoop")); + BoostLoop_MinPitch = Xml.GetChildIntAttribute(node, "BoostLoop_MinPitch", "value"); + BoostLoop_MaxPitch = Xml.GetChildIntAttribute(node, "BoostLoop_MaxPitch", "value"); + BoostLoop_SpinupSpeed = Xml.GetChildIntAttribute(node, "BoostLoop_SpinupSpeed", "value"); + BoostLoop_Vol = Xml.GetChildIntAttribute(node, "BoostLoop_Vol", "value"); + RevsOffLoop = XmlRel.GetHash(Xml.GetChildInnerText(node, "RevsOffLoop")); + RevsOffLoop_MinPitch = Xml.GetChildIntAttribute(node, "RevsOffLoop_MinPitch", "value"); + RevsOffLoop_MaxPitch = Xml.GetChildIntAttribute(node, "RevsOffLoop_MaxPitch", "value"); + RevsOffLoop_Vol = Xml.GetChildIntAttribute(node, "RevsOffLoop_Vol", "value"); + BankLoadSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "BankLoadSound")); + EngineStartUp = XmlRel.GetHash(Xml.GetChildInnerText(node, "EngineStartUp")); } public override MetaHash[] GetSoundHashes() { - return new[] { Transmission, Turbo, RevsOff, Unk15, Start }; + return new[] { SpeedLoop, BoostLoop, RevsOffLoop, BankLoadSound, EngineStartUp }; } } - [TC(typeof(EXP))] public class Dat151BreathSettings : Dat151RelData - { - public int Unk01 { get; set; } - public int Unk02 { get; set; } - public int Unk03 { get; set; }//0 - public int Unk04 { get; set; } - public int Unk05 { get; set; } - public int Unk06 { get; set; } - public int Unk07 { get; set; } - public int Unk08 { get; set; } - public int Unk09 { get; set; } - public int Unk10 { get; set; } - public int Unk11 { get; set; } - public int Unk12 { get; set; } - public int Unk13 { get; set; } - public int Unk14 { get; set; } - public int Unk15 { get; set; } - public int Unk16 { get; set; } - public int Unk17 { get; set; } - public int Unk18 { get; set; } - public Dat151BreathSettings(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151PlayerBreathingSettings : Dat151RelData + { + public int TimeBetweenLowRunBreaths { get; set; } + public int TimeBetweenHighRunBreaths { get; set; } + public int TimeBetweenExhaustedBreaths { get; set; } + public int TimeBetweenFinalBreaths { get; set; } + public int MinBreathStateChangeWaitToLow { get; set; } + public int MaxBreathStateChangeWaitToLow { get; set; } + public int MinBreathStateChangeLowToHighFromWait { get; set; } + public int MaxBreathStateChangeLowToHighFromWait { get; set; } + public int MinBreathStateChangeHighToLowFromLow { get; set; } + public int MaxBreathStateChangeHighToLowFromLow { get; set; } + public int MinBreathStateChangeLowToHighFromHigh { get; set; } + public int MaxBreathStateChangeLowToHighFromHigh { get; set; } + public int MinBreathStateChangeExhaustedToIdleFromLow { get; set; } + public int MaxBreathStateChangeExhaustedToIdleFromLow { get; set; } + public int MinBreathStateChangeExhaustedToIdleFromHigh { get; set; } + public int MaxBreathStateChangeExhaustedToIdleFromHigh { get; set; } + public int MinBreathStateChangeLowToHighFromExhausted { get; set; } + public int MaxBreathStateChangeLowToHighFromExhausted { get; set; } + + public Dat151PlayerBreathingSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.BreathSettings; + Type = Dat151RelType.PlayerBreathingSettings; TypeID = (byte)Type; } - public Dat151BreathSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151PlayerBreathingSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadInt32();//0 - Unk04 = br.ReadInt32(); - Unk05 = br.ReadInt32(); - Unk06 = br.ReadInt32(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadInt32(); - Unk09 = br.ReadInt32(); - Unk10 = br.ReadInt32(); - Unk11 = br.ReadInt32(); - Unk12 = br.ReadInt32(); - Unk13 = br.ReadInt32(); - Unk14 = br.ReadInt32(); - Unk15 = br.ReadInt32(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadInt32(); - Unk18 = br.ReadInt32(); - - if (Unk03 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + TimeBetweenLowRunBreaths = br.ReadInt32(); + TimeBetweenHighRunBreaths = br.ReadInt32(); + TimeBetweenExhaustedBreaths = br.ReadInt32(); + TimeBetweenFinalBreaths = br.ReadInt32(); + MinBreathStateChangeWaitToLow = br.ReadInt32(); + MaxBreathStateChangeWaitToLow = br.ReadInt32(); + MinBreathStateChangeLowToHighFromWait = br.ReadInt32(); + MaxBreathStateChangeLowToHighFromWait = br.ReadInt32(); + MinBreathStateChangeHighToLowFromLow = br.ReadInt32(); + MaxBreathStateChangeHighToLowFromLow = br.ReadInt32(); + MinBreathStateChangeLowToHighFromHigh = br.ReadInt32(); + MaxBreathStateChangeLowToHighFromHigh = br.ReadInt32(); + MinBreathStateChangeExhaustedToIdleFromLow = br.ReadInt32(); + MaxBreathStateChangeExhaustedToIdleFromLow = br.ReadInt32(); + MinBreathStateChangeExhaustedToIdleFromHigh = br.ReadInt32(); + MaxBreathStateChangeExhaustedToIdleFromHigh = br.ReadInt32(); + MinBreathStateChangeLowToHighFromExhausted = br.ReadInt32(); + MaxBreathStateChangeLowToHighFromExhausted = br.ReadInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); + bw.Write(TimeBetweenLowRunBreaths); + bw.Write(TimeBetweenHighRunBreaths); + bw.Write(TimeBetweenExhaustedBreaths); + bw.Write(TimeBetweenFinalBreaths); + bw.Write(MinBreathStateChangeWaitToLow); + bw.Write(MaxBreathStateChangeWaitToLow); + bw.Write(MinBreathStateChangeLowToHighFromWait); + bw.Write(MaxBreathStateChangeLowToHighFromWait); + bw.Write(MinBreathStateChangeHighToLowFromLow); + bw.Write(MaxBreathStateChangeHighToLowFromLow); + bw.Write(MinBreathStateChangeLowToHighFromHigh); + bw.Write(MaxBreathStateChangeLowToHighFromHigh); + bw.Write(MinBreathStateChangeExhaustedToIdleFromLow); + bw.Write(MaxBreathStateChangeExhaustedToIdleFromLow); + bw.Write(MinBreathStateChangeExhaustedToIdleFromHigh); + bw.Write(MaxBreathStateChangeExhaustedToIdleFromHigh); + bw.Write(MinBreathStateChangeLowToHighFromExhausted); + bw.Write(MaxBreathStateChangeLowToHighFromExhausted); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.ValueTag(sb, indent, "Unk18", Unk18.ToString()); + RelXml.ValueTag(sb, indent, "TimeBetweenLowRunBreaths", TimeBetweenLowRunBreaths.ToString()); + RelXml.ValueTag(sb, indent, "TimeBetweenHighRunBreaths", TimeBetweenHighRunBreaths.ToString()); + RelXml.ValueTag(sb, indent, "TimeBetweenExhaustedBreaths", TimeBetweenExhaustedBreaths.ToString()); + RelXml.ValueTag(sb, indent, "TimeBetweenFinalBreaths", TimeBetweenFinalBreaths.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeWaitToLow", MinBreathStateChangeWaitToLow.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeWaitToLow", MaxBreathStateChangeWaitToLow.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeLowToHighFromWait", MinBreathStateChangeLowToHighFromWait.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeLowToHighFromWait", MaxBreathStateChangeLowToHighFromWait.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeHighToLowFromLow", MinBreathStateChangeHighToLowFromLow.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeHighToLowFromLow", MaxBreathStateChangeHighToLowFromLow.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeLowToHighFromHigh", MinBreathStateChangeLowToHighFromHigh.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeLowToHighFromHigh", MaxBreathStateChangeLowToHighFromHigh.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeExhaustedToIdleFromLow", MinBreathStateChangeExhaustedToIdleFromLow.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeExhaustedToIdleFromLow", MaxBreathStateChangeExhaustedToIdleFromLow.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeExhaustedToIdleFromHigh", MinBreathStateChangeExhaustedToIdleFromHigh.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeExhaustedToIdleFromHigh", MaxBreathStateChangeExhaustedToIdleFromHigh.ToString()); + RelXml.ValueTag(sb, indent, "MinBreathStateChangeLowToHighFromExhausted", MinBreathStateChangeLowToHighFromExhausted.ToString()); + RelXml.ValueTag(sb, indent, "MaxBreathStateChangeLowToHighFromExhausted", MaxBreathStateChangeLowToHighFromExhausted.ToString()); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildIntAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildIntAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildIntAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildIntAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildIntAttribute(node, "Unk17", "value"); - Unk18 = Xml.GetChildIntAttribute(node, "Unk18", "value"); + TimeBetweenLowRunBreaths = Xml.GetChildIntAttribute(node, "TimeBetweenLowRunBreaths", "value"); + TimeBetweenHighRunBreaths = Xml.GetChildIntAttribute(node, "TimeBetweenHighRunBreaths", "value"); + TimeBetweenExhaustedBreaths = Xml.GetChildIntAttribute(node, "TimeBetweenExhaustedBreaths", "value"); + TimeBetweenFinalBreaths = Xml.GetChildIntAttribute(node, "TimeBetweenFinalBreaths", "value"); + MinBreathStateChangeWaitToLow = Xml.GetChildIntAttribute(node, "MinBreathStateChangeWaitToLow", "value"); + MaxBreathStateChangeWaitToLow = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeWaitToLow", "value"); + MinBreathStateChangeLowToHighFromWait = Xml.GetChildIntAttribute(node, "MinBreathStateChangeLowToHighFromWait", "value"); + MaxBreathStateChangeLowToHighFromWait = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeLowToHighFromWait", "value"); + MinBreathStateChangeHighToLowFromLow = Xml.GetChildIntAttribute(node, "MinBreathStateChangeHighToLowFromLow", "value"); + MaxBreathStateChangeHighToLowFromLow = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeHighToLowFromLow", "value"); + MinBreathStateChangeLowToHighFromHigh = Xml.GetChildIntAttribute(node, "MinBreathStateChangeLowToHighFromHigh", "value"); + MaxBreathStateChangeLowToHighFromHigh = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeLowToHighFromHigh", "value"); + MinBreathStateChangeExhaustedToIdleFromLow = Xml.GetChildIntAttribute(node, "MinBreathStateChangeExhaustedToIdleFromLow", "value"); + MaxBreathStateChangeExhaustedToIdleFromLow = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeExhaustedToIdleFromLow", "value"); + MinBreathStateChangeExhaustedToIdleFromHigh = Xml.GetChildIntAttribute(node, "MinBreathStateChangeExhaustedToIdleFromHigh", "value"); + MaxBreathStateChangeExhaustedToIdleFromHigh = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeExhaustedToIdleFromHigh", "value"); + MinBreathStateChangeLowToHighFromExhausted = Xml.GetChildIntAttribute(node, "MinBreathStateChangeLowToHighFromExhausted", "value"); + MaxBreathStateChangeLowToHighFromExhausted = Xml.GetChildIntAttribute(node, "MaxBreathStateChangeLowToHighFromExhausted", "value"); } } - [TC(typeof(EXP))] public class Dat151WallaSpeechItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151PedWallaSpeechSettingsItem : IMetaXmlItem { - public string Name { get; set; } //eg AGREE_ACROSS_STREET - public byte Unk1 { get; set; }// 1 or 255(-1?) + public string ContextName { get; set; } + public byte Variations { get; set; } public override string ToString() { - return Name + ", " + Unk1.ToString(); + return ContextName + ", " + Variations.ToString(); } - public Dat151WallaSpeechItem() + public Dat151PedWallaSpeechSettingsItem() { } - public Dat151WallaSpeechItem(BinaryReader br) + public Dat151PedWallaSpeechSettingsItem(BinaryReader br) { var data = br.ReadBytes(32); - Name = Encoding.ASCII.GetString(data).Replace("\0", ""); - Unk1 = br.ReadByte(); + ContextName = Encoding.ASCII.GetString(data).Replace("\0", ""); + Variations = br.ReadByte(); } public void Write(BinaryWriter bw) { var data = new byte[32]; - int len = Math.Min(Name?.Length ?? 0, 32); + int len = Math.Min(ContextName?.Length ?? 0, 32); if (len > 0) { - Encoding.ASCII.GetBytes(Name, 0, len, data, 0); + Encoding.ASCII.GetBytes(ContextName, 0, len, data, 0); } bw.Write(data); - bw.Write(Unk1); + bw.Write(Variations); } public void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Name", Name.Replace("\n", "\\n"));//hacky escape - RelXml.ValueTag(sb, indent, "Unk1", Unk1.ToString()); + RelXml.StringTag(sb, indent, "ContextName", ContextName.Replace("\n", "\\n")); + RelXml.ValueTag(sb, indent, "Variations", Variations.ToString()); } public void ReadXml(XmlNode node) { - Name = Xml.GetChildInnerText(node, "Name").Replace("\\n", "\n");//hacky unescape - Unk1 = (byte)Xml.GetChildUIntAttribute(node, "Unk1", "value"); + ContextName = Xml.GetChildInnerText(node, "ContextName").Replace("\\n", "\n"); + Variations = (byte)Xml.GetChildUIntAttribute(node, "Variations", "value"); } } - [TC(typeof(EXP))] public class Dat151WallaSpeech : Dat151RelData //conversation/speech related - for scenarios? - { - public MetaHash Unk01 { get; set; } - public short Unk02 { get; set; } - public short Unk03 { get; set; } - public float Unk04 { get; set; } - public byte ItemCount { get; set; } - public Dat151WallaSpeechItem[] Items { get; set; } - public Dat151WallaSpeech(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151PedWallaSpeechSettings : Dat151RelData + { + public MetaHash SpeechSound { get; set; } + public short VolumeAboveRMSLevel { get; set; } + public short MaxVolume { get; set; } + public float PedDensityThreshold { get; set; } + public byte ItemCount { get; set; } + public Dat151PedWallaSpeechSettingsItem[] Items { get; set; } + + public Dat151PedWallaSpeechSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.WallaSpeech; + Type = Dat151RelType.PedWallaSpeechSettings; TypeID = (byte)Type; } - public Dat151WallaSpeech(RelData d, BinaryReader br) : base(d, br) + public Dat151PedWallaSpeechSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadInt16(); - Unk03 = br.ReadInt16(); - Unk04 = br.ReadSingle(); + SpeechSound = br.ReadUInt32(); + VolumeAboveRMSLevel = br.ReadInt16(); + MaxVolume = br.ReadInt16(); + PedDensityThreshold = br.ReadSingle(); ItemCount = br.ReadByte(); - Items = new Dat151WallaSpeechItem[ItemCount]; + Items = new Dat151PedWallaSpeechSettingsItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151WallaSpeechItem(br); + Items[i] = new Dat151PedWallaSpeechSettingsItem(br); } var brem = (4 - ((ItemCount + 1) % 4)) % 4; - var pads = br.ReadBytes(brem); //read padding bytes + var pads = br.ReadBytes(brem); foreach (var b in pads) { if (b != 0) - { } //just make sure all pad bytes are 0.. + { } } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); + bw.Write(SpeechSound); + bw.Write(VolumeAboveRMSLevel); + bw.Write(MaxVolume); + bw.Write(PedDensityThreshold); bw.Write(ItemCount); for (int i = 0; i < ItemCount; i++) { @@ -19321,91 +18686,93 @@ namespace CodeWalker.GameFiles var brem = (4 - ((ItemCount + 1) % 4)) % 4; for (int i = 0; i < brem; i++) { - bw.Write((byte)0); //write padding bytes.. + bw.Write((byte)0); } } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); + RelXml.StringTag(sb, indent, "SpeechSound", RelXml.HashString(SpeechSound)); + RelXml.ValueTag(sb, indent, "VolumeAboveRMSLevel", VolumeAboveRMSLevel.ToString()); + RelXml.ValueTag(sb, indent, "MaxVolume", MaxVolume.ToString()); + RelXml.ValueTag(sb, indent, "PedDensityThreshold", FloatUtil.ToString(PedDensityThreshold)); RelXml.WriteItemArray(sb, Items, indent, "Items"); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = (short)Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = (short)Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Items = XmlRel.ReadItemArray(node, "Items"); + SpeechSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "SpeechSound")); + VolumeAboveRMSLevel = (short)Xml.GetChildIntAttribute(node, "VolumeAboveRMSLevel", "value"); + MaxVolume = (short)Xml.GetChildIntAttribute(node, "MaxVolume", "value"); + PedDensityThreshold = Xml.GetChildFloatAttribute(node, "PedDensityThreshold", "value"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (byte)(Items?.Length ?? 0); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01 }; + return new[] { SpeechSound }; } } - [TC(typeof(EXP))] public class Dat151AircraftWarningSettings : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151AircraftWarningSettings : Dat151RelData { - public int Unk01 { get; set; } - public MetaHash Unk02 { get; set; }//0 - public int Unk03 { get; set; } - public int Unk04 { get; set; } - public MetaHash Unk05 { get; set; }//0 - public int Unk06 { get; set; } - public int Unk07 { get; set; } - public MetaHash Unk08 { get; set; }//0 - public int Unk09 { get; set; } - public int Unk10 { get; set; } - public MetaHash Unk11 { get; set; }//0 - public int Unk12 { get; set; } - public int Unk13 { get; set; } - public MetaHash Unk14 { get; set; }//0 - public int Unk15 { get; set; } - public int Unk16 { get; set; } - public MetaHash Unk17 { get; set; }//0 - public int Unk18 { get; set; } - public int Unk19 { get; set; } - public MetaHash Unk20 { get; set; }//0 - public int Unk21 { get; set; } - public int Unk22 { get; set; } - public float Unk23 { get; set; } - public MetaHash Unk24 { get; set; }//0 - public int Unk25 { get; set; } - public int Unk26 { get; set; } - public MetaHash Unk27 { get; set; }//0 - public int Unk28 { get; set; } - public int Unk29 { get; set; } - public MetaHash Unk30 { get; set; }//0 - public int Unk31 { get; set; } - public int Unk32 { get; set; } - public MetaHash Unk33 { get; set; }//0 - public int Unk34 { get; set; } - public int Unk35 { get; set; } - public MetaHash Unk36 { get; set; }//0 - public int Unk37 { get; set; } - public int Unk38 { get; set; } - public MetaHash Unk39 { get; set; }//0 - public int Unk40 { get; set; } - public int Unk41 { get; set; } - public MetaHash Unk42 { get; set; }//0 - public int Unk43 { get; set; } - public int Unk44 { get; set; } - public MetaHash Unk45 { get; set; }//0 - public int Unk46 { get; set; } - public int Unk47 { get; set; } - public MetaHash Unk48 { get; set; }//0 - public int Unk49 { get; set; } - public int Unk50 { get; set; } - public float Unk51 { get; set; } - public MetaHash Unk52 { get; set; }//0 - public int Unk53 { get; set; } - public int Unk54 { get; set; } - public int Unk55 { get; set; } - public MetaHash Unk56 { get; set; }//0 - public int Unk57 { get; set; } - public int Unk58 { get; set; } + public int MinTimeBetweenDamageReports { get; set; } + public int TargetedLockedMinTimeInStateToTrigger { get; set; } + public int TargetedLockedMaxTimeBetweenTriggerAndPlay { get; set; } + public int TargetedLockedMinTimeBetweenPlay { get; set; } + public int MissileFiredMinTimeInStateToTrigger { get; set; } + public int MissileFiredMaxTimeBetweenTriggerAndPlay { get; set; } + public int MissileFiredMinTimeBetweenPlay { get; set; } + public int AcquiringTargetMinTimeInStateToTrigger { get; set; } + public int AcquiringTargetMaxTimeBetweenTriggerAndPlay { get; set; } + public int AcquiringTargetMinTimeBetweenPlay { get; set; } + public int TargetAcquiredMinTimeInStateToTrigger { get; set; } + public int TargetAcquiredMaxTimeBetweenTriggerAndPlay { get; set; } + public int TargetAcquiredMinTimeBetweenPlay { get; set; } + public int AllClearMinTimeInStateToTrigger { get; set; } + public int AllClearMaxTimeBetweenTriggerAndPlay { get; set; } + public int AllClearMinTimeBetweenPlay { get; set; } + public int PlaneWarningStallMinTimeInStateToTrigger { get; set; } + public int PlaneWarningStallMaxTimeBetweenTriggerAndPlay { get; set; } + public int PlaneWarningStallMinTimeBetweenPlay { get; set; } + public int AltitudeWarningLowMinTimeInStateToTrigger { get; set; } + public int AltitudeWarningLowMaxTimeBetweenTriggerAndPlay { get; set; } + public int AltitudeWarningLowMinTimeBetweenPlay { get; set; } + public float AltitudeWarningLowDownProbeLength { get; set; } + public int AltitudeWarningHighMinTimeInStateToTrigger { get; set; } + public int AltitudeWarningHighMaxTimeBetweenTriggerAndPlay { get; set; } + public int AltitudeWarningHighMinTimeBetweenPlay { get; set; } + public int Engine1FireMinTimeInStateToTrigger { get; set; } + public int Engine1FireMaxTimeBetweenTriggerAndPlay { get; set; } + public int Engine1FireMinTimeBetweenPlay { get; set; } + public int Engine2FireMinTimeInStateToTrigger { get; set; } + public int Engine2FireMaxTimeBetweenTriggerAndPlay { get; set; } + public int Engine2FireMinTimeBetweenPlay { get; set; } + public int Engine3FireMinTimeInStateToTrigger { get; set; } + public int Engine3FireMaxTimeBetweenTriggerAndPlay { get; set; } + public int Engine3FireMinTimeBetweenPlay { get; set; } + public int Engine4FireMinTimeInStateToTrigger { get; set; } + public int Engine4FireMaxTimeBetweenTriggerAndPlay { get; set; } + public int Engine4FireMinTimeBetweenPlay { get; set; } + public int DamagedSeriousMinTimeInStateToTrigger { get; set; } + public int DamagedSeriousMaxTimeBetweenTriggerAndPlay { get; set; } + public int DamagedSeriousMinTimeBetweenPlay { get; set; } + public int DamagedCriticalMinTimeInStateToTrigger { get; set; } + public int DamagedCriticalMaxTimeBetweenTriggerAndPlay { get; set; } + public int DamagedCriticalMinTimeBetweenPlay { get; set; } + public int OverspeedMinTimeInStateToTrigger { get; set; } + public int OverspeedMaxTimeBetweenTriggerAndPlay { get; set; } + public int OverspeedMinTimeBetweenPlay { get; set; } + public int TerrainMinTimeInStateToTrigger { get; set; } + public int TerrainMaxTimeBetweenTriggerAndPlay { get; set; } + public int TerrainMinTimeBetweenPlay { get; set; } + public float TerrainForwardProbeLength { get; set; } + public int PullUpMinTimeInStateToTrigger { get; set; } + public int PullUpMaxTimeBetweenTriggerAndPlay { get; set; } + public int PullUpMinTimeBetweenPlay { get; set; } + public int PullUpMaxTimeSinceTerrainTriggerToPlay { get; set; } + public int LowFuelMinTimeInStateToTrigger { get; set; } + public int LowFuelMaxTimeBetweenTriggerAndPlay { get; set; } + public int LowFuelMinTimeBetweenPlay { get; set; } public Dat151AircraftWarningSettings(RelFile rel) : base(rel) @@ -19415,293 +18782,254 @@ namespace CodeWalker.GameFiles } public Dat151AircraftWarningSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadUInt32();//0 - Unk03 = br.ReadInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadUInt32();//0 - Unk06 = br.ReadInt32(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadInt32(); - Unk10 = br.ReadInt32(); - Unk11 = br.ReadUInt32();//0 - Unk12 = br.ReadInt32(); - Unk13 = br.ReadInt32(); - Unk14 = br.ReadUInt32();//0 - Unk15 = br.ReadInt32(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadUInt32();//0 - Unk18 = br.ReadInt32(); - Unk19 = br.ReadInt32(); - Unk20 = br.ReadUInt32();//0 - Unk21 = br.ReadInt32(); - Unk22 = br.ReadInt32(); - Unk23 = br.ReadSingle(); - Unk24 = br.ReadUInt32();//0 - Unk25 = br.ReadInt32(); - Unk26 = br.ReadInt32(); - Unk27 = br.ReadUInt32();//0 - Unk28 = br.ReadInt32(); - Unk29 = br.ReadInt32(); - Unk30 = br.ReadUInt32();//0 - Unk31 = br.ReadInt32(); - Unk32 = br.ReadInt32(); - Unk33 = br.ReadUInt32();//0 - Unk34 = br.ReadInt32(); - Unk35 = br.ReadInt32(); - Unk36 = br.ReadUInt32();//0 - Unk37 = br.ReadInt32(); - Unk38 = br.ReadInt32(); - Unk39 = br.ReadUInt32();//0 - Unk40 = br.ReadInt32(); - Unk41 = br.ReadInt32(); - Unk42 = br.ReadUInt32();//0 - Unk43 = br.ReadInt32(); - Unk44 = br.ReadInt32(); - Unk45 = br.ReadUInt32();//0 - Unk46 = br.ReadInt32(); - Unk47 = br.ReadInt32(); - Unk48 = br.ReadUInt32();//0 - Unk49 = br.ReadInt32(); - Unk50 = br.ReadInt32(); - Unk51 = br.ReadSingle(); - Unk52 = br.ReadUInt32();//0 - Unk53 = br.ReadInt32(); - Unk54 = br.ReadInt32(); - Unk55 = br.ReadInt32(); - Unk56 = br.ReadUInt32();//0 - Unk57 = br.ReadInt32(); - Unk58 = br.ReadInt32(); - - if (Unk02 != 0) - { } - if (Unk05 != 0) - { } - if (Unk08 != 0) - { } - if (Unk11 != 0) - { } - if (Unk14 != 0) - { } - if (Unk17 != 0) - { } - if (Unk20 != 0) - { } - if (Unk24 != 0) - { } - if (Unk27 != 0) - { } - if (Unk30 != 0) - { } - if (Unk33 != 0) - { } - if (Unk36 != 0) - { } - if (Unk39 != 0) - { } - if (Unk42 != 0) - { } - if (Unk45 != 0) - { } - if (Unk48 != 0) - { } - if (Unk52 != 0) - { } - if (Unk56 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MinTimeBetweenDamageReports = br.ReadInt32(); + TargetedLockedMinTimeInStateToTrigger = br.ReadInt32(); + TargetedLockedMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + TargetedLockedMinTimeBetweenPlay = br.ReadInt32(); + MissileFiredMinTimeInStateToTrigger = br.ReadInt32(); + MissileFiredMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + MissileFiredMinTimeBetweenPlay = br.ReadInt32(); + AcquiringTargetMinTimeInStateToTrigger = br.ReadInt32(); + AcquiringTargetMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + AcquiringTargetMinTimeBetweenPlay = br.ReadInt32(); + TargetAcquiredMinTimeInStateToTrigger = br.ReadInt32(); + TargetAcquiredMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + TargetAcquiredMinTimeBetweenPlay = br.ReadInt32(); + AllClearMinTimeInStateToTrigger = br.ReadInt32(); + AllClearMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + AllClearMinTimeBetweenPlay = br.ReadInt32(); + PlaneWarningStallMinTimeInStateToTrigger = br.ReadInt32(); + PlaneWarningStallMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + PlaneWarningStallMinTimeBetweenPlay = br.ReadInt32(); + AltitudeWarningLowMinTimeInStateToTrigger = br.ReadInt32(); + AltitudeWarningLowMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + AltitudeWarningLowMinTimeBetweenPlay = br.ReadInt32(); + AltitudeWarningLowDownProbeLength = br.ReadSingle(); + AltitudeWarningHighMinTimeInStateToTrigger = br.ReadInt32(); + AltitudeWarningHighMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + AltitudeWarningHighMinTimeBetweenPlay = br.ReadInt32(); + Engine1FireMinTimeInStateToTrigger = br.ReadInt32(); + Engine1FireMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + Engine1FireMinTimeBetweenPlay = br.ReadInt32(); + Engine2FireMinTimeInStateToTrigger = br.ReadInt32(); + Engine2FireMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + Engine2FireMinTimeBetweenPlay = br.ReadInt32(); + Engine3FireMinTimeInStateToTrigger = br.ReadInt32(); + Engine3FireMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + Engine3FireMinTimeBetweenPlay = br.ReadInt32(); + Engine4FireMinTimeInStateToTrigger = br.ReadInt32(); + Engine4FireMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + Engine4FireMinTimeBetweenPlay = br.ReadInt32(); + DamagedSeriousMinTimeInStateToTrigger = br.ReadInt32(); + DamagedSeriousMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + DamagedSeriousMinTimeBetweenPlay = br.ReadInt32(); + DamagedCriticalMinTimeInStateToTrigger = br.ReadInt32(); + DamagedCriticalMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + DamagedCriticalMinTimeBetweenPlay = br.ReadInt32(); + OverspeedMinTimeInStateToTrigger = br.ReadInt32(); + OverspeedMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + OverspeedMinTimeBetweenPlay = br.ReadInt32(); + TerrainMinTimeInStateToTrigger = br.ReadInt32(); + TerrainMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + TerrainMinTimeBetweenPlay = br.ReadInt32(); + TerrainForwardProbeLength = br.ReadSingle(); + PullUpMinTimeInStateToTrigger = br.ReadInt32(); + PullUpMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + PullUpMinTimeBetweenPlay = br.ReadInt32(); + PullUpMaxTimeSinceTerrainTriggerToPlay = br.ReadInt32(); + LowFuelMinTimeInStateToTrigger = br.ReadInt32(); + LowFuelMaxTimeBetweenTriggerAndPlay = br.ReadInt32(); + LowFuelMinTimeBetweenPlay = br.ReadInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); - bw.Write(Unk21); - bw.Write(Unk22); - bw.Write(Unk23); - bw.Write(Unk24); - bw.Write(Unk25); - bw.Write(Unk26); - bw.Write(Unk27); - bw.Write(Unk28); - bw.Write(Unk29); - bw.Write(Unk30); - bw.Write(Unk31); - bw.Write(Unk32); - bw.Write(Unk33); - bw.Write(Unk34); - bw.Write(Unk35); - bw.Write(Unk36); - bw.Write(Unk37); - bw.Write(Unk38); - bw.Write(Unk39); - bw.Write(Unk40); - bw.Write(Unk41); - bw.Write(Unk42); - bw.Write(Unk43); - bw.Write(Unk44); - bw.Write(Unk45); - bw.Write(Unk46); - bw.Write(Unk47); - bw.Write(Unk48); - bw.Write(Unk49); - bw.Write(Unk50); - bw.Write(Unk51); - bw.Write(Unk52); - bw.Write(Unk53); - bw.Write(Unk54); - bw.Write(Unk55); - bw.Write(Unk56); - bw.Write(Unk57); - bw.Write(Unk58); + bw.Write(MinTimeBetweenDamageReports); + bw.Write(TargetedLockedMinTimeInStateToTrigger); + bw.Write(TargetedLockedMaxTimeBetweenTriggerAndPlay); + bw.Write(TargetedLockedMinTimeBetweenPlay); + bw.Write(MissileFiredMinTimeInStateToTrigger); + bw.Write(MissileFiredMaxTimeBetweenTriggerAndPlay); + bw.Write(MissileFiredMinTimeBetweenPlay); + bw.Write(AcquiringTargetMinTimeInStateToTrigger); + bw.Write(AcquiringTargetMaxTimeBetweenTriggerAndPlay); + bw.Write(AcquiringTargetMinTimeBetweenPlay); + bw.Write(TargetAcquiredMinTimeInStateToTrigger); + bw.Write(TargetAcquiredMaxTimeBetweenTriggerAndPlay); + bw.Write(TargetAcquiredMinTimeBetweenPlay); + bw.Write(AllClearMinTimeInStateToTrigger); + bw.Write(AllClearMaxTimeBetweenTriggerAndPlay); + bw.Write(AllClearMinTimeBetweenPlay); + bw.Write(PlaneWarningStallMinTimeInStateToTrigger); + bw.Write(PlaneWarningStallMaxTimeBetweenTriggerAndPlay); + bw.Write(PlaneWarningStallMinTimeBetweenPlay); + bw.Write(AltitudeWarningLowMinTimeInStateToTrigger); + bw.Write(AltitudeWarningLowMaxTimeBetweenTriggerAndPlay); + bw.Write(AltitudeWarningLowMinTimeBetweenPlay); + bw.Write(AltitudeWarningLowDownProbeLength); + bw.Write(AltitudeWarningHighMinTimeInStateToTrigger); + bw.Write(AltitudeWarningHighMaxTimeBetweenTriggerAndPlay); + bw.Write(AltitudeWarningHighMinTimeBetweenPlay); + bw.Write(Engine1FireMinTimeInStateToTrigger); + bw.Write(Engine1FireMaxTimeBetweenTriggerAndPlay); + bw.Write(Engine1FireMinTimeBetweenPlay); + bw.Write(Engine2FireMinTimeInStateToTrigger); + bw.Write(Engine2FireMaxTimeBetweenTriggerAndPlay); + bw.Write(Engine2FireMinTimeBetweenPlay); + bw.Write(Engine3FireMinTimeInStateToTrigger); + bw.Write(Engine3FireMaxTimeBetweenTriggerAndPlay); + bw.Write(Engine3FireMinTimeBetweenPlay); + bw.Write(Engine4FireMinTimeInStateToTrigger); + bw.Write(Engine4FireMaxTimeBetweenTriggerAndPlay); + bw.Write(Engine4FireMinTimeBetweenPlay); + bw.Write(DamagedSeriousMinTimeInStateToTrigger); + bw.Write(DamagedSeriousMaxTimeBetweenTriggerAndPlay); + bw.Write(DamagedSeriousMinTimeBetweenPlay); + bw.Write(DamagedCriticalMinTimeInStateToTrigger); + bw.Write(DamagedCriticalMaxTimeBetweenTriggerAndPlay); + bw.Write(DamagedCriticalMinTimeBetweenPlay); + bw.Write(OverspeedMinTimeInStateToTrigger); + bw.Write(OverspeedMaxTimeBetweenTriggerAndPlay); + bw.Write(OverspeedMinTimeBetweenPlay); + bw.Write(TerrainMinTimeInStateToTrigger); + bw.Write(TerrainMaxTimeBetweenTriggerAndPlay); + bw.Write(TerrainMinTimeBetweenPlay); + bw.Write(TerrainForwardProbeLength); + bw.Write(PullUpMinTimeInStateToTrigger); + bw.Write(PullUpMaxTimeBetweenTriggerAndPlay); + bw.Write(PullUpMinTimeBetweenPlay); + bw.Write(PullUpMaxTimeSinceTerrainTriggerToPlay); + bw.Write(LowFuelMinTimeInStateToTrigger); + bw.Write(LowFuelMaxTimeBetweenTriggerAndPlay); + bw.Write(LowFuelMinTimeBetweenPlay); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08)); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); - RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11)); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17)); - RelXml.ValueTag(sb, indent, "Unk18", Unk18.ToString()); - RelXml.ValueTag(sb, indent, "Unk19", Unk19.ToString()); - RelXml.StringTag(sb, indent, "Unk20", RelXml.HashString(Unk20)); - RelXml.ValueTag(sb, indent, "Unk21", Unk21.ToString()); - RelXml.ValueTag(sb, indent, "Unk22", Unk22.ToString()); - RelXml.ValueTag(sb, indent, "Unk23", FloatUtil.ToString(Unk23)); - RelXml.StringTag(sb, indent, "Unk24", RelXml.HashString(Unk24)); - RelXml.ValueTag(sb, indent, "Unk25", Unk25.ToString()); - RelXml.ValueTag(sb, indent, "Unk26", Unk26.ToString()); - RelXml.StringTag(sb, indent, "Unk27", RelXml.HashString(Unk27)); - RelXml.ValueTag(sb, indent, "Unk28", Unk28.ToString()); - RelXml.ValueTag(sb, indent, "Unk29", Unk29.ToString()); - RelXml.StringTag(sb, indent, "Unk30", RelXml.HashString(Unk30)); - RelXml.ValueTag(sb, indent, "Unk31", Unk31.ToString()); - RelXml.ValueTag(sb, indent, "Unk32", Unk32.ToString()); - RelXml.StringTag(sb, indent, "Unk33", RelXml.HashString(Unk33)); - RelXml.ValueTag(sb, indent, "Unk34", Unk34.ToString()); - RelXml.ValueTag(sb, indent, "Unk35", Unk35.ToString()); - RelXml.StringTag(sb, indent, "Unk36", RelXml.HashString(Unk36)); - RelXml.ValueTag(sb, indent, "Unk37", Unk37.ToString()); - RelXml.ValueTag(sb, indent, "Unk38", Unk38.ToString()); - RelXml.StringTag(sb, indent, "Unk39", RelXml.HashString(Unk39)); - RelXml.ValueTag(sb, indent, "Unk40", Unk40.ToString()); - RelXml.ValueTag(sb, indent, "Unk41", Unk41.ToString()); - RelXml.StringTag(sb, indent, "Unk42", RelXml.HashString(Unk42)); - RelXml.ValueTag(sb, indent, "Unk43", Unk43.ToString()); - RelXml.ValueTag(sb, indent, "Unk44", Unk44.ToString()); - RelXml.StringTag(sb, indent, "Unk45", RelXml.HashString(Unk45)); - RelXml.ValueTag(sb, indent, "Unk46", Unk46.ToString()); - RelXml.ValueTag(sb, indent, "Unk47", Unk47.ToString()); - RelXml.StringTag(sb, indent, "Unk48", RelXml.HashString(Unk48)); - RelXml.ValueTag(sb, indent, "Unk49", Unk49.ToString()); - RelXml.ValueTag(sb, indent, "Unk50", Unk50.ToString()); - RelXml.ValueTag(sb, indent, "Unk51", FloatUtil.ToString(Unk51)); - RelXml.StringTag(sb, indent, "Unk52", RelXml.HashString(Unk52)); - RelXml.ValueTag(sb, indent, "Unk53", Unk53.ToString()); - RelXml.ValueTag(sb, indent, "Unk54", Unk54.ToString()); - RelXml.ValueTag(sb, indent, "Unk55", Unk55.ToString()); - RelXml.StringTag(sb, indent, "Unk56", RelXml.HashString(Unk56)); - RelXml.ValueTag(sb, indent, "Unk57", Unk57.ToString()); - RelXml.ValueTag(sb, indent, "Unk58", Unk58.ToString()); + RelXml.ValueTag(sb, indent, "MinTimeBetweenDamageReports", MinTimeBetweenDamageReports.ToString()); + RelXml.ValueTag(sb, indent, "TargetedLockedMinTimeInStateToTrigger", TargetedLockedMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "TargetedLockedMaxTimeBetweenTriggerAndPlay", TargetedLockedMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "TargetedLockedMinTimeBetweenPlay", TargetedLockedMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "MissileFiredMinTimeInStateToTrigger", MissileFiredMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "MissileFiredMaxTimeBetweenTriggerAndPlay", MissileFiredMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "MissileFiredMinTimeBetweenPlay", MissileFiredMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "AcquiringTargetMinTimeInStateToTrigger", AcquiringTargetMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "AcquiringTargetMaxTimeBetweenTriggerAndPlay", AcquiringTargetMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "AcquiringTargetMinTimeBetweenPlay", AcquiringTargetMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "TargetAcquiredMinTimeInStateToTrigger", TargetAcquiredMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "TargetAcquiredMaxTimeBetweenTriggerAndPlay", TargetAcquiredMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "TargetAcquiredMinTimeBetweenPlay", TargetAcquiredMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "AllClearMinTimeInStateToTrigger", AllClearMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "AllClearMaxTimeBetweenTriggerAndPlay", AllClearMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "AllClearMinTimeBetweenPlay", AllClearMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "PlaneWarningStallMinTimeInStateToTrigger", PlaneWarningStallMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "PlaneWarningStallMaxTimeBetweenTriggerAndPlay", PlaneWarningStallMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "PlaneWarningStallMinTimeBetweenPlay", PlaneWarningStallMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "AltitudeWarningLowMinTimeInStateToTrigger", AltitudeWarningLowMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "AltitudeWarningLowMaxTimeBetweenTriggerAndPlay", AltitudeWarningLowMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "AltitudeWarningLowMinTimeBetweenPlay", AltitudeWarningLowMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "AltitudeWarningLowDownProbeLength", FloatUtil.ToString(AltitudeWarningLowDownProbeLength)); + RelXml.ValueTag(sb, indent, "AltitudeWarningHighMinTimeInStateToTrigger", AltitudeWarningHighMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "AltitudeWarningHighMaxTimeBetweenTriggerAndPlay", AltitudeWarningHighMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "AltitudeWarningHighMinTimeBetweenPlay", AltitudeWarningHighMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine1FireMinTimeInStateToTrigger", Engine1FireMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "Engine1FireMaxTimeBetweenTriggerAndPlay", Engine1FireMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine1FireMinTimeBetweenPlay", Engine1FireMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine2FireMinTimeInStateToTrigger", Engine2FireMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "Engine2FireMaxTimeBetweenTriggerAndPlay", Engine2FireMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine2FireMinTimeBetweenPlay", Engine2FireMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine3FireMinTimeInStateToTrigger", Engine3FireMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "Engine3FireMaxTimeBetweenTriggerAndPlay", Engine3FireMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine3FireMinTimeBetweenPlay", Engine3FireMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine4FireMinTimeInStateToTrigger", Engine4FireMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "Engine4FireMaxTimeBetweenTriggerAndPlay", Engine4FireMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "Engine4FireMinTimeBetweenPlay", Engine4FireMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "DamagedSeriousMinTimeInStateToTrigger", DamagedSeriousMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "DamagedSeriousMaxTimeBetweenTriggerAndPlay", DamagedSeriousMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "DamagedSeriousMinTimeBetweenPlay", DamagedSeriousMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "DamagedCriticalMinTimeInStateToTrigger", DamagedCriticalMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "DamagedCriticalMaxTimeBetweenTriggerAndPlay", DamagedCriticalMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "DamagedCriticalMinTimeBetweenPlay", DamagedCriticalMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "OverspeedMinTimeInStateToTrigger", OverspeedMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "OverspeedMaxTimeBetweenTriggerAndPlay", OverspeedMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "OverspeedMinTimeBetweenPlay", OverspeedMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "TerrainMinTimeInStateToTrigger", TerrainMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "TerrainMaxTimeBetweenTriggerAndPlay", TerrainMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "TerrainMinTimeBetweenPlay", TerrainMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "TerrainForwardProbeLength", FloatUtil.ToString(TerrainForwardProbeLength)); + RelXml.ValueTag(sb, indent, "PullUpMinTimeInStateToTrigger", PullUpMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "PullUpMaxTimeBetweenTriggerAndPlay", PullUpMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "PullUpMinTimeBetweenPlay", PullUpMinTimeBetweenPlay.ToString()); + RelXml.ValueTag(sb, indent, "PullUpMaxTimeSinceTerrainTriggerToPlay", PullUpMaxTimeSinceTerrainTriggerToPlay.ToString()); + RelXml.ValueTag(sb, indent, "LowFuelMinTimeInStateToTrigger", LowFuelMinTimeInStateToTrigger.ToString()); + RelXml.ValueTag(sb, indent, "LowFuelMaxTimeBetweenTriggerAndPlay", LowFuelMaxTimeBetweenTriggerAndPlay.ToString()); + RelXml.ValueTag(sb, indent, "LowFuelMinTimeBetweenPlay", LowFuelMinTimeBetweenPlay.ToString()); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05")); - Unk06 = Xml.GetChildIntAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08")); - Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); - Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11")); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14")); - Unk15 = Xml.GetChildIntAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17")); - Unk18 = Xml.GetChildIntAttribute(node, "Unk18", "value"); - Unk19 = Xml.GetChildIntAttribute(node, "Unk19", "value"); - Unk20 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk20")); - Unk21 = Xml.GetChildIntAttribute(node, "Unk21", "value"); - Unk22 = Xml.GetChildIntAttribute(node, "Unk22", "value"); - Unk23 = Xml.GetChildFloatAttribute(node, "Unk23", "value"); - Unk24 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk24")); - Unk25 = Xml.GetChildIntAttribute(node, "Unk25", "value"); - Unk26 = Xml.GetChildIntAttribute(node, "Unk26", "value"); - Unk27 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk27")); - Unk28 = Xml.GetChildIntAttribute(node, "Unk28", "value"); - Unk29 = Xml.GetChildIntAttribute(node, "Unk29", "value"); - Unk30 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk30")); - Unk31 = Xml.GetChildIntAttribute(node, "Unk31", "value"); - Unk32 = Xml.GetChildIntAttribute(node, "Unk32", "value"); - Unk33 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk33")); - Unk34 = Xml.GetChildIntAttribute(node, "Unk34", "value"); - Unk35 = Xml.GetChildIntAttribute(node, "Unk35", "value"); - Unk36 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk36")); - Unk37 = Xml.GetChildIntAttribute(node, "Unk37", "value"); - Unk38 = Xml.GetChildIntAttribute(node, "Unk38", "value"); - Unk39 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk39")); - Unk40 = Xml.GetChildIntAttribute(node, "Unk40", "value"); - Unk41 = Xml.GetChildIntAttribute(node, "Unk41", "value"); - Unk42 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk42")); - Unk43 = Xml.GetChildIntAttribute(node, "Unk43", "value"); - Unk44 = Xml.GetChildIntAttribute(node, "Unk44", "value"); - Unk45 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk45")); - Unk46 = Xml.GetChildIntAttribute(node, "Unk46", "value"); - Unk47 = Xml.GetChildIntAttribute(node, "Unk47", "value"); - Unk48 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk48")); - Unk49 = Xml.GetChildIntAttribute(node, "Unk49", "value"); - Unk50 = Xml.GetChildIntAttribute(node, "Unk50", "value"); - Unk51 = Xml.GetChildFloatAttribute(node, "Unk51", "value"); - Unk52 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk52")); - Unk53 = Xml.GetChildIntAttribute(node, "Unk53", "value"); - Unk54 = Xml.GetChildIntAttribute(node, "Unk54", "value"); - Unk55 = Xml.GetChildIntAttribute(node, "Unk55", "value"); - Unk56 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk56")); - Unk57 = Xml.GetChildIntAttribute(node, "Unk57", "value"); - Unk58 = Xml.GetChildIntAttribute(node, "Unk58", "value"); + MinTimeBetweenDamageReports = Xml.GetChildIntAttribute(node, "MinTimeBetweenDamageReports", "value"); + TargetedLockedMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "TargetedLockedMinTimeInStateToTrigger", "value"); + TargetedLockedMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "TargetedLockedMaxTimeBetweenTriggerAndPlay", "value"); + TargetedLockedMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "TargetedLockedMinTimeBetweenPlay", "value"); + MissileFiredMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "MissileFiredMinTimeInStateToTrigger", "value"); + MissileFiredMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "MissileFiredMaxTimeBetweenTriggerAndPlay", "value"); + MissileFiredMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "MissileFiredMinTimeBetweenPlay", "value"); + AcquiringTargetMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "AcquiringTargetMinTimeInStateToTrigger", "value"); + AcquiringTargetMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "AcquiringTargetMaxTimeBetweenTriggerAndPlay", "value"); + AcquiringTargetMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "AcquiringTargetMinTimeBetweenPlay", "value"); + TargetAcquiredMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "TargetAcquiredMinTimeInStateToTrigger", "value"); + TargetAcquiredMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "TargetAcquiredMaxTimeBetweenTriggerAndPlay", "value"); + TargetAcquiredMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "TargetAcquiredMinTimeBetweenPlay", "value"); + AllClearMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "AllClearMinTimeInStateToTrigger", "value"); + AllClearMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "AllClearMaxTimeBetweenTriggerAndPlay", "value"); + AllClearMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "AllClearMinTimeBetweenPlay", "value"); + PlaneWarningStallMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "PlaneWarningStallMinTimeInStateToTrigger", "value"); + PlaneWarningStallMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "PlaneWarningStallMaxTimeBetweenTriggerAndPlay", "value"); + PlaneWarningStallMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "PlaneWarningStallMinTimeBetweenPlay", "value"); + AltitudeWarningLowMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "AltitudeWarningLowMinTimeInStateToTrigger", "value"); + AltitudeWarningLowMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "AltitudeWarningLowMaxTimeBetweenTriggerAndPlay", "value"); + AltitudeWarningLowMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "AltitudeWarningLowMinTimeBetweenPlay", "value"); + AltitudeWarningLowDownProbeLength = Xml.GetChildFloatAttribute(node, "AltitudeWarningLowDownProbeLength", "value"); + AltitudeWarningHighMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "AltitudeWarningHighMinTimeInStateToTrigger", "value"); + AltitudeWarningHighMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "AltitudeWarningHighMaxTimeBetweenTriggerAndPlay", "value"); + AltitudeWarningHighMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "AltitudeWarningHighMinTimeBetweenPlay", "value"); + Engine1FireMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "Engine1FireMinTimeInStateToTrigger", "value"); + Engine1FireMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "Engine1FireMaxTimeBetweenTriggerAndPlay", "value"); + Engine1FireMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "Engine1FireMinTimeBetweenPlay", "value"); + Engine2FireMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "Engine2FireMinTimeInStateToTrigger", "value"); + Engine2FireMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "Engine2FireMaxTimeBetweenTriggerAndPlay", "value"); + Engine2FireMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "Engine2FireMinTimeBetweenPlay", "value"); + Engine3FireMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "Engine3FireMinTimeInStateToTrigger", "value"); + Engine3FireMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "Engine3FireMaxTimeBetweenTriggerAndPlay", "value"); + Engine3FireMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "Engine3FireMinTimeBetweenPlay", "value"); + Engine4FireMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "Engine4FireMinTimeInStateToTrigger", "value"); + Engine4FireMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "Engine4FireMaxTimeBetweenTriggerAndPlay", "value"); + Engine4FireMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "Engine4FireMinTimeBetweenPlay", "value"); + DamagedSeriousMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "DamagedSeriousMinTimeInStateToTrigger", "value"); + DamagedSeriousMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "DamagedSeriousMaxTimeBetweenTriggerAndPlay", "value"); + DamagedSeriousMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "DamagedSeriousMinTimeBetweenPlay", "value"); + DamagedCriticalMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "DamagedCriticalMinTimeInStateToTrigger", "value"); + DamagedCriticalMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "DamagedCriticalMaxTimeBetweenTriggerAndPlay", "value"); + DamagedCriticalMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "DamagedCriticalMinTimeBetweenPlay", "value"); + OverspeedMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "OverspeedMinTimeInStateToTrigger", "value"); + OverspeedMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "OverspeedMaxTimeBetweenTriggerAndPlay", "value"); + OverspeedMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "OverspeedMinTimeBetweenPlay", "value"); + TerrainMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "TerrainMinTimeInStateToTrigger", "value"); + TerrainMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "TerrainMaxTimeBetweenTriggerAndPlay", "value"); + TerrainMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "TerrainMinTimeBetweenPlay", "value"); + TerrainForwardProbeLength = Xml.GetChildFloatAttribute(node, "TerrainForwardProbeLength", "value"); + PullUpMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "PullUpMinTimeInStateToTrigger", "value"); + PullUpMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "PullUpMaxTimeBetweenTriggerAndPlay", "value"); + PullUpMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "PullUpMinTimeBetweenPlay", "value"); + PullUpMaxTimeSinceTerrainTriggerToPlay = Xml.GetChildIntAttribute(node, "PullUpMaxTimeSinceTerrainTriggerToPlay", "value"); + LowFuelMinTimeInStateToTrigger = Xml.GetChildIntAttribute(node, "LowFuelMinTimeInStateToTrigger", "value"); + LowFuelMaxTimeBetweenTriggerAndPlay = Xml.GetChildIntAttribute(node, "LowFuelMaxTimeBetweenTriggerAndPlay", "value"); + LowFuelMinTimeBetweenPlay = Xml.GetChildIntAttribute(node, "LowFuelMinTimeBetweenPlay", "value"); } } - [TC(typeof(EXP))] public class Dat151WallaSpeechListItem : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat151PedWallaSpeechSettingsListItem : IMetaXmlItem { public MetaHash Unk01 { get; set; } public float Unk02 { get; set; } @@ -19710,9 +19038,9 @@ namespace CodeWalker.GameFiles public byte Unk05 { get; set; } public short Unk06 { get; set; } - public Dat151WallaSpeechListItem() + public Dat151PedWallaSpeechSettingsListItem() { } - public Dat151WallaSpeechListItem(BinaryReader br) + public Dat151PedWallaSpeechSettingsListItem(BinaryReader br) { Unk01 = br.ReadUInt32(); Unk02 = br.ReadSingle(); @@ -19756,28 +19084,26 @@ namespace CodeWalker.GameFiles return Unk01.ToString() + ": " + Unk02.ToString() + ", " + Unk03.ToString() + ", " + Unk04.ToString() + ", " + Unk05.ToString(); } } - [TC(typeof(EXP))] public class Dat151WallaSpeechList : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151PedWallaSpeechSettingsList : Dat151RelData { public int ItemCount { get; set; } - public Dat151WallaSpeechListItem[] Items { get; set; } + public Dat151PedWallaSpeechSettingsListItem[] Items { get; set; } - public Dat151WallaSpeechList(RelFile rel) : base(rel) + public Dat151PedWallaSpeechSettingsList(RelFile rel) : base(rel) { - Type = Dat151RelType.WallaSpeechList; + Type = Dat151RelType.PedWallaSpeechSettingsList; TypeID = (byte)Type; } - public Dat151WallaSpeechList(RelData d, BinaryReader br) : base(d, br) + public Dat151PedWallaSpeechSettingsList(RelData d, BinaryReader br) : base(d, br) { ItemCount = br.ReadInt32(); - Items = new Dat151WallaSpeechListItem[ItemCount]; + Items = new Dat151PedWallaSpeechSettingsListItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151WallaSpeechListItem(br); + Items[i] = new Dat151PedWallaSpeechSettingsListItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -19795,7 +19121,7 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - Items = XmlRel.ReadItemArray(node, "Items"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (Items?.Length ?? 0); } public override MetaHash[] GetGameHashes() @@ -19811,15 +19137,17 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat151CopDispatchInteractionSettings : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151CopDispatchInteractionSettings : Dat151RelData { - public int Unk01 { get; set; } - public int Unk02 { get; set; } - public int Unk03 { get; set; } - public int Unk04 { get; set; } - public int Unk05 { get; set; } - public int Unk06 { get; set; } - public int Unk07 { get; set; } + public int MinTimeBetweenInteractions { get; set; } + public int MinTimeBetweenInteractionsVariance { get; set; } + public int FirstLinePredelay { get; set; } + public int FirstLinePredelayVariance { get; set; } + public int SecondLinePredelay { get; set; } + public int SecondLinePredelayVariance { get; set; } + public int ScannerPredelay { get; set; } public int Unk08 { get; set; } public int Unk09 { get; set; } public int Unk10 { get; set; } @@ -19863,13 +19191,13 @@ namespace CodeWalker.GameFiles } public Dat151CopDispatchInteractionSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadInt32(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadInt32(); - Unk06 = br.ReadInt32(); - Unk07 = br.ReadInt32(); + MinTimeBetweenInteractions = br.ReadInt32(); + MinTimeBetweenInteractionsVariance = br.ReadInt32(); + FirstLinePredelay = br.ReadInt32(); + FirstLinePredelayVariance = br.ReadInt32(); + SecondLinePredelay = br.ReadInt32(); + SecondLinePredelayVariance = br.ReadInt32(); + ScannerPredelay = br.ReadInt32(); Unk08 = br.ReadInt32(); Unk09 = br.ReadInt32(); Unk10 = br.ReadInt32(); @@ -19905,22 +19233,18 @@ namespace CodeWalker.GameFiles Unk40 = br.ReadInt32(); Unk41 = br.ReadInt32(); Unk42 = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); + bw.Write(MinTimeBetweenInteractions); + bw.Write(MinTimeBetweenInteractionsVariance); + bw.Write(FirstLinePredelay); + bw.Write(FirstLinePredelayVariance); + bw.Write(SecondLinePredelay); + bw.Write(SecondLinePredelayVariance); + bw.Write(ScannerPredelay); bw.Write(Unk08); bw.Write(Unk09); bw.Write(Unk10); @@ -19959,13 +19283,13 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", Unk03.ToString()); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.ValueTag(sb, indent, "Unk06", Unk06.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); + RelXml.ValueTag(sb, indent, "Unk01", MinTimeBetweenInteractions.ToString()); + RelXml.ValueTag(sb, indent, "Unk02", MinTimeBetweenInteractionsVariance.ToString()); + RelXml.ValueTag(sb, indent, "Unk03", FirstLinePredelay.ToString()); + RelXml.ValueTag(sb, indent, "Unk04", FirstLinePredelayVariance.ToString()); + RelXml.ValueTag(sb, indent, "Unk05", SecondLinePredelay.ToString()); + RelXml.ValueTag(sb, indent, "Unk06", SecondLinePredelayVariance.ToString()); + RelXml.ValueTag(sb, indent, "Unk07", ScannerPredelay.ToString()); RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); RelXml.ValueTag(sb, indent, "Unk10", Unk10.ToString()); @@ -20004,13 +19328,13 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildIntAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildIntAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildIntAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); + MinTimeBetweenInteractions = Xml.GetChildIntAttribute(node, "Unk01", "value"); + MinTimeBetweenInteractionsVariance = Xml.GetChildIntAttribute(node, "Unk02", "value"); + FirstLinePredelay = Xml.GetChildIntAttribute(node, "Unk03", "value"); + FirstLinePredelayVariance = Xml.GetChildIntAttribute(node, "Unk04", "value"); + SecondLinePredelay = Xml.GetChildIntAttribute(node, "Unk05", "value"); + SecondLinePredelayVariance = Xml.GetChildIntAttribute(node, "Unk06", "value"); + ScannerPredelay = Xml.GetChildIntAttribute(node, "Unk07", "value"); Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); Unk09 = Xml.GetChildIntAttribute(node, "Unk09", "value"); Unk10 = Xml.GetChildIntAttribute(node, "Unk10", "value"); @@ -20048,204 +19372,181 @@ namespace CodeWalker.GameFiles Unk42 = Xml.GetChildIntAttribute(node, "Unk42", "value"); } } - [TC(typeof(EXP))] public class Dat151Unk115 : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151RandomisedRadioEmitterSettings : Dat151RelData { public FlagsUint Flags { get; set; } - public float Unk01 { get; set; } - public MetaHash Unk02 { get; set; }//static emitter - public float Unk03 { get; set; } - public float Unk04 { get; set; } - public float Unk05 { get; set; } - public float Unk06 { get; set; } - public int Unk07 { get; set; } - public int Unk08 { get; set; } - public MetaHash Unk09 { get; set; }//static emitter - public float Unk10 { get; set; } - public float Unk11 { get; set; } - public int Unk12 { get; set; } - public int Unk13 { get; set; } - public int Unk14 { get; set; } - public int Unk15 { get; set; } - public int Unk16 { get; set; } - public int Unk17 { get; set; } - public float Unk18 { get; set; } - public float Unk19 { get; set; } - public int Unk20 { get; set; } - public int Unk21 { get; set; } + public float VehicleEmitterBias { get; set; } + public MetaHash StaticEmitter { get; set; } + public float StaticEmitterMinTime { get; set; } + public float StaticEmitterMaxTime { get; set; } + public float StaticEmitterMinFadeRadius { get; set; } + public float StaticEmitterMaxFadeRadius { get; set; } + public uint StaticEmitterMinRetriggerTime { get; set; } + public uint StaticEmitterMaxRetriggerTime { get; set; } + public MetaHash VehicleEmitter { get; set; } + public float VehicleEmitterStaticEmitterMinTime { get; set; } + public float VehicleEmitterStaticEmitterMaxTime { get; set; } + public uint VehicleEmitterMinAttackTime { get; set; } + public uint VehicleEmitterMaxAttackTime { get; set; } + public uint VehicleEmitterMinHoldTime { get; set; } + public uint VehicleEmitterMaxHoldTime { get; set; } + public uint VehicleEmitterMinReleaseTime { get; set; } + public uint VehicleEmitterMaxReleaseTime { get; set; } + public float VehicleEmitterMinPanAngleChange { get; set; } + public float VehicleEmitterMaxPanAngleChange { get; set; } + public uint VehicleEmitterRetriggerTimeMin { get; set; } + public uint VehicleEmitterRetriggerTimeMax { get; set; } - public Dat151Unk115(RelFile rel) : base(rel) + public Dat151RandomisedRadioEmitterSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Unk115; + Type = Dat151RelType.RandomisedRadioEmitterSettings; TypeID = (byte)Type; } - public Dat151Unk115(RelData d, BinaryReader br) : base(d, br) + public Dat151RandomisedRadioEmitterSettings(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - Unk01 = br.ReadSingle(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadSingle(); - Unk05 = br.ReadSingle(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadInt32(); - Unk08 = br.ReadInt32(); - Unk09 = br.ReadUInt32(); - Unk10 = br.ReadSingle(); - Unk11 = br.ReadSingle(); - Unk12 = br.ReadInt32(); - Unk13 = br.ReadInt32(); - Unk14 = br.ReadInt32(); - Unk15 = br.ReadInt32(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadInt32(); - Unk18 = br.ReadSingle(); - Unk19 = br.ReadSingle(); - Unk20 = br.ReadInt32(); - Unk21 = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + VehicleEmitterBias = br.ReadSingle(); + StaticEmitter = br.ReadUInt32(); + StaticEmitterMinTime = br.ReadSingle(); + StaticEmitterMaxTime = br.ReadSingle(); + StaticEmitterMinFadeRadius = br.ReadSingle(); + StaticEmitterMaxFadeRadius = br.ReadSingle(); + StaticEmitterMinRetriggerTime = br.ReadUInt32(); + StaticEmitterMaxRetriggerTime = br.ReadUInt32(); + VehicleEmitter = br.ReadUInt32(); + VehicleEmitterStaticEmitterMinTime = br.ReadSingle(); + VehicleEmitterStaticEmitterMaxTime = br.ReadSingle(); + VehicleEmitterMinAttackTime = br.ReadUInt32(); + VehicleEmitterMaxAttackTime = br.ReadUInt32(); + VehicleEmitterMinHoldTime = br.ReadUInt32(); + VehicleEmitterMaxHoldTime = br.ReadUInt32(); + VehicleEmitterMinReleaseTime = br.ReadUInt32(); + VehicleEmitterMaxReleaseTime = br.ReadUInt32(); + VehicleEmitterMinPanAngleChange = br.ReadSingle(); + VehicleEmitterMaxPanAngleChange = br.ReadSingle(); + VehicleEmitterRetriggerTimeMin = br.ReadUInt32(); + VehicleEmitterRetriggerTimeMax = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); - bw.Write(Unk21); + bw.Write(VehicleEmitterBias); + bw.Write(StaticEmitter); + bw.Write(StaticEmitterMinTime); + bw.Write(StaticEmitterMaxTime); + bw.Write(StaticEmitterMinFadeRadius); + bw.Write(StaticEmitterMaxFadeRadius); + bw.Write(StaticEmitterMinRetriggerTime); + bw.Write(StaticEmitterMaxRetriggerTime); + bw.Write(VehicleEmitter); + bw.Write(VehicleEmitterStaticEmitterMinTime); + bw.Write(VehicleEmitterStaticEmitterMaxTime); + bw.Write(VehicleEmitterMinAttackTime); + bw.Write(VehicleEmitterMaxAttackTime); + bw.Write(VehicleEmitterMinHoldTime); + bw.Write(VehicleEmitterMaxHoldTime); + bw.Write(VehicleEmitterMinReleaseTime); + bw.Write(VehicleEmitterMaxReleaseTime); + bw.Write(VehicleEmitterMinPanAngleChange); + bw.Write(VehicleEmitterMaxPanAngleChange); + bw.Write(VehicleEmitterRetriggerTimeMin); + bw.Write(VehicleEmitterRetriggerTimeMax); } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", FloatUtil.ToString(Unk04)); - RelXml.ValueTag(sb, indent, "Unk05", FloatUtil.ToString(Unk05)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09)); - RelXml.ValueTag(sb, indent, "Unk10", FloatUtil.ToString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", FloatUtil.ToString(Unk11)); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.ValueTag(sb, indent, "Unk18", FloatUtil.ToString(Unk18)); - RelXml.ValueTag(sb, indent, "Unk19", FloatUtil.ToString(Unk19)); - RelXml.ValueTag(sb, indent, "Unk20", Unk20.ToString()); - RelXml.ValueTag(sb, indent, "Unk21", Unk21.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterBias", FloatUtil.ToString(VehicleEmitterBias)); + RelXml.StringTag(sb, indent, "StaticEmitter", RelXml.HashString(StaticEmitter)); + RelXml.ValueTag(sb, indent, "StaticEmitterMinTime", FloatUtil.ToString(StaticEmitterMinTime)); + RelXml.ValueTag(sb, indent, "StaticEmitterMaxTime", FloatUtil.ToString(StaticEmitterMaxTime)); + RelXml.ValueTag(sb, indent, "StaticEmitterMinFadeRadius", FloatUtil.ToString(StaticEmitterMinFadeRadius)); + RelXml.ValueTag(sb, indent, "StaticEmitterMaxFadeRadius", FloatUtil.ToString(StaticEmitterMaxFadeRadius)); + RelXml.ValueTag(sb, indent, "StaticEmitterMinRetriggerTime", StaticEmitterMinRetriggerTime.ToString()); + RelXml.ValueTag(sb, indent, "StaticEmitterMaxRetriggerTime", StaticEmitterMaxRetriggerTime.ToString()); + RelXml.StringTag(sb, indent, "VehicleEmitter", RelXml.HashString(VehicleEmitter)); + RelXml.ValueTag(sb, indent, "VehicleEmitterStaticEmitterMinTime", FloatUtil.ToString(VehicleEmitterStaticEmitterMinTime)); + RelXml.ValueTag(sb, indent, "VehicleEmitterStaticEmitterMaxTime", FloatUtil.ToString(VehicleEmitterStaticEmitterMaxTime)); + RelXml.ValueTag(sb, indent, "VehicleEmitterMinAttackTime", VehicleEmitterMinAttackTime.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterMaxAttackTime", VehicleEmitterMaxAttackTime.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterMinHoldTime", VehicleEmitterMinHoldTime.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterMaxHoldTime", VehicleEmitterMaxHoldTime.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterMinReleaseTime", VehicleEmitterMinReleaseTime.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterMaxReleaseTime", VehicleEmitterMaxReleaseTime.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterMinPanAngleChange", FloatUtil.ToString(VehicleEmitterMinPanAngleChange)); + RelXml.ValueTag(sb, indent, "VehicleEmitterMaxPanAngleChange", FloatUtil.ToString(VehicleEmitterMaxPanAngleChange)); + RelXml.ValueTag(sb, indent, "VehicleEmitterRetriggerTimeMin", VehicleEmitterRetriggerTimeMin.ToString()); + RelXml.ValueTag(sb, indent, "VehicleEmitterRetriggerTimeMax", VehicleEmitterRetriggerTimeMax.ToString()); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildFloatAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildFloatAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildIntAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09")); - Unk10 = Xml.GetChildFloatAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildFloatAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildIntAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildIntAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildIntAttribute(node, "Unk17", "value"); - Unk18 = Xml.GetChildFloatAttribute(node, "Unk18", "value"); - Unk19 = Xml.GetChildFloatAttribute(node, "Unk19", "value"); - Unk20 = Xml.GetChildIntAttribute(node, "Unk20", "value"); - Unk21 = Xml.GetChildIntAttribute(node, "Unk21", "value"); + VehicleEmitterBias = Xml.GetChildFloatAttribute(node, "VehicleEmitterBias", "value"); + StaticEmitter = XmlRel.GetHash(Xml.GetChildInnerText(node, "StaticEmitter")); + StaticEmitterMinTime = Xml.GetChildFloatAttribute(node, "StaticEmitterMinTime", "value"); + StaticEmitterMaxTime = Xml.GetChildFloatAttribute(node, "StaticEmitterMaxTime", "value"); + StaticEmitterMinFadeRadius = Xml.GetChildFloatAttribute(node, "StaticEmitterMinFadeRadius", "value"); + StaticEmitterMaxFadeRadius = Xml.GetChildFloatAttribute(node, "StaticEmitterMaxFadeRadius", "value"); + StaticEmitterMinRetriggerTime = Xml.GetChildUIntAttribute(node, "StaticEmitterMinRetriggerTime", "value"); + StaticEmitterMaxRetriggerTime = Xml.GetChildUIntAttribute(node, "StaticEmitterMaxRetriggerTime", "value"); + VehicleEmitter = XmlRel.GetHash(Xml.GetChildInnerText(node, "VehicleEmitter")); + VehicleEmitterStaticEmitterMinTime = Xml.GetChildFloatAttribute(node, "VehicleEmitterStaticEmitterMinTime", "value"); + VehicleEmitterStaticEmitterMaxTime = Xml.GetChildFloatAttribute(node, "VehicleEmitterStaticEmitterMaxTime", "value"); + VehicleEmitterMinAttackTime = Xml.GetChildUIntAttribute(node, "VehicleEmitterMinAttackTime", "value"); + VehicleEmitterMaxAttackTime = Xml.GetChildUIntAttribute(node, "VehicleEmitterMaxAttackTime", "value"); + VehicleEmitterMinHoldTime = Xml.GetChildUIntAttribute(node, "VehicleEmitterMinHoldTime", "value"); + VehicleEmitterMaxHoldTime = Xml.GetChildUIntAttribute(node, "VehicleEmitterMaxHoldTime", "value"); + VehicleEmitterMinReleaseTime = Xml.GetChildUIntAttribute(node, "VehicleEmitterMinReleaseTime", "value"); + VehicleEmitterMaxReleaseTime = Xml.GetChildUIntAttribute(node, "VehicleEmitterMaxReleaseTime", "value"); + VehicleEmitterMinPanAngleChange = Xml.GetChildFloatAttribute(node, "VehicleEmitterMinPanAngleChange", "value"); + VehicleEmitterMaxPanAngleChange = Xml.GetChildFloatAttribute(node, "VehicleEmitterMaxPanAngleChange", "value"); + VehicleEmitterRetriggerTimeMin = Xml.GetChildUIntAttribute(node, "VehicleEmitterRetriggerTimeMin", "value"); + VehicleEmitterRetriggerTimeMax = Xml.GetChildUIntAttribute(node, "VehicleEmitterRetriggerTimeMax", "value"); } public override MetaHash[] GetGameHashes() { - return new[] { Unk02, Unk09 }; + return new[] { StaticEmitter, VehicleEmitter }; } } - [TC(typeof(EXP))] public class Dat151TennisVFXSettings : Dat151RelData //tennis_vfx_settings + + [TC(typeof(EXP))] + public class Dat151TennisVocalizationSettings : Dat151RelData { - public MetaHash Unk01 { get; set; }//0 + public MetaHash Unk01 { get; set; } public float Unk02 { get; set; } - public MetaHash Unk03 { get; set; }//0 - public MetaHash Unk04 { get; set; }//0 - public MetaHash Unk05 { get; set; }//0 - public MetaHash Unk06 { get; set; }//0 + public MetaHash Unk03 { get; set; } + public MetaHash Unk04 { get; set; } + public MetaHash Unk05 { get; set; } + public MetaHash Unk06 { get; set; } public float Unk07 { get; set; } - public MetaHash Unk08 { get; set; }//0 - public MetaHash Unk09 { get; set; }//0 - public MetaHash Unk10 { get; set; }//0 - public MetaHash Unk11 { get; set; }//0 + public MetaHash Unk08 { get; set; } + public MetaHash Unk09 { get; set; } + public MetaHash Unk10 { get; set; } + public MetaHash Unk11 { get; set; } public float Unk12 { get; set; } - public Dat151TennisVFXSettings(RelFile rel) : base(rel) + public Dat151TennisVocalizationSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.TennisVFXSettings; + Type = Dat151RelType.TennisVocalizationSettings; TypeID = (byte)Type; } - public Dat151TennisVFXSettings(RelData d, BinaryReader br) : base(d, br) + public Dat151TennisVocalizationSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32();//0 + Unk01 = br.ReadUInt32(); Unk02 = br.ReadSingle(); - Unk03 = br.ReadUInt32();//0 - Unk04 = br.ReadUInt32();//0 - Unk05 = br.ReadUInt32();//0 - Unk06 = br.ReadUInt32();//0 + Unk03 = br.ReadUInt32(); + Unk04 = br.ReadUInt32(); + Unk05 = br.ReadUInt32(); + Unk06 = br.ReadUInt32(); Unk07 = br.ReadSingle(); - Unk08 = br.ReadUInt32();//0 - Unk09 = br.ReadUInt32();//0 - Unk10 = br.ReadUInt32();//0 - Unk11 = br.ReadUInt32();//0 + Unk08 = br.ReadUInt32(); + Unk09 = br.ReadUInt32(); + Unk10 = br.ReadUInt32(); + Unk11 = br.ReadUInt32(); Unk12 = br.ReadSingle(); - - if (Unk01 != 0) - { } - if (Unk03 != 0) - { } - if (Unk04 != 0) - { } - if (Unk05 != 0) - { } - if (Unk06 != 0) - { } - if (Unk08 != 0) - { } - if (Unk09 != 0) - { } - if (Unk10 != 0) - { } - if (Unk11 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20295,201 +19596,203 @@ namespace CodeWalker.GameFiles Unk12 = Xml.GetChildFloatAttribute(node, "Unk12", "value"); } } - [TC(typeof(EXP))] public class Dat151Unk118 : Dat151RelData - { - public int Unk01 { get; set; } - public int Unk02 { get; set; } - public float Unk03 { get; set; } - public int Unk04 { get; set; } - public int Unk05 { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public short Unk08 { get; set; } - public short Unk09 { get; set; } - public float Unk10 { get; set; } - public float Unk11 { get; set; } - public int Unk12 { get; set; } - public int Unk13 { get; set; } - public float Unk14 { get; set; } - public float Unk15 { get; set; } - public int Unk16 { get; set; } - public int Unk17 { get; set; } - public float Unk18 { get; set; } - public int Unk19 { get; set; } - public float Unk20 { get; set; } - public Dat151Unk118(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151SportsCarRevsSettings : Dat151RelData + { + public int EngineVolumeBoost { get; set; } + public int ExhaustVolumeBoost { get; set; } + public float RollOffBoost { get; set; } + public int MinTriggerTime { get; set; } + public int MinRepeatTime { get; set; } + public float AttackTimeScalar { get; set; } + public float ReleaseTimeScalar { get; set; } + public byte SmallReverbSend { get; set; } + public byte MediumReverbSend { get; set; } + public byte LargeReverbSend { get; set; } + public byte padding { get; set; } + public float JunctionTriggerSpeed { get; set; } + public float JunctionStopSpeed { get; set; } + public int JunctionMinDistance { get; set; } + public int JunctionMaxDistance { get; set; } + public float PassbyTriggerSpeed { get; set; } + public float PassbyStopSpeed { get; set; } + public int PassbyMinDistance { get; set; } + public int PassbyMaxDistance { get; set; } + public float PassbyLookaheadTime { get; set; } + public int ClusterTriggerDistance { get; set; } + public float ClusterTriggerSpeed { get; set; } + + public Dat151SportsCarRevsSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Unk118; + Type = Dat151RelType.SportsCarRevsSettings; TypeID = (byte)Type; } - public Dat151Unk118(RelData d, BinaryReader br) : base(d, br) + public Dat151SportsCarRevsSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadInt32(); - Unk02 = br.ReadInt32(); - Unk03 = br.ReadSingle(); - Unk04 = br.ReadInt32(); - Unk05 = br.ReadInt32(); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadInt16(); - Unk09 = br.ReadInt16(); - Unk10 = br.ReadSingle(); - Unk11 = br.ReadSingle(); - Unk12 = br.ReadInt32(); - Unk13 = br.ReadInt32(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadSingle(); - Unk16 = br.ReadInt32(); - Unk17 = br.ReadInt32(); - Unk18 = br.ReadSingle(); - Unk19 = br.ReadInt32(); - Unk20 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + EngineVolumeBoost = br.ReadInt32(); + ExhaustVolumeBoost = br.ReadInt32(); + RollOffBoost = br.ReadSingle(); + MinTriggerTime = br.ReadInt32(); + MinRepeatTime = br.ReadInt32(); + AttackTimeScalar = br.ReadSingle(); + ReleaseTimeScalar = br.ReadSingle(); + SmallReverbSend = br.ReadByte(); + MediumReverbSend = br.ReadByte(); + LargeReverbSend = br.ReadByte(); + padding = br.ReadByte(); + JunctionTriggerSpeed = br.ReadSingle(); + JunctionStopSpeed = br.ReadSingle(); + JunctionMinDistance = br.ReadInt32(); + JunctionMaxDistance = br.ReadInt32(); + PassbyTriggerSpeed = br.ReadSingle(); + PassbyStopSpeed = br.ReadSingle(); + PassbyMinDistance = br.ReadInt32(); + PassbyMaxDistance = br.ReadInt32(); + PassbyLookaheadTime = br.ReadSingle(); + ClusterTriggerDistance = br.ReadInt32(); + ClusterTriggerSpeed = br.ReadSingle(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); - bw.Write(Unk04); - bw.Write(Unk05); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); - bw.Write(Unk17); - bw.Write(Unk18); - bw.Write(Unk19); - bw.Write(Unk20); + bw.Write(EngineVolumeBoost); + bw.Write(ExhaustVolumeBoost); + bw.Write(RollOffBoost); + bw.Write(MinTriggerTime); + bw.Write(MinRepeatTime); + bw.Write(AttackTimeScalar); + bw.Write(ReleaseTimeScalar); + bw.Write(SmallReverbSend); + bw.Write(MediumReverbSend); + bw.Write(LargeReverbSend); + bw.Write(padding); + bw.Write(JunctionTriggerSpeed); + bw.Write(JunctionStopSpeed); + bw.Write(JunctionMinDistance); + bw.Write(JunctionMaxDistance); + bw.Write(PassbyTriggerSpeed); + bw.Write(PassbyStopSpeed); + bw.Write(PassbyMinDistance); + bw.Write(PassbyMaxDistance); + bw.Write(PassbyLookaheadTime); + bw.Write(ClusterTriggerDistance); + bw.Write(ClusterTriggerSpeed); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString()); - RelXml.ValueTag(sb, indent, "Unk02", Unk02.ToString()); - RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03)); - RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString()); - RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString()); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", FloatUtil.ToString(Unk10)); - RelXml.ValueTag(sb, indent, "Unk11", FloatUtil.ToString(Unk11)); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.ToString()); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", FloatUtil.ToString(Unk15)); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); - RelXml.ValueTag(sb, indent, "Unk17", Unk17.ToString()); - RelXml.ValueTag(sb, indent, "Unk18", FloatUtil.ToString(Unk18)); - RelXml.ValueTag(sb, indent, "Unk19", Unk19.ToString()); - RelXml.ValueTag(sb, indent, "Unk20", FloatUtil.ToString(Unk20)); + RelXml.ValueTag(sb, indent, "EngineVolumeBoost", EngineVolumeBoost.ToString()); + RelXml.ValueTag(sb, indent, "ExhaustVolumeBoost", ExhaustVolumeBoost.ToString()); + RelXml.ValueTag(sb, indent, "RollOffBoost", FloatUtil.ToString(RollOffBoost)); + RelXml.ValueTag(sb, indent, "MinTriggerTime", MinTriggerTime.ToString()); + RelXml.ValueTag(sb, indent, "MinRepeatTime", MinRepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "AttackTimeScalar", FloatUtil.ToString(AttackTimeScalar)); + RelXml.ValueTag(sb, indent, "ReleaseTimeScalar", FloatUtil.ToString(ReleaseTimeScalar)); + RelXml.ValueTag(sb, indent, "SmallReverbSend", SmallReverbSend.ToString()); + RelXml.ValueTag(sb, indent, "MediumReverbSend", MediumReverbSend.ToString()); + RelXml.ValueTag(sb, indent, "LargeReverbSend", LargeReverbSend.ToString()); + RelXml.ValueTag(sb, indent, "JunctionTriggerSpeed", FloatUtil.ToString(JunctionTriggerSpeed)); + RelXml.ValueTag(sb, indent, "JunctionStopSpeed", FloatUtil.ToString(JunctionStopSpeed)); + RelXml.ValueTag(sb, indent, "JunctionMinDistance", JunctionMinDistance.ToString()); + RelXml.ValueTag(sb, indent, "JunctionMaxDistance", JunctionMaxDistance.ToString()); + RelXml.ValueTag(sb, indent, "PassbyTriggerSpeed", FloatUtil.ToString(PassbyTriggerSpeed)); + RelXml.ValueTag(sb, indent, "PassbyStopSpeed", FloatUtil.ToString(PassbyStopSpeed)); + RelXml.ValueTag(sb, indent, "PassbyMinDistance", PassbyMinDistance.ToString()); + RelXml.ValueTag(sb, indent, "PassbyMaxDistance", PassbyMaxDistance.ToString()); + RelXml.ValueTag(sb, indent, "PassbyLookaheadTime", FloatUtil.ToString(PassbyLookaheadTime)); + RelXml.ValueTag(sb, indent, "ClusterTriggerDistance", ClusterTriggerDistance.ToString()); + RelXml.ValueTag(sb, indent, "ClusterTriggerSpeed", FloatUtil.ToString(ClusterTriggerSpeed)); } public override void ReadXml(XmlNode node) { - Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value"); - Unk02 = Xml.GetChildIntAttribute(node, "Unk02", "value"); - Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value"); - Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value"); - Unk05 = Xml.GetChildIntAttribute(node, "Unk05", "value"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = (short)Xml.GetChildIntAttribute(node, "Unk08", "value"); - Unk09 = (short)Xml.GetChildIntAttribute(node, "Unk09", "value"); - Unk10 = Xml.GetChildFloatAttribute(node, "Unk10", "value"); - Unk11 = Xml.GetChildFloatAttribute(node, "Unk11", "value"); - Unk12 = Xml.GetChildIntAttribute(node, "Unk12", "value"); - Unk13 = Xml.GetChildIntAttribute(node, "Unk13", "value"); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = Xml.GetChildFloatAttribute(node, "Unk15", "value"); - Unk16 = Xml.GetChildIntAttribute(node, "Unk16", "value"); - Unk17 = Xml.GetChildIntAttribute(node, "Unk17", "value"); - Unk18 = Xml.GetChildFloatAttribute(node, "Unk18", "value"); - Unk19 = Xml.GetChildIntAttribute(node, "Unk19", "value"); - Unk20 = Xml.GetChildFloatAttribute(node, "Unk20", "value"); + EngineVolumeBoost = Xml.GetChildIntAttribute(node, "EngineVolumeBoost", "value"); + ExhaustVolumeBoost = Xml.GetChildIntAttribute(node, "ExhaustVolumeBoost", "value"); + RollOffBoost = Xml.GetChildFloatAttribute(node, "RollOffBoost", "value"); + MinTriggerTime = Xml.GetChildIntAttribute(node, "MinTriggerTime", "value"); + MinRepeatTime = Xml.GetChildIntAttribute(node, "MinRepeatTime", "value"); + AttackTimeScalar = Xml.GetChildFloatAttribute(node, "AttackTimeScalar", "value"); + ReleaseTimeScalar = Xml.GetChildFloatAttribute(node, "ReleaseTimeScalar", "value"); + SmallReverbSend = (byte)Xml.GetChildIntAttribute(node, "SmallReverbSend", "value"); + MediumReverbSend = (byte)Xml.GetChildIntAttribute(node, "MediumReverbSend", "value"); + LargeReverbSend = (byte)Xml.GetChildIntAttribute(node, "LargeReverbSend", "value"); + JunctionTriggerSpeed = Xml.GetChildFloatAttribute(node, "JunctionTriggerSpeed", "value"); + JunctionStopSpeed = Xml.GetChildFloatAttribute(node, "JunctionStopSpeed", "value"); + JunctionMinDistance = Xml.GetChildIntAttribute(node, "JunctionMinDistance", "value"); + JunctionMaxDistance = Xml.GetChildIntAttribute(node, "JunctionMaxDistance", "value"); + PassbyTriggerSpeed = Xml.GetChildFloatAttribute(node, "PassbyTriggerSpeed", "value"); + PassbyStopSpeed = Xml.GetChildFloatAttribute(node, "PassbyStopSpeed", "value"); + PassbyMinDistance = Xml.GetChildIntAttribute(node, "PassbyMinDistance", "value"); + PassbyMaxDistance = Xml.GetChildIntAttribute(node, "PassbyMaxDistance", "value"); + PassbyLookaheadTime = Xml.GetChildFloatAttribute(node, "PassbyLookaheadTime", "value"); + ClusterTriggerDistance = Xml.GetChildIntAttribute(node, "ClusterTriggerDistance", "value"); + ClusterTriggerSpeed = Xml.GetChildFloatAttribute(node, "ClusterTriggerSpeed", "value"); } } - [TC(typeof(EXP))] public class Dat151Foliage : Dat151RelData //prop_bush_lrg_02 - { - public MetaHash Unk01 { get; set; } - public MetaHash Unk02 { get; set; } - public MetaHash Unk03 { get; set; } - public Dat151Foliage(RelFile rel) : base(rel) + [TC(typeof(EXP))] + public class Dat151FoliageSettings : Dat151RelData //prop_bush_lrg_02 + { + public MetaHash Run { get; set; } + public MetaHash Sprint { get; set; } + public MetaHash Walk { get; set; } + + public Dat151FoliageSettings(RelFile rel) : base(rel) { - Type = Dat151RelType.Foliage; + Type = Dat151RelType.FoliageSettings; TypeID = (byte)Type; } - public Dat151Foliage(RelData d, BinaryReader br) : base(d, br) + public Dat151FoliageSettings(RelData d, BinaryReader br) : base(d, br) { - Unk01 = br.ReadUInt32(); - Unk02 = br.ReadUInt32(); - Unk03 = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + Run = br.ReadUInt32(); + Sprint = br.ReadUInt32(); + Walk = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { WriteTypeAndOffset(bw); - bw.Write(Unk01); - bw.Write(Unk02); - bw.Write(Unk03); + bw.Write(Run); + bw.Write(Sprint); + bw.Write(Walk); } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01)); - RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02)); - RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03)); + RelXml.StringTag(sb, indent, "Run", RelXml.HashString(Run)); + RelXml.StringTag(sb, indent, "Sprint", RelXml.HashString(Sprint)); + RelXml.StringTag(sb, indent, "Walk", RelXml.HashString(Walk)); } public override void ReadXml(XmlNode node) { - Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01")); - Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02")); - Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); + Run = XmlRel.GetHash(Xml.GetChildInnerText(node, "Run")); + Sprint = XmlRel.GetHash(Xml.GetChildInnerText(node, "Sprint")); + Walk = XmlRel.GetHash(Xml.GetChildInnerText(node, "Walk")); } public override MetaHash[] GetSoundHashes() { - return new[] { Unk01, Unk02, Unk03 }; + return new[] { Run, Sprint, Walk }; } } - [TC(typeof(EXP))] public class Dat151ModelAudioCollisionSettingsOverride : Dat151RelData //macs_models_overrides + + [TC(typeof(EXP))] + public class Dat151ModelAudioCollisionSettingsOverrideList : Dat151RelData //macs_models_overrides { public int ItemCount { get; set; } - public Dat151ModelAudioCollisionSettingsOverrideItem[] Items { get; set; } + public Dat151ModelAudioCollisionSettingsOverrideListItem[] Items { get; set; } - public Dat151ModelAudioCollisionSettingsOverride(RelFile rel) : base(rel) + public Dat151ModelAudioCollisionSettingsOverrideList(RelFile rel) : base(rel) { - Type = Dat151RelType.ModelAudioCollisionSettingsOverride; + Type = Dat151RelType.ModelAudioCollisionSettingsOverrideList; TypeID = (byte)Type; } - public Dat151ModelAudioCollisionSettingsOverride(RelData d, BinaryReader br) : base(d, br) + public Dat151ModelAudioCollisionSettingsOverrideList(RelData d, BinaryReader br) : base(d, br) { ItemCount = br.ReadInt32(); - Items = new Dat151ModelAudioCollisionSettingsOverrideItem[ItemCount]; + Items = new Dat151ModelAudioCollisionSettingsOverrideListItem[ItemCount]; for (int i = 0; i < ItemCount; i++) { - Items[i] = new Dat151ModelAudioCollisionSettingsOverrideItem(br); + Items[i] = new Dat151ModelAudioCollisionSettingsOverrideListItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20507,7 +19810,7 @@ namespace CodeWalker.GameFiles } public override void ReadXml(XmlNode node) { - Items = XmlRel.ReadItemArray(node, "Items"); + Items = XmlRel.ReadItemArray(node, "Items"); ItemCount = (Items?.Length ?? 0); } public override MetaHash[] GetGameHashes() @@ -20523,13 +19826,14 @@ namespace CodeWalker.GameFiles return list.ToArray(); } } + [TC(typeof(EXP))] - public struct Dat151ModelAudioCollisionSettingsOverrideItem : IMetaXmlItem + public struct Dat151ModelAudioCollisionSettingsOverrideListItem : IMetaXmlItem { public MetaHash Prop { get; set; } public MetaHash ModelAudioCollisionSettings { get; set; } - public Dat151ModelAudioCollisionSettingsOverrideItem(BinaryReader br) + public Dat151ModelAudioCollisionSettingsOverrideListItem(BinaryReader br) { Prop = br.ReadUInt32(); ModelAudioCollisionSettings = br.ReadUInt32(); @@ -20554,60 +19858,55 @@ namespace CodeWalker.GameFiles return Prop.ToString() + ": " + ModelAudioCollisionSettings.ToString(); } } - [TC(typeof(EXP))] public class Dat151RadioStationList2 : Dat151RelData + + [TC(typeof(EXP))] + public class Dat151GameObjectHashList : Dat151RelData { public FlagsUint Flags { get; set; } - public uint ItemCount { get; set; } - public MetaHash[] ItemHashes { get; set; } + public uint GameObjectHashesCount { get; set; } + public MetaHash[] GameObjectHashes { get; set; } - public Dat151RadioStationList2(RelFile rel) : base(rel) + public Dat151GameObjectHashList(RelFile rel) : base(rel) { - Type = Dat151RelType.RadioStationList2; + Type = Dat151RelType.GameObjectHashList; TypeID = (byte)Type; } - public Dat151RadioStationList2(RelData d, BinaryReader br) : base(d, br) + public Dat151GameObjectHashList(RelData d, BinaryReader br) : base(d, br) { Flags = br.ReadUInt32(); - ItemCount = br.ReadUInt32(); - ItemHashes = new MetaHash[ItemCount]; - for (int i = 0; i < ItemCount; i++) + GameObjectHashesCount = br.ReadUInt32(); + GameObjectHashes = new MetaHash[GameObjectHashesCount]; + for (int i = 0; i < GameObjectHashesCount; i++) { - ItemHashes[i] = br.ReadUInt32(); + GameObjectHashes[i] = br.ReadUInt32(); } - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } //no hits here - - } public override void Write(BinaryWriter bw) { - //base.Write(bw); WriteTypeAndOffset(bw); bw.Write(Flags); - bw.Write(ItemCount); - for (int i = 0; i < ItemCount; i++) + bw.Write(GameObjectHashesCount); + for (int i = 0; i < GameObjectHashesCount; i++) { - bw.Write(ItemHashes[i]); + bw.Write(GameObjectHashes[i]); } } public override void WriteXml(StringBuilder sb, int indent) { RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); - RelXml.WriteHashItemArray(sb, ItemHashes, indent, "Items"); + RelXml.WriteHashItemArray(sb, GameObjectHashes, indent, "GameObjectHashes"); } public override void ReadXml(XmlNode node) { Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); - ItemHashes = XmlRel.ReadHashItemArray(node, "Items"); - ItemCount = (uint)(ItemHashes?.Length ?? 0); + GameObjectHashes = XmlRel.ReadHashItemArray(node, "GameObjectHashes"); + GameObjectHashesCount = (uint)(GameObjectHashes?.Length ?? 0); } public override MetaHash[] GetGameHashes() { - return ItemHashes; + return GameObjectHashes; } } @@ -20635,7 +19934,8 @@ namespace CodeWalker.GameFiles ERSettings = 10, } - [TC(typeof(EXP))] public class Dat4ConfigData : RelData + [TC(typeof(EXP))] + public class Dat4ConfigData : RelData { public Dat4ConfigType Type { get; set; } public uint NameTableOffset { get; set; } @@ -20663,7 +19963,6 @@ namespace CodeWalker.GameFiles public override void Write(BinaryWriter bw) { //don't use this as a fallback case, since it won't write as raw data - //base.Write(bw); var val = ((NameTableOffset & 0xFFFFFF) << 8) + TypeID; bw.Write(val); bw.Write(Flags); @@ -20687,7 +19986,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat4ConfigInt : Dat4ConfigData + [TC(typeof(EXP))] + public class Dat4ConfigInt : Dat4ConfigData { public int Value { get; set; } @@ -20699,10 +19999,6 @@ namespace CodeWalker.GameFiles public Dat4ConfigInt(RelData d, BinaryReader br) : base(d, br) { Value = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20720,7 +20016,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildIntAttribute(node, "Value", "value"); } } - [TC(typeof(EXP))] public class Dat4ConfigUnsignedInt : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigUnsignedInt : Dat4ConfigData { public uint Value { get; set; } @@ -20732,10 +20030,6 @@ namespace CodeWalker.GameFiles public Dat4ConfigUnsignedInt(RelData d, BinaryReader br) : base(d, br) { Value = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20753,7 +20047,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildUIntAttribute(node, "Value", "value"); } } - [TC(typeof(EXP))] public class Dat4ConfigFloat : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigFloat : Dat4ConfigData { public float Value { get; set; } @@ -20765,10 +20061,6 @@ namespace CodeWalker.GameFiles public Dat4ConfigFloat(RelData d, BinaryReader br) : base(d, br) { Value = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20786,7 +20078,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildFloatAttribute(node, "Value", "value"); } } - [TC(typeof(EXP))] public class Dat4ConfigString : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigString : Dat4ConfigData { public string Value { get; set; } @@ -20799,10 +20093,6 @@ namespace CodeWalker.GameFiles { var data = br.ReadBytes(64); Value = Encoding.ASCII.GetString(data).Replace("\0", ""); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20827,7 +20117,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildInnerText(node, "Value"); } } - [TC(typeof(EXP))] public class Dat4ConfigVector3 : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigVector3 : Dat4ConfigData { public Vector3 Value { get; set; } @@ -20841,10 +20133,6 @@ namespace CodeWalker.GameFiles br.ReadBytes(8); // alignment padding Value = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());//0x10-0x1C br.ReadBytes(4); // alignment padding - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20866,7 +20154,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildVector3Attributes(node, "Value"); } } - [TC(typeof(EXP))] public class Dat4ConfigVariableList : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigVariableList : Dat4ConfigData { public int VariableCount { get; set; } public VariableValue[] Variables { get; set; } @@ -20915,9 +20205,6 @@ namespace CodeWalker.GameFiles { Variables[i] = new VariableValue(br); } - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -20940,14 +20227,16 @@ namespace CodeWalker.GameFiles VariableCount = (Variables?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat4ConfigWaveSlot : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigWaveSlot : Dat4ConfigData { - public int Unk1 { get; set; } - public int MaxHeaderSize { get; set; } - public int Size { get; set; } + public int LoadType { get; set; } + public uint MaxHeaderSize { get; set; } + public uint Size { get; set; } public MetaHash StaticBank { get; set; } - public int MaxDataSize { get; set; } - public int Unk6 { get; set; } + public uint MaxMetadataSize { get; set; } + public uint MaxDataSize { get; set; } public Dat4ConfigWaveSlot(RelFile rel) : base(rel) { @@ -20956,49 +20245,48 @@ namespace CodeWalker.GameFiles } public Dat4ConfigWaveSlot(RelData d, BinaryReader br) : base(d, br) { - Unk1 = br.ReadInt32(); - MaxHeaderSize = br.ReadInt32(); - Size = br.ReadInt32(); + LoadType = br.ReadInt32(); + MaxHeaderSize = br.ReadUInt32(); + Size = br.ReadUInt32(); StaticBank = br.ReadUInt32(); - MaxDataSize = br.ReadInt32(); - Unk6 = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } + MaxMetadataSize = br.ReadUInt32(); + MaxDataSize = br.ReadUInt32(); } public override void Write(BinaryWriter bw) { base.Write(bw); - bw.Write(Unk1); + + bw.Write(LoadType); bw.Write(MaxHeaderSize); bw.Write(Size); bw.Write(StaticBank); + bw.Write(MaxMetadataSize); bw.Write(MaxDataSize); - bw.Write(Unk6); } public override void WriteXml(StringBuilder sb, int indent) { base.WriteXml(sb, indent); - RelXml.ValueTag(sb, indent, "Unk1", Unk1.ToString()); + RelXml.ValueTag(sb, indent, "LoadType", LoadType.ToString()); RelXml.ValueTag(sb, indent, "MaxHeaderSize", MaxHeaderSize.ToString()); RelXml.ValueTag(sb, indent, "Size", Size.ToString()); RelXml.StringTag(sb, indent, "StaticBank", RelXml.HashString(StaticBank)); + RelXml.ValueTag(sb, indent, "MaxMetadataSize", MaxMetadataSize.ToString()); RelXml.ValueTag(sb, indent, "MaxDataSize", MaxDataSize.ToString()); - RelXml.ValueTag(sb, indent, "Unk6", Unk6.ToString()); } public override void ReadXml(XmlNode node) { base.ReadXml(node); - Unk1 = Xml.GetChildIntAttribute(node, "Unk1", "value"); - MaxHeaderSize = Xml.GetChildIntAttribute(node, "MaxHeaderSize", "value"); - Size = Xml.GetChildIntAttribute(node, "Size", "value"); + LoadType = Xml.GetChildIntAttribute(node, "LoadType", "value"); + MaxHeaderSize = Xml.GetChildUIntAttribute(node, "MaxHeaderSize", "value"); + Size = Xml.GetChildUIntAttribute(node, "Size", "value"); StaticBank = XmlRel.GetHash(Xml.GetChildInnerText(node, "StaticBank")); - MaxDataSize = Xml.GetChildIntAttribute(node, "MaxDataSize", "value"); - Unk6 = Xml.GetChildIntAttribute(node, "Unk6", "value"); + MaxMetadataSize = Xml.GetChildUIntAttribute(node, "MaxMetadataSize", "value"); + MaxDataSize = Xml.GetChildUIntAttribute(node, "MaxDataSize", "value"); } } - [TC(typeof(EXP))] public class Dat4ConfigWaveSlotsList : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigWaveSlotsList : Dat4ConfigData { public int WaveSlotsCount { get; set; } public MetaHash[] WaveSlots { get; set; } @@ -21016,9 +20304,6 @@ namespace CodeWalker.GameFiles { WaveSlots[i] = br.ReadUInt32(); } - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -21050,24 +20335,26 @@ namespace CodeWalker.GameFiles return offsets.ToArray(); } } - [TC(typeof(EXP))] public class Dat4ConfigERSettings : Dat4ConfigData + + [TC(typeof(EXP))] + public class Dat4ConfigERSettings : Dat4ConfigData { // hashes appear in companion float RoomSize { get; set; } - Vector3 hash_1F616274 { get; set; } + Vector3 RoomDimensions { get; set; } Vector3 ListenerPos { get; set; } int AllPassesCount { get; set; } Pass[] AllPasses { get; set; } - Vector4[] hash_84F123DC { get; set; } // fixed length 6 - Vector4 hash_526F5F8A { get; set; } - Vector4 hash_5071232B { get; set; } - Vector4 hash_7D4AA574 { get; set; } - int hash_0776BC75_Count { get; set; } - Vector4[] hash_0776BC75 { get; set; } - int hash_7475AA16_Count { get; set; } - Vector4[] hash_7475AA16 { get; set; } - int hash_EACC7FE3_Count { get; set; } - Vector4[] hash_EACC7FE3 { get; set; } + Vector4[] NodeGainMatrix { get; set; } // fixed length 6 + Vector4 Gain_1stOrder { get; set; } + Vector4 Gain_2ndOrder { get; set; } + Vector4 Gain_3rdOrder { get; set; } + int NodeLPF_1stOrdersCount { get; set; } + Vector4[] NodeLPF_1stOrder { get; set; } + int NodeLPF_2ndOrdersCount { get; set; } + Vector4[] NodeLPF_2ndOrder { get; set; } + int NodeLPF_3rdOrders { get; set; } + Vector4[] NodeLPF_3rdOrder { get; set; } public class Pass : IMetaXmlItem @@ -21111,7 +20398,7 @@ namespace CodeWalker.GameFiles public Dat4ConfigERSettings(RelData d, BinaryReader br) : base(d, br) { RoomSize = br.ReadSingle(); - hash_1F616274 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + RoomDimensions = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); ListenerPos = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); AllPassesCount = br.ReadInt32(); AllPasses = new Pass[AllPassesCount]; @@ -21119,44 +20406,40 @@ namespace CodeWalker.GameFiles { AllPasses[i] = new Pass(br); } - hash_84F123DC = new Vector4[6]; - for (int i = 0; i < hash_84F123DC.Length; i++) + NodeGainMatrix = new Vector4[6]; + for (int i = 0; i < NodeGainMatrix.Length; i++) { - hash_84F123DC[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + NodeGainMatrix[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); } - hash_526F5F8A = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - hash_5071232B = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - hash_7D4AA574 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - hash_0776BC75_Count = br.ReadInt32(); - hash_0776BC75 = new Vector4[hash_0776BC75_Count]; - for (int i = 0; i < hash_0776BC75_Count; i++) + Gain_1stOrder = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Gain_2ndOrder = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Gain_3rdOrder = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + NodeLPF_1stOrdersCount = br.ReadInt32(); + NodeLPF_1stOrder = new Vector4[NodeLPF_1stOrdersCount]; + for (int i = 0; i < NodeLPF_1stOrdersCount; i++) { - hash_0776BC75[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + NodeLPF_1stOrder[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); } - hash_7475AA16_Count = br.ReadInt32(); - hash_7475AA16 = new Vector4[hash_0776BC75_Count]; - for (int i = 0; i < hash_7475AA16_Count; i++) + NodeLPF_2ndOrdersCount = br.ReadInt32(); + NodeLPF_2ndOrder = new Vector4[NodeLPF_1stOrdersCount]; + for (int i = 0; i < NodeLPF_2ndOrdersCount; i++) { - hash_7475AA16[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + NodeLPF_2ndOrder[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); } - hash_EACC7FE3_Count = br.ReadInt32(); - hash_EACC7FE3 = new Vector4[hash_0776BC75_Count]; - for (int i = 0; i < hash_EACC7FE3_Count; i++) + NodeLPF_3rdOrders = br.ReadInt32(); + NodeLPF_3rdOrder = new Vector4[NodeLPF_1stOrdersCount]; + for (int i = 0; i < NodeLPF_3rdOrders; i++) { - hash_EACC7FE3[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + NodeLPF_3rdOrder[i] = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { base.Write(bw); bw.Write(RoomSize); - bw.Write(hash_1F616274.X); - bw.Write(hash_1F616274.Y); - bw.Write(hash_1F616274.Z); + bw.Write(RoomDimensions.X); + bw.Write(RoomDimensions.Y); + bw.Write(RoomDimensions.Z); bw.Write(ListenerPos.X); bw.Write(ListenerPos.Y); bw.Write(ListenerPos.Z); @@ -21165,115 +20448,87 @@ namespace CodeWalker.GameFiles { AllPasses[i].Write(bw); } - for (int i = 0; i < hash_84F123DC.Length; i++) + for (int i = 0; i < NodeGainMatrix.Length; i++) { - bw.Write(hash_84F123DC[i].X); - bw.Write(hash_84F123DC[i].Y); - bw.Write(hash_84F123DC[i].Z); - bw.Write(hash_84F123DC[i].W); + bw.Write(NodeGainMatrix[i].X); + bw.Write(NodeGainMatrix[i].Y); + bw.Write(NodeGainMatrix[i].Z); + bw.Write(NodeGainMatrix[i].W); } - bw.Write(hash_526F5F8A.X); - bw.Write(hash_526F5F8A.Y); - bw.Write(hash_526F5F8A.Z); - bw.Write(hash_526F5F8A.W); - bw.Write(hash_5071232B.X); - bw.Write(hash_5071232B.Y); - bw.Write(hash_5071232B.Z); - bw.Write(hash_5071232B.W); - bw.Write(hash_7D4AA574.X); - bw.Write(hash_7D4AA574.Y); - bw.Write(hash_7D4AA574.Z); - bw.Write(hash_7D4AA574.W); - bw.Write(hash_0776BC75_Count); - for (int i = 0; i < hash_0776BC75_Count; i++) + bw.Write(Gain_1stOrder.X); + bw.Write(Gain_1stOrder.Y); + bw.Write(Gain_1stOrder.Z); + bw.Write(Gain_1stOrder.W); + bw.Write(Gain_2ndOrder.X); + bw.Write(Gain_2ndOrder.Y); + bw.Write(Gain_2ndOrder.Z); + bw.Write(Gain_2ndOrder.W); + bw.Write(Gain_3rdOrder.X); + bw.Write(Gain_3rdOrder.Y); + bw.Write(Gain_3rdOrder.Z); + bw.Write(Gain_3rdOrder.W); + bw.Write(NodeLPF_1stOrdersCount); + for (int i = 0; i < NodeLPF_1stOrdersCount; i++) { - bw.Write(hash_0776BC75[i].X); - bw.Write(hash_0776BC75[i].Y); - bw.Write(hash_0776BC75[i].Z); - bw.Write(hash_0776BC75[i].W); + bw.Write(NodeLPF_1stOrder[i].X); + bw.Write(NodeLPF_1stOrder[i].Y); + bw.Write(NodeLPF_1stOrder[i].Z); + bw.Write(NodeLPF_1stOrder[i].W); } - bw.Write(hash_7475AA16_Count); - for (int i = 0; i < hash_7475AA16_Count; i++) + bw.Write(NodeLPF_2ndOrdersCount); + for (int i = 0; i < NodeLPF_2ndOrdersCount; i++) { - bw.Write(hash_7475AA16[i].X); - bw.Write(hash_7475AA16[i].Y); - bw.Write(hash_7475AA16[i].Z); - bw.Write(hash_7475AA16[i].W); + bw.Write(NodeLPF_2ndOrder[i].X); + bw.Write(NodeLPF_2ndOrder[i].Y); + bw.Write(NodeLPF_2ndOrder[i].Z); + bw.Write(NodeLPF_2ndOrder[i].W); } - bw.Write(hash_EACC7FE3_Count); - for (int i = 0; i < hash_EACC7FE3_Count; i++) + bw.Write(NodeLPF_3rdOrders); + for (int i = 0; i < NodeLPF_3rdOrders; i++) { - bw.Write(hash_EACC7FE3[i].X); - bw.Write(hash_EACC7FE3[i].Y); - bw.Write(hash_EACC7FE3[i].Z); - bw.Write(hash_EACC7FE3[i].W); + bw.Write(NodeLPF_3rdOrder[i].X); + bw.Write(NodeLPF_3rdOrder[i].Y); + bw.Write(NodeLPF_3rdOrder[i].Z); + bw.Write(NodeLPF_3rdOrder[i].W); } } public override void WriteXml(StringBuilder sb, int indent) { base.WriteXml(sb, indent); RelXml.ValueTag(sb, indent, "RoomSize", FloatUtil.ToString(RoomSize)); - RelXml.SelfClosingTag(sb, indent, "hash_1F616274 " + FloatUtil.GetVector3XmlString(hash_1F616274)); + RelXml.SelfClosingTag(sb, indent, "RoomDimensions " + FloatUtil.GetVector3XmlString(RoomDimensions)); RelXml.SelfClosingTag(sb, indent, "ListenerPos " + FloatUtil.GetVector3XmlString(ListenerPos)); RelXml.WriteItemArray(sb, AllPasses, indent, "AllPasses"); - RelXml.WriteRawArray(sb, hash_84F123DC, indent, "hash_84F123DC", "", RelXml.FormatVector4, 1); - RelXml.SelfClosingTag(sb, indent, "hash_526F5F8A " + FloatUtil.GetVector4XmlString(hash_526F5F8A)); - RelXml.SelfClosingTag(sb, indent, "hash_5071232B " + FloatUtil.GetVector4XmlString(hash_5071232B)); - RelXml.SelfClosingTag(sb, indent, "hash_7D4AA574 " + FloatUtil.GetVector4XmlString(hash_7D4AA574)); - RelXml.WriteRawArray(sb, hash_0776BC75, indent, "hash_0776BC75", "", RelXml.FormatVector4, 1); - RelXml.WriteRawArray(sb, hash_7475AA16, indent, "hash_7475AA16", "", RelXml.FormatVector4, 1); - RelXml.WriteRawArray(sb, hash_EACC7FE3, indent, "hash_EACC7FE3", "", RelXml.FormatVector4, 1); + RelXml.WriteRawArray(sb, NodeGainMatrix, indent, "NodeGainMatrix", "", RelXml.FormatVector4, 1); + RelXml.SelfClosingTag(sb, indent, "Gain_1stOrder " + FloatUtil.GetVector4XmlString(Gain_1stOrder)); + RelXml.SelfClosingTag(sb, indent, "Gain_2ndOrder " + FloatUtil.GetVector4XmlString(Gain_2ndOrder)); + RelXml.SelfClosingTag(sb, indent, "Gain_3rdOrder " + FloatUtil.GetVector4XmlString(Gain_3rdOrder)); + RelXml.WriteRawArray(sb, NodeLPF_1stOrder, indent, "NodeLPF_1stOrder", "", RelXml.FormatVector4, 1); + RelXml.WriteRawArray(sb, NodeLPF_2ndOrder, indent, "NodeLPF_2ndOrder", "", RelXml.FormatVector4, 1); + RelXml.WriteRawArray(sb, NodeLPF_3rdOrder, indent, "NodeLPF_3rdOrder", "", RelXml.FormatVector4, 1); } public override void ReadXml(XmlNode node) { base.ReadXml(node); RoomSize = Xml.GetChildFloatAttribute(node, "RoomSize", "value"); - hash_1F616274 = Xml.GetChildVector3Attributes(node, "hash_1F616274"); + RoomDimensions = Xml.GetChildVector3Attributes(node, "RoomDimensions"); ListenerPos = Xml.GetChildVector3Attributes(node, "ListenerPos"); AllPasses = XmlRel.ReadItemArray(node, "AllPasses"); AllPassesCount = (AllPasses?.Length ?? 0); - hash_84F123DC = Xml.GetChildRawVector4Array(node, "hash_84F123DC"); - hash_526F5F8A = Xml.GetChildVector4Attributes(node, "hash_526F5F8A"); - hash_5071232B = Xml.GetChildVector4Attributes(node, "hash_5071232B"); - hash_7D4AA574 = Xml.GetChildVector4Attributes(node, "hash_7D4AA574"); - hash_0776BC75 = Xml.GetChildRawVector4Array(node, "hash_0776BC75"); - hash_7475AA16 = Xml.GetChildRawVector4Array(node, "hash_7475AA16"); - hash_EACC7FE3 = Xml.GetChildRawVector4Array(node, "hash_EACC7FE3"); - hash_0776BC75_Count = hash_0776BC75?.Length ?? 0; - hash_7475AA16_Count = hash_7475AA16?.Length ?? 0; - hash_EACC7FE3_Count = hash_EACC7FE3?.Length ?? 0; + NodeGainMatrix = Xml.GetChildRawVector4Array(node, "NodeGainMatrix"); + Gain_1stOrder = Xml.GetChildVector4Attributes(node, "Gain_1stOrder"); + Gain_2ndOrder = Xml.GetChildVector4Attributes(node, "Gain_2ndOrder"); + Gain_3rdOrder = Xml.GetChildVector4Attributes(node, "Gain_3rdOrder"); + NodeLPF_1stOrder = Xml.GetChildRawVector4Array(node, "NodeLPF_1stOrder"); + NodeLPF_2ndOrder = Xml.GetChildRawVector4Array(node, "NodeLPF_2ndOrder"); + NodeLPF_3rdOrder = Xml.GetChildRawVector4Array(node, "NodeLPF_3rdOrder"); + NodeLPF_1stOrdersCount = NodeLPF_1stOrder?.Length ?? 0; + NodeLPF_2ndOrdersCount = NodeLPF_2ndOrder?.Length ?? 0; + NodeLPF_3rdOrders = NodeLPF_3rdOrder?.Length ?? 0; } } - //[TC(typeof(EXP))] public class Dat4ConfigBlankTemplateItem : Dat4ConfigData - //{ - // public Dat4ConfigBlankTemplateItem(RelFile rel) : base(rel) - // { - // Type = Dat4ConfigType.RELTYPE; - // TypeID = (byte)Type; - // } - // public Dat4ConfigBlankTemplateItem(RelData d, BinaryReader br) : base(d, br) - // { - // var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - // if (bytesleft != 0) - // { } - // } - // public override void Write(BinaryWriter bw) - // { - // base.Write(bw); - // } - // public override void WriteXml(StringBuilder sb, int indent) - // { - // base.WriteXml(sb, indent); - // } - // public override void ReadXml(XmlNode node) - // { - // base.ReadXml(node); - // } - //} - - #endregion @@ -21290,7 +20545,8 @@ namespace CodeWalker.GameFiles Container = 8, } - [TC(typeof(EXP))] public class Dat4SpeechData : RelData + [TC(typeof(EXP))] + public class Dat4SpeechData : RelData { public Dat4SpeechType Type { get; set; } @@ -21414,7 +20670,8 @@ namespace CodeWalker.GameFiles Synth = 3, } - [TC(typeof(EXP))] public class Dat10RelData : RelData + [TC(typeof(EXP))] + public class Dat10RelData : RelData { public Dat10RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -21449,7 +20706,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat10SynthPresetVariable : IMetaXmlItem + [TC(typeof(EXP))] + public class Dat10SynthPresetVariable : IMetaXmlItem { public MetaHash Name { get; set; } public float Value1 { get; set; } @@ -21486,7 +20744,9 @@ namespace CodeWalker.GameFiles return Name.ToString() + ": " + Value1.ToString() + ", " + Value2.ToString(); } } - [TC(typeof(EXP))] public class Dat10SynthPreset : Dat10RelData + + [TC(typeof(EXP))] + public class Dat10SynthPreset : Dat10RelData { public byte VariableCount { get; set; } public Dat10SynthPresetVariable[] Variables { get; set; } @@ -21504,10 +20764,6 @@ namespace CodeWalker.GameFiles { Variables[i] = new Dat10SynthPresetVariable(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -21531,7 +20787,9 @@ namespace CodeWalker.GameFiles VariableCount = (byte)(Variables?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat10SynthVariable : IMetaXmlItem + + [TC(typeof(EXP))] + public class Dat10SynthVariable : IMetaXmlItem { public MetaHash Name { get; set; } public float Value { get; set; } @@ -21563,7 +20821,9 @@ namespace CodeWalker.GameFiles return Name.ToString() + ": " + Value.ToString(); } } - [TC(typeof(EXP))] public class Dat10Synth : Dat10RelData + + [TC(typeof(EXP))] + public class Dat10Synth : Dat10RelData { // limits hardcoded in the .exe public const int MaxStateBlocks = 64; @@ -21614,10 +20874,6 @@ namespace CodeWalker.GameFiles if (d.NameHash == 2095626595)//synth_ambient_aircon_full { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23312,7 +22568,8 @@ namespace CodeWalker.GameFiles GroupMap = 9,//group map } - [TC(typeof(EXP))] public class Dat15RelData : RelData + [TC(typeof(EXP))] + public class Dat15RelData : RelData { public Dat15RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -23347,7 +22604,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat15Patch : Dat15RelData + [TC(typeof(EXP))] + public class Dat15Patch : Dat15RelData { public short FadeIn { get; set; } public short FadeOut { get; set; } @@ -23379,10 +22637,6 @@ namespace CodeWalker.GameFiles { MixCategories[i] = new Dat15PatchItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23522,7 +22776,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat15SceneState : Dat15RelData + [TC(typeof(EXP))] + public class Dat15SceneState : Dat15RelData { public byte ItemCount { get; set; } public Dat151HashPair[] Items { get; set; }//name hash, scene @@ -23540,10 +22795,6 @@ namespace CodeWalker.GameFiles { Items[i] = new Dat151HashPair(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23573,13 +22824,15 @@ namespace CodeWalker.GameFiles { foreach (var item in Items) { - list.Add(item.Hash1); + list.Add(item.SoundRef); } } return list.ToArray(); } } - [TC(typeof(EXP))] public class Dat15Scene : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15Scene : Dat15RelData { public MetaHash OnStopScene { get; set; }//0 public byte PatchGroupsCount { get; set; } @@ -23599,10 +22852,6 @@ namespace CodeWalker.GameFiles { PatchGroups[i] = new Dat15SceneItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23677,7 +22926,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat15Group : Dat15RelData + [TC(typeof(EXP))] + public class Dat15Group : Dat15RelData { public uint ReferenceCount { get; set; }//0 public float FadeTime { get; set; } @@ -23693,10 +22943,6 @@ namespace CodeWalker.GameFiles ReferenceCount = br.ReadUInt32(); FadeTime = br.ReadSingle(); Map = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23725,7 +22971,9 @@ namespace CodeWalker.GameFiles return new[] { Map }; } } - [TC(typeof(EXP))] public class Dat15GroupList : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15GroupList : Dat15RelData { public byte GroupCount { get; set; } public MetaHash[] Groups { get; set; } @@ -23743,10 +22991,6 @@ namespace CodeWalker.GameFiles { Groups[i] = br.ReadUInt32(); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23774,7 +23018,9 @@ namespace CodeWalker.GameFiles return Groups; } } - [TC(typeof(EXP))] public class Dat15DynamicMixModuleSettings : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15DynamicMixModuleSettings : Dat15RelData { public ushort FadeIn { get; set; }//0 public ushort FadeOut { get; set; }//0 @@ -23789,15 +23035,11 @@ namespace CodeWalker.GameFiles } public Dat15DynamicMixModuleSettings(RelData d, BinaryReader br) : base(d, br) { - FadeIn = br.ReadUInt16();//0 - FadeOut = br.ReadUInt16();//0 + FadeIn = br.ReadUInt16(); + FadeOut = br.ReadUInt16(); ApplyVariable = br.ReadUInt32(); - Duration = br.ReadUInt32();//0 + Duration = br.ReadUInt32(); ModuleTypeSettings = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23832,7 +23074,9 @@ namespace CodeWalker.GameFiles return new[] { ModuleTypeSettings }; } } - [TC(typeof(EXP))] public class Dat15SceneVariableModuleSettings : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15SceneVariableModuleSettings : Dat15RelData { public MetaHash SceneVariable { get; set; }//what is this? public MetaHash InputOutputCurve { get; set; } @@ -23854,10 +23098,6 @@ namespace CodeWalker.GameFiles { Items[i] = br.ReadSingle(); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23891,7 +23131,9 @@ namespace CodeWalker.GameFiles return new[] { InputOutputCurve }; } } - [TC(typeof(EXP))] public class Dat15SceneTransitionModuleSettings : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15SceneTransitionModuleSettings : Dat15RelData { public byte Unk01 { get; set; }//could be an array count? public float Unk02 { get; set; } @@ -23907,19 +23149,6 @@ namespace CodeWalker.GameFiles Unk01 = br.ReadByte(); Unk02 = br.ReadSingle(); Unk03 = br.ReadUInt32(); - - //byte ItemCount = br.ReadByte(); - //var Items = new MetaHash[ItemCount]; - //for (int i = 0; i < ItemCount; i++) - //{ - // Items[i] = br.ReadUInt32(); - //} - //if (ItemCount != 2) - //{ } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23944,7 +23173,9 @@ namespace CodeWalker.GameFiles Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03")); } } - [TC(typeof(EXP))] public class Dat15VehicleCollisionModuleSettings : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15VehicleCollisionModuleSettings : Dat15RelData { public byte Unk01 { get; set; } public MetaHash Unk02 { get; set; } @@ -23958,10 +23189,6 @@ namespace CodeWalker.GameFiles { Unk01 = br.ReadByte(); Unk02 = br.ReadUInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -23987,7 +23214,9 @@ namespace CodeWalker.GameFiles return new[] { Unk02 }; } } - [TC(typeof(EXP))] public class Dat15GroupMap : Dat15RelData + + [TC(typeof(EXP))] + public class Dat15GroupMap : Dat15RelData { public ushort ItemCount { get; set; } public Dat151GroupMapItem[] Items { get; set; } @@ -24005,10 +23234,6 @@ namespace CodeWalker.GameFiles { Items[i] = new Dat151GroupMapItem(br); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24108,7 +23333,8 @@ namespace CodeWalker.GameFiles //BezierCurve = 17, } - [TC(typeof(EXP))] public class Dat16RelData : RelData + [TC(typeof(EXP))] + public class Dat16RelData : RelData { public Dat16RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -24143,7 +23369,8 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat16ConstantCurve : Dat16RelData + [TC(typeof(EXP))] + public class Dat16ConstantCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24159,10 +23386,6 @@ namespace CodeWalker.GameFiles MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); Value = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24187,7 +23410,9 @@ namespace CodeWalker.GameFiles Value = Xml.GetChildFloatAttribute(node, "Value", "value"); } } - [TC(typeof(EXP))] public class Dat16LinearCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16LinearCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24209,10 +23434,6 @@ namespace CodeWalker.GameFiles Unk04 = br.ReadSingle(); Unk05 = br.ReadSingle(); Unk06 = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24246,7 +23467,9 @@ namespace CodeWalker.GameFiles Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); } } - [TC(typeof(EXP))] public class Dat16LinearDbCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16LinearDbCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24264,19 +23487,10 @@ namespace CodeWalker.GameFiles { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); - Unk03 = br.ReadSingle();//0 - Unk04 = br.ReadSingle();//0 + Unk03 = br.ReadSingle(); + Unk04 = br.ReadSingle(); Unk05 = br.ReadSingle(); Unk06 = br.ReadSingle(); - - if (Unk03 != 0) - { } - if (Unk04 != 0) - { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24310,7 +23524,9 @@ namespace CodeWalker.GameFiles Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); } } - [TC(typeof(EXP))] public class Dat16PiecewiseLinearCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16PiecewiseLinearCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24332,10 +23548,6 @@ namespace CodeWalker.GameFiles { Points[i] = new Vector2(br.ReadSingle(), br.ReadSingle()); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24366,7 +23578,9 @@ namespace CodeWalker.GameFiles PointCount = Points?.Length ?? 0; } } - [TC(typeof(EXP))] public class Dat16EqualPowerCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16EqualPowerCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24382,10 +23596,6 @@ namespace CodeWalker.GameFiles MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); Flip = br.ReadInt32(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24410,7 +23620,9 @@ namespace CodeWalker.GameFiles Flip = Xml.GetChildIntAttribute(node, "Flip", "value"); } } - [TC(typeof(EXP))] public class Dat16ValueTableCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16ValueTableCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24432,10 +23644,6 @@ namespace CodeWalker.GameFiles { Values[i] = br.ReadSingle(); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24465,7 +23673,9 @@ namespace CodeWalker.GameFiles ValueCount = (Values?.Length ?? 0); } } - [TC(typeof(EXP))] public class Dat16ExponentialCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16ExponentialCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24483,10 +23693,6 @@ namespace CodeWalker.GameFiles MaxInput = br.ReadSingle(); Flip = br.ReadInt32(); Exponent = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24514,7 +23720,9 @@ namespace CodeWalker.GameFiles Exponent = Xml.GetChildFloatAttribute(node, "Exponent", "value"); } } - [TC(typeof(EXP))] public class Dat16DecayingExponentialCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16DecayingExponentialCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24530,10 +23738,6 @@ namespace CodeWalker.GameFiles MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); HorizontalScaling = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24558,7 +23762,9 @@ namespace CodeWalker.GameFiles HorizontalScaling = Xml.GetChildFloatAttribute(node, "HorizontalScaling", "value"); } } - [TC(typeof(EXP))] public class Dat16DecayingSquaredExponentialCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16DecayingSquaredExponentialCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24574,10 +23780,6 @@ namespace CodeWalker.GameFiles MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); HorizontalScaling = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24602,7 +23804,9 @@ namespace CodeWalker.GameFiles HorizontalScaling = Xml.GetChildFloatAttribute(node, "HorizontalScaling", "value"); } } - [TC(typeof(EXP))] public class Dat16SineCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16SineCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24626,10 +23830,6 @@ namespace CodeWalker.GameFiles Frequency = br.ReadSingle(); VerticalScaling = br.ReadSingle(); VerticalOffset = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24666,7 +23866,9 @@ namespace CodeWalker.GameFiles VerticalOffset = Xml.GetChildFloatAttribute(node, "VerticalOffset", "value"); } } - [TC(typeof(EXP))] public class Dat16OneOverXSquaredCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16OneOverXSquaredCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24682,10 +23884,6 @@ namespace CodeWalker.GameFiles MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); HorizontalScaling = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24710,7 +23908,9 @@ namespace CodeWalker.GameFiles HorizontalScaling = Xml.GetChildFloatAttribute(node, "HorizontalScaling", "value"); } } - [TC(typeof(EXP))] public class Dat16DefaultDistanceAttenuationCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16DefaultDistanceAttenuationCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24724,10 +23924,6 @@ namespace CodeWalker.GameFiles { MinInput = br.ReadSingle(); MaxInput = br.ReadSingle(); - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24749,7 +23945,9 @@ namespace CodeWalker.GameFiles MaxInput = Xml.GetChildFloatAttribute(node, "MaxInput", "value"); } } - [TC(typeof(EXP))] public class Dat16DistanceAttenuationValueTableCurve : Dat16RelData + + [TC(typeof(EXP))] + public class Dat16DistanceAttenuationValueTableCurve : Dat16RelData { public float MinInput { get; set; } public float MaxInput { get; set; } @@ -24771,10 +23969,6 @@ namespace CodeWalker.GameFiles { Values[i] = br.ReadSingle(); } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -24819,7 +24013,8 @@ namespace CodeWalker.GameFiles Category = 0, } - [TC(typeof(EXP))] public class Dat22RelData : RelData + [TC(typeof(EXP))] + public class Dat22RelData : RelData { public Dat22RelType Type { get; set; } public uint NameTableOffset { get; set; } @@ -24854,15 +24049,16 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public class Dat22Category : Dat22RelData + [TC(typeof(EXP))] + public class Dat22Category : Dat22RelData { public short Unk01 { get; set; } public short Volume { get; set; } public short Unk03 { get; set; } public short LPFCutoff { get; set; } - public MetaHash LPFCutoffCurve { get; set; }//1757063444 + public MetaHash LPFCutoffCurve { get; set; } public short HPFCutoff { get; set; } - public MetaHash HPFCutoffCurve { get; set; }//741353067 + public MetaHash HPFCutoffCurve { get; set; } public short Unk08 { get; set; } public short Unk09 { get; set; } public short Unk10 { get; set; } @@ -24888,9 +24084,9 @@ namespace CodeWalker.GameFiles Volume = br.ReadInt16(); Unk03 = br.ReadInt16(); LPFCutoff = br.ReadInt16(); - LPFCutoffCurve = br.ReadUInt32();//1757063444 + LPFCutoffCurve = br.ReadUInt32(); HPFCutoff = br.ReadInt16(); - HPFCutoffCurve = br.ReadUInt32();//741353067 + HPFCutoffCurve = br.ReadUInt32(); Unk08 = br.ReadInt16(); Unk09 = br.ReadInt16(); Unk10 = br.ReadInt16(); @@ -24913,10 +24109,6 @@ namespace CodeWalker.GameFiles { } if (HPFCutoffCurve != 741353067) { } - - var bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } } public override void Write(BinaryWriter bw) { @@ -25406,7 +24598,4 @@ namespace CodeWalker.GameFiles return null; } } - - - } diff --git a/CodeWalker.Core/World/AudioZones.cs b/CodeWalker.Core/World/AudioZones.cs index a96834a..2900cba 100644 --- a/CodeWalker.Core/World/AudioZones.cs +++ b/CodeWalker.Core/World/AudioZones.cs @@ -13,10 +13,6 @@ namespace CodeWalker.World public volatile bool Inited = false; public GameFileCache GameFileCache; - public List Zones = new List(); - public List Emitters = new List(); - public List AllItems = new List(); - public Dictionary PlacementsDict = new Dictionary(); @@ -26,10 +22,6 @@ namespace CodeWalker.World GameFileCache = gameFileCache; - Zones.Clear(); - Emitters.Clear(); - AllItems.Clear(); - List placements = new List(); @@ -44,9 +36,6 @@ namespace CodeWalker.World PlacementsDict[relfile] = placements.ToArray(); } - AllItems.AddRange(Zones); - AllItems.AddRange(Emitters); - Inited = true; } @@ -59,12 +48,14 @@ namespace CodeWalker.World if (reldata is Dat151AmbientZone) { placement = new AudioPlacement(relfile, reldata as Dat151AmbientZone); - if (addtoLists) Zones.Add(placement); } else if (reldata is Dat151AmbientRule) { placement = new AudioPlacement(relfile, reldata as Dat151AmbientRule); - if (addtoLists) Emitters.Add(placement); + } + else if (reldata is Dat151StaticEmitter) + { + placement = new AudioPlacement(relfile, reldata as Dat151StaticEmitter); } if (placement != null) { @@ -105,8 +96,9 @@ namespace CodeWalker.World public string Name { get; set; } public MetaHash NameHash { get; set; } public RelFile RelFile { get; set; } - public Dat151AmbientZone AudioZone { get; set; } - public Dat151AmbientRule AudioEmitter { get; set; } + public Dat151AmbientZone AmbientZone { get; set; } + public Dat151AmbientRule AmbientRule { get; set; } + public Dat151StaticEmitter StaticEmitter { get; set; } public Dat151ZoneShape Shape { get; set; } public string ShortTypeName { get; set; } public string FullTypeName { get; set; } @@ -131,27 +123,37 @@ namespace CodeWalker.World public AudioPlacement(RelFile rel, Dat151AmbientZone zone) { RelFile = rel; - AudioZone = zone; - ShortTypeName = "AudioZone"; - FullTypeName = "Audio Zone"; + AmbientZone = zone; + ShortTypeName = "AmbientZone"; + FullTypeName = "Ambient Zone"; - UpdateFromZone(); + UpdateFromAmbientZone(); } - public AudioPlacement(RelFile rel, Dat151AmbientRule emitter) + public AudioPlacement(RelFile rel, Dat151AmbientRule rule) { RelFile = rel; - AudioEmitter = emitter; - ShortTypeName = "AudioEmitter"; - FullTypeName = "Audio Emitter"; + AmbientRule = rule; + ShortTypeName = "AmbientRule"; + FullTypeName = "Ambient Rule"; - UpdateFromEmitter(); + UpdateFromAmbientRule(); + } + public AudioPlacement(RelFile rel, Dat151StaticEmitter emitter) + { + RelFile = rel; + StaticEmitter = emitter; + ShortTypeName = "StaticEmitter"; + FullTypeName = "Static Emitter"; + + UpdateFromStaticEmitter(); } - public void UpdateFromZone() + + public void UpdateFromAmbientZone() { - if (AudioZone == null) return; - var zone = AudioZone; + if (AmbientZone == null) return; + var zone = AmbientZone; Name = zone.Name; NameHash = zone.NameHash; @@ -162,29 +164,29 @@ namespace CodeWalker.World switch (zone.Shape) { case Dat151ZoneShape.Box: - InnerPos = zone.PlaybackZonePosition; - InnerMax = zone.PlaybackZoneSize * 0.5f; + InnerPos = zone.PositioningZoneCentre; + InnerMax = zone.PositioningZoneSize * 0.5f; InnerMin = -InnerMax; - InnerOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.PlaybackZoneAngle * deg2rad); + InnerOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.PositioningZoneRotationAngle * deg2rad); break; case Dat151ZoneShape.Sphere: - InnerPos = zone.PlaybackZonePosition; + InnerPos = zone.PositioningZoneCentre; InnerOri = Quaternion.Identity; - InnerRadius = zone.PlaybackZoneSize.X; + InnerRadius = zone.PositioningZoneSize.X; OuterRadius = zone.ActivationZoneSize.X; break; case Dat151ZoneShape.Line: - InnerPos = zone.PlaybackZonePosition; + InnerPos = zone.PositioningZoneCentre; InnerMin = new Vector3(-1.0f, -1.0f, 0.0f); - InnerMax = new Vector3(1.0f, 1.0f, (zone.PlaybackZoneSize - zone.PlaybackZonePosition).Length()); - InnerOri = Quaternion.Invert(Quaternion.LookAtLH(zone.PlaybackZonePosition, zone.PlaybackZoneSize, Vector3.UnitZ)); + InnerMax = new Vector3(1.0f, 1.0f, (zone.PositioningZoneSize - zone.PositioningZoneCentre).Length()); + InnerOri = Quaternion.Invert(Quaternion.LookAtLH(zone.PositioningZoneCentre, zone.PositioningZoneSize, Vector3.UnitZ)); break; } - OuterPos = zone.ActivationZonePosition; + OuterPos = zone.ActivationZoneCentre; OuterMax = zone.ActivationZoneSize * 0.5f; OuterMin = -OuterMax; - OuterOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.ActivationZoneAngle * deg2rad); + OuterOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.ActivationZoneRotationAngle * deg2rad); bool useouter = ((InnerMax.X == 0) || (InnerMax.Y == 0) || (InnerMax.Z == 0)); if (useouter && (zone.Shape != Dat151ZoneShape.Sphere)) @@ -202,10 +204,36 @@ namespace CodeWalker.World } - public void UpdateFromEmitter() + public void UpdateFromAmbientRule() { - if (AudioEmitter == null) return; - var emitter = AudioEmitter; + if (AmbientRule == null) return; + var rule = AmbientRule; + + Name = rule.Name; + NameHash = rule.NameHash; + Shape = Dat151ZoneShape.Sphere; + + Orientation = Quaternion.Identity; + OrientationInv = Quaternion.Identity; + InnerPos = rule.Position; + OuterPos = InnerPos; + InnerRadius = rule.MinDist; + OuterRadius = rule.MaxDist; + + bool useouter = (InnerRadius == 0); + if (useouter) + { + InnerRadius = 1; + } + Position = InnerPos; + HitSphereRad = InnerRadius;// useouter ? OuterRadius : InnerRadius; + + } + + public void UpdateFromStaticEmitter() + { + if (StaticEmitter == null) return; + var emitter = StaticEmitter; Name = emitter.Name; NameHash = emitter.NameHash; @@ -215,8 +243,8 @@ namespace CodeWalker.World OrientationInv = Quaternion.Identity; InnerPos = emitter.Position; OuterPos = InnerPos; - InnerRadius = emitter.InnerRadius; - OuterRadius = emitter.OuterRadius; + InnerRadius = emitter.MinDistance; + OuterRadius = emitter.MaxDistance; bool useouter = (InnerRadius == 0); if (useouter) @@ -237,14 +265,18 @@ namespace CodeWalker.World OuterPos += delta; Position = useouter ? OuterPos : InnerPos; - if (AudioZone != null) + if (AmbientZone != null) { - AudioZone.PlaybackZonePosition = InnerPos; - AudioZone.ActivationZonePosition = OuterPos; + AmbientZone.PositioningZoneCentre = InnerPos; + AmbientZone.ActivationZoneCentre = OuterPos; } - if (AudioEmitter != null) + if (AmbientRule != null) { - AudioEmitter.Position = InnerPos; + AmbientRule.Position = InnerPos; + } + if (StaticEmitter != null) + { + StaticEmitter.Position = InnerPos; } } public void SetOrientation(Quaternion ori) @@ -264,10 +296,10 @@ namespace CodeWalker.World { InnerOri = Orientation; OuterOri = Orientation; - if (AudioZone != null) + if (AmbientZone != null) { - AudioZone.PlaybackZoneAngle = uangl; - AudioZone.ActivationZoneAngle = uangl; + AmbientZone.PositioningZoneRotationAngle = (ushort)uangl; + AmbientZone.ActivationZoneRotationAngle = (ushort)uangl; } } else @@ -278,17 +310,17 @@ namespace CodeWalker.World if (useouter) { OuterOri = Orientation; - if (AudioZone != null) + if (AmbientZone != null) { - AudioZone.ActivationZoneAngle = uangl; + AmbientZone.ActivationZoneRotationAngle = (ushort)uangl; } } else { InnerOri = Orientation; - if (AudioZone != null) + if (AmbientZone != null) { - AudioZone.PlaybackZoneAngle = uangl; + AmbientZone.PositioningZoneRotationAngle = (ushort)uangl; } } } diff --git a/CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioAmbientRulePanel.Designer.cs similarity index 82% rename from CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs rename to CodeWalker/Project/Panels/EditAudioAmbientRulePanel.Designer.cs index 52e6b3c..ff3dcb9 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditAudioAmbientRulePanel.Designer.cs @@ -1,6 +1,6 @@ namespace CodeWalker.Project.Panels { - partial class EditAudioEmitterPanel + partial class EditAudioAmbientRulePanel { /// /// Required designer variable. @@ -28,15 +28,21 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioEmitterPanel)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioAmbientRulePanel)); this.GoToButton = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.ExplicitSpawnCombo = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); this.Unk13UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk12UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk11UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk10UpDown = new System.Windows.Forms.NumericUpDown(); - this.Unk09UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk07UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk08UpDown = new System.Windows.Forms.NumericUpDown(); this.FrequencyUpDown = new System.Windows.Forms.NumericUpDown(); @@ -46,8 +52,6 @@ this.Flags5TextBox = new System.Windows.Forms.TextBox(); this.label22 = new System.Windows.Forms.Label(); this.Flags4TextBox = new System.Windows.Forms.TextBox(); - this.label19 = new System.Windows.Forms.Label(); - this.Flags3TextBox = new System.Windows.Forms.TextBox(); this.DeleteButton = new System.Windows.Forms.Button(); this.AddToProjectButton = new System.Windows.Forms.Button(); this.label21 = new System.Windows.Forms.Label(); @@ -57,10 +61,6 @@ this.label15 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.Flags1TextBox = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.Flags0TextBox = new System.Windows.Forms.TextBox(); this.label12 = new System.Windows.Forms.Label(); this.NameTextBox = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -77,16 +77,12 @@ this.InnerRadiusTextBox = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); this.PositionTextBox = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Unk13UpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk12UpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk11UpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk10UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.Unk09UpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk07UpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk08UpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.FrequencyUpDown)).BeginInit(); @@ -119,6 +115,10 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.ExplicitSpawnCombo); + this.tabPage1.Controls.Add(this.label13); + this.tabPage1.Controls.Add(this.label24); + this.tabPage1.Controls.Add(this.label11); this.tabPage1.Controls.Add(this.label9); this.tabPage1.Controls.Add(this.label8); this.tabPage1.Controls.Add(this.label5); @@ -126,7 +126,6 @@ this.tabPage1.Controls.Add(this.Unk12UpDown); this.tabPage1.Controls.Add(this.Unk11UpDown); this.tabPage1.Controls.Add(this.Unk10UpDown); - this.tabPage1.Controls.Add(this.Unk09UpDown); this.tabPage1.Controls.Add(this.Unk07UpDown); this.tabPage1.Controls.Add(this.Unk08UpDown); this.tabPage1.Controls.Add(this.FrequencyUpDown); @@ -136,8 +135,6 @@ this.tabPage1.Controls.Add(this.Flags5TextBox); this.tabPage1.Controls.Add(this.label22); this.tabPage1.Controls.Add(this.Flags4TextBox); - this.tabPage1.Controls.Add(this.label19); - this.tabPage1.Controls.Add(this.Flags3TextBox); this.tabPage1.Controls.Add(this.DeleteButton); this.tabPage1.Controls.Add(this.AddToProjectButton); this.tabPage1.Controls.Add(this.label21); @@ -147,10 +144,6 @@ this.tabPage1.Controls.Add(this.label15); this.tabPage1.Controls.Add(this.label17); this.tabPage1.Controls.Add(this.label18); - this.tabPage1.Controls.Add(this.label14); - this.tabPage1.Controls.Add(this.Flags1TextBox); - this.tabPage1.Controls.Add(this.label13); - this.tabPage1.Controls.Add(this.Flags0TextBox); this.tabPage1.Controls.Add(this.label12); this.tabPage1.Controls.Add(this.NameTextBox); this.tabPage1.Controls.Add(this.label6); @@ -172,12 +165,77 @@ this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(551, 421); this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Ambient Emitter"; + this.tabPage1.Text = "Ambient Rule"; this.tabPage1.UseVisualStyleBackColor = true; // + // ExplicitSpawnCombo + // + this.ExplicitSpawnCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ExplicitSpawnCombo.FormattingEnabled = true; + this.ExplicitSpawnCombo.Location = new System.Drawing.Point(412, 103); + this.ExplicitSpawnCombo.Name = "ExplicitSpawnCombo"; + this.ExplicitSpawnCombo.Size = new System.Drawing.Size(132, 21); + this.ExplicitSpawnCombo.TabIndex = 90; + this.ExplicitSpawnCombo.SelectedIndexChanged += new System.EventHandler(this.ExplicitSpawnCombo_SelectedIndexChanged); + // + // label13 + // + this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(329, 106); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(77, 13); + this.label13.TabIndex = 89; + this.label13.Text = "Explicit spawn:"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(7, 380); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(112, 13); + this.label24.TabIndex = 87; + this.label24.Text = "Max Global Instances:"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(7, 354); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(87, 13); + this.label11.TabIndex = 86; + this.label11.Text = "Max Path Depth:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(192, 178); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(78, 13); + this.label9.TabIndex = 45; + this.label9.Text = "(game minutes)"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(7, 203); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(55, 13); + this.label8.TabIndex = 46; + this.label8.Text = "End Time:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 253); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(94, 13); + this.label5.TabIndex = 50; + this.label5.Text = "Max Repeat Time:"; + // // Unk13UpDown // - this.Unk13UpDown.Location = new System.Drawing.Point(138, 325); + this.Unk13UpDown.Location = new System.Drawing.Point(126, 352); this.Unk13UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -190,7 +248,7 @@ // // Unk12UpDown // - this.Unk12UpDown.Location = new System.Drawing.Point(84, 325); + this.Unk12UpDown.Location = new System.Drawing.Point(126, 326); this.Unk12UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -203,7 +261,7 @@ // // Unk11UpDown // - this.Unk11UpDown.Location = new System.Drawing.Point(138, 301); + this.Unk11UpDown.Location = new System.Drawing.Point(126, 378); this.Unk11UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -216,7 +274,7 @@ // // Unk10UpDown // - this.Unk10UpDown.Location = new System.Drawing.Point(84, 301); + this.Unk10UpDown.Location = new System.Drawing.Point(126, 302); this.Unk10UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -227,22 +285,9 @@ this.Unk10UpDown.TabIndex = 56; this.Unk10UpDown.ValueChanged += new System.EventHandler(this.Unk10UpDown_ValueChanged); // - // Unk09UpDown - // - this.Unk09UpDown.Location = new System.Drawing.Point(138, 277); - this.Unk09UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.Unk09UpDown.Name = "Unk09UpDown"; - this.Unk09UpDown.Size = new System.Drawing.Size(48, 20); - this.Unk09UpDown.TabIndex = 54; - this.Unk09UpDown.ValueChanged += new System.EventHandler(this.Unk09UpDown_ValueChanged); - // // Unk07UpDown // - this.Unk07UpDown.Location = new System.Drawing.Point(84, 251); + this.Unk07UpDown.Location = new System.Drawing.Point(104, 253); this.Unk07UpDown.Maximum = new decimal(new int[] { 65535, 0, @@ -255,7 +300,7 @@ // // Unk08UpDown // - this.Unk08UpDown.Location = new System.Drawing.Point(84, 277); + this.Unk08UpDown.Location = new System.Drawing.Point(126, 278); this.Unk08UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -268,7 +313,7 @@ // // FrequencyUpDown // - this.FrequencyUpDown.Location = new System.Drawing.Point(84, 227); + this.FrequencyUpDown.Location = new System.Drawing.Point(104, 228); this.FrequencyUpDown.Maximum = new decimal(new int[] { 65535, 0, @@ -309,18 +354,18 @@ // this.label23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(340, 178); + this.label23.Location = new System.Drawing.Point(357, 82); this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(44, 13); + this.label23.Size = new System.Drawing.Size(49, 13); this.label23.TabIndex = 80; - this.label23.Text = "Flags 5:"; + this.label23.Text = "Bank ID:"; // // Flags5TextBox // this.Flags5TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags5TextBox.Location = new System.Drawing.Point(390, 175); + this.Flags5TextBox.Location = new System.Drawing.Point(412, 78); this.Flags5TextBox.Name = "Flags5TextBox"; - this.Flags5TextBox.Size = new System.Drawing.Size(155, 20); + this.Flags5TextBox.Size = new System.Drawing.Size(132, 20); this.Flags5TextBox.TabIndex = 81; this.Flags5TextBox.TextChanged += new System.EventHandler(this.Flags5TextBox_TextChanged); // @@ -328,40 +373,21 @@ // this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(340, 154); + this.label22.Location = new System.Drawing.Point(343, 57); this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(44, 13); + this.label22.Size = new System.Drawing.Size(65, 13); this.label22.TabIndex = 78; - this.label22.Text = "Flags 4:"; + this.label22.Text = "Last Played:"; // // Flags4TextBox // this.Flags4TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags4TextBox.Location = new System.Drawing.Point(390, 151); + this.Flags4TextBox.Location = new System.Drawing.Point(412, 54); this.Flags4TextBox.Name = "Flags4TextBox"; - this.Flags4TextBox.Size = new System.Drawing.Size(155, 20); + this.Flags4TextBox.Size = new System.Drawing.Size(132, 20); this.Flags4TextBox.TabIndex = 79; this.Flags4TextBox.TextChanged += new System.EventHandler(this.Flags4TextBox_TextChanged); // - // label19 - // - this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(340, 130); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(44, 13); - this.label19.TabIndex = 76; - this.label19.Text = "Flags 3:"; - // - // Flags3TextBox - // - this.Flags3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags3TextBox.Location = new System.Drawing.Point(390, 127); - this.Flags3TextBox.Name = "Flags3TextBox"; - this.Flags3TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags3TextBox.TabIndex = 77; - this.Flags3TextBox.TextChanged += new System.EventHandler(this.Flags3TextBox_TextChanged); - // // DeleteButton // this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -369,7 +395,7 @@ this.DeleteButton.Name = "DeleteButton"; this.DeleteButton.Size = new System.Drawing.Size(93, 23); this.DeleteButton.TabIndex = 85; - this.DeleteButton.Text = "Delete emitter"; + this.DeleteButton.Text = "Delete rule"; this.DeleteButton.UseVisualStyleBackColor = true; this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); // @@ -388,18 +414,18 @@ // this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(340, 106); + this.label21.Location = new System.Drawing.Point(371, 33); this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(44, 13); + this.label21.Size = new System.Drawing.Size(35, 13); this.label21.TabIndex = 74; - this.label21.Text = "Flags 2:"; + this.label21.Text = "Flags:"; // // Flags2TextBox // this.Flags2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags2TextBox.Location = new System.Drawing.Point(390, 103); + this.Flags2TextBox.Location = new System.Drawing.Point(412, 30); this.Flags2TextBox.Name = "Flags2TextBox"; - this.Flags2TextBox.Size = new System.Drawing.Size(155, 20); + this.Flags2TextBox.Size = new System.Drawing.Size(132, 20); this.Flags2TextBox.TabIndex = 75; this.Flags2TextBox.TextChanged += new System.EventHandler(this.Flags2TextBox_TextChanged); // @@ -407,11 +433,11 @@ // this.label20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(305, 241); + this.label20.Location = new System.Drawing.Point(293, 253); this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(160, 26); + this.label20.Size = new System.Drawing.Size(59, 13); this.label20.TabIndex = 82; - this.label20.Text = "Ext params:\r\nName (hash), Value (float), Flags"; + this.label20.Text = "Conditions:"; // // VariablesTextBox // @@ -430,65 +456,27 @@ this.label15.AutoSize = true; this.label15.Location = new System.Drawing.Point(7, 328); this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(63, 13); + this.label15.Size = new System.Drawing.Size(96, 13); this.label15.TabIndex = 58; - this.label15.Text = "Unk 12, 13:"; + this.label15.Text = "Blockability Factor:"; // // label17 // this.label17.AutoSize = true; this.label17.Location = new System.Drawing.Point(7, 304); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(63, 13); + this.label17.Size = new System.Drawing.Size(108, 13); this.label17.TabIndex = 55; - this.label17.Text = "Unk 10, 11:"; + this.label17.Text = "Max Local Instances:"; // // label18 // this.label18.AutoSize = true; this.label18.Location = new System.Drawing.Point(7, 280); this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(51, 13); + this.label18.Size = new System.Drawing.Size(77, 13); this.label18.TabIndex = 52; - this.label18.Text = "Unk 8, 9:"; - // - // label14 - // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(340, 82); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(44, 13); - this.label14.TabIndex = 72; - this.label14.Text = "Flags 1:"; - // - // Flags1TextBox - // - this.Flags1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags1TextBox.Location = new System.Drawing.Point(390, 79); - this.Flags1TextBox.Name = "Flags1TextBox"; - this.Flags1TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags1TextBox.TabIndex = 73; - this.Flags1TextBox.TextChanged += new System.EventHandler(this.Flags1TextBox_TextChanged); - // - // label13 - // - this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(340, 58); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(44, 13); - this.label13.TabIndex = 70; - this.label13.Text = "Flags 0:"; - // - // Flags0TextBox - // - this.Flags0TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags0TextBox.Location = new System.Drawing.Point(390, 55); - this.Flags0TextBox.Name = "Flags0TextBox"; - this.Flags0TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags0TextBox.TabIndex = 71; - this.Flags0TextBox.TextChanged += new System.EventHandler(this.Flags0TextBox_TextChanged); + this.label18.Text = "Spawn Height:"; // // label12 // @@ -514,9 +502,9 @@ this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(7, 230); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(39, 13); + this.label6.Size = new System.Drawing.Size(91, 13); this.label6.TabIndex = 48; - this.label6.Text = "Unk 6:"; + this.label6.Text = "Min Repeat Time:"; // // label7 // @@ -551,9 +539,9 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(7, 154); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(39, 13); + this.label4.Size = new System.Drawing.Size(44, 13); this.label4.TabIndex = 41; - this.label4.Text = "Unk 1:"; + this.label4.Text = "Weight:"; // // Unk01TextBox // @@ -570,9 +558,9 @@ this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(7, 130); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(44, 13); + this.label3.Size = new System.Drawing.Size(52, 13); this.label3.TabIndex = 39; - this.label3.Text = "Hash 2:"; + this.label3.Text = "Category:"; // // CategoryTextBox // @@ -589,9 +577,9 @@ this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(7, 106); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(44, 13); + this.label2.Size = new System.Drawing.Size(67, 13); this.label2.TabIndex = 37; - this.label2.Text = "Hash 1:"; + this.label2.Text = "Child Sound:"; // // ChildSoundTextBox // @@ -641,34 +629,7 @@ this.PositionTextBox.TabIndex = 32; this.PositionTextBox.TextChanged += new System.EventHandler(this.PositionTextBox_TextChanged); // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(7, 253); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(39, 13); - this.label5.TabIndex = 50; - this.label5.Text = "Unk 7:"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(7, 203); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(55, 13); - this.label8.TabIndex = 46; - this.label8.Text = "End Time:"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(192, 178); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(78, 13); - this.label9.TabIndex = 45; - this.label9.Text = "(game minutes)"; - // - // EditAudioEmitterPanel + // EditAudioAmbientRulePanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -676,8 +637,8 @@ this.Controls.Add(this.GoToButton); this.Controls.Add(this.tabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "EditAudioEmitterPanel"; - this.Text = "Edit Audio Emitter"; + this.Name = "EditAudioAmbientRulePanel"; + this.Text = "Edit Audio Ambient Rule"; this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); @@ -685,7 +646,6 @@ ((System.ComponentModel.ISupportInitialize)(this.Unk12UpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk11UpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk10UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.Unk09UpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk07UpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Unk08UpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.FrequencyUpDown)).EndInit(); @@ -709,10 +669,6 @@ private System.Windows.Forms.Label label15; private System.Windows.Forms.Label label17; private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox Flags1TextBox; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox Flags0TextBox; private System.Windows.Forms.Label label12; private System.Windows.Forms.TextBox NameTextBox; private System.Windows.Forms.Label label6; @@ -733,8 +689,6 @@ private System.Windows.Forms.TextBox Flags5TextBox; private System.Windows.Forms.Label label22; private System.Windows.Forms.TextBox Flags4TextBox; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.TextBox Flags3TextBox; private System.Windows.Forms.NumericUpDown FrequencyUpDown; private System.Windows.Forms.NumericUpDown EndTimeUpDown; private System.Windows.Forms.NumericUpDown StartTimeUpDown; @@ -744,9 +698,12 @@ private System.Windows.Forms.NumericUpDown Unk12UpDown; private System.Windows.Forms.NumericUpDown Unk11UpDown; private System.Windows.Forms.NumericUpDown Unk10UpDown; - private System.Windows.Forms.NumericUpDown Unk09UpDown; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.ComboBox ExplicitSpawnCombo; + private System.Windows.Forms.Label label13; } } \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs b/CodeWalker/Project/Panels/EditAudioAmbientRulePanel.cs similarity index 56% rename from CodeWalker/Project/Panels/EditAudioEmitterPanel.cs rename to CodeWalker/Project/Panels/EditAudioAmbientRulePanel.cs index 4f4e9f2..08580df 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioAmbientRulePanel.cs @@ -13,37 +13,42 @@ using System.Windows.Forms; namespace CodeWalker.Project.Panels { - public partial class EditAudioEmitterPanel : ProjectPanel + public partial class EditAudioAmbientRulePanel : ProjectPanel { public ProjectForm ProjectForm; - public AudioPlacement CurrentEmitter { get; set; } + public AudioPlacement CurrentRule { get; set; } private bool populatingui = false; - public EditAudioEmitterPanel(ProjectForm owner) + public EditAudioAmbientRulePanel(ProjectForm owner) { ProjectForm = owner; InitializeComponent(); + + ExplicitSpawnCombo.Items.Clear(); + ExplicitSpawnCombo.Items.Add(Dat151AmbientRule.ExplicitSpawnType.Disabled); + ExplicitSpawnCombo.Items.Add(Dat151AmbientRule.ExplicitSpawnType.WorldRelative); + ExplicitSpawnCombo.Items.Add(Dat151AmbientRule.ExplicitSpawnType.InteriorRelative); } - public void SetEmitter(AudioPlacement emitter) + public void SetRule(AudioPlacement rule) { - CurrentEmitter = emitter; - Tag = emitter; + CurrentRule = rule; + Tag = rule; UpdateFormTitle(); UpdateUI(); } private void UpdateFormTitle() { - Text = CurrentEmitter?.NameHash.ToString() ?? ""; + Text = CurrentRule?.NameHash.ToString() ?? ""; } private void UpdateUI() { - if (CurrentEmitter?.AudioEmitter == null) + if (CurrentRule?.AmbientRule == null) { AddToProjectButton.Enabled = false; DeleteButton.Enabled = false; @@ -61,15 +66,12 @@ namespace CodeWalker.Project.Panels FrequencyUpDown.Value = 0; Unk07UpDown.Value = 0; Unk08UpDown.Value = 0; - Unk09UpDown.Value = 0; + ExplicitSpawnCombo.SelectedItem = null; Unk10UpDown.Value = 0; Unk11UpDown.Value = 0; Unk12UpDown.Value = 0; Unk13UpDown.Value = 0; - Flags0TextBox.Text = string.Empty; - Flags1TextBox.Text = string.Empty; Flags2TextBox.Text = string.Empty; - Flags3TextBox.Text = string.Empty; Flags4TextBox.Text = string.Empty; Flags5TextBox.Text = string.Empty; VariablesTextBox.Text = string.Empty; @@ -77,45 +79,42 @@ namespace CodeWalker.Project.Panels } else { - AddToProjectButton.Enabled = CurrentEmitter?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentEmitter.RelFile) : false; + AddToProjectButton.Enabled = CurrentRule?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentRule.RelFile) : false; DeleteButton.Enabled = !AddToProjectButton.Enabled; populatingui = true; - var e = CurrentEmitter.AudioEmitter; + var e = CurrentRule.AmbientRule; NameTextBox.Text = e.NameHash.ToString(); PositionTextBox.Text = FloatUtil.GetVector3String(e.Position); - InnerRadiusTextBox.Text = FloatUtil.ToString(e.InnerRadius); - OuterRadiusTextBox.Text = FloatUtil.ToString(e.OuterRadius); + InnerRadiusTextBox.Text = FloatUtil.ToString(e.MinDist); + OuterRadiusTextBox.Text = FloatUtil.ToString(e.MaxDist); ChildSoundTextBox.Text = e.ChildSound.ToString(); CategoryTextBox.Text = e.Category.ToString(); - Unk01TextBox.Text = FloatUtil.ToString(e.Unk01); - StartTimeUpDown.Value = e.StartTime; - EndTimeUpDown.Value = e.EndTime; - FrequencyUpDown.Value = e.Frequency.Value; - Unk07UpDown.Value = e.Unk07.Value; - Unk08UpDown.Value = e.Unk08.Value; - Unk09UpDown.Value = e.Unk09.Value; - Unk10UpDown.Value = e.Unk10.Value; - Unk11UpDown.Value = e.Unk11.Value; - Unk12UpDown.Value = e.Unk12.Value; - Unk13UpDown.Value = e.Unk13.Value; - Flags0TextBox.Text = e.Flags0.Hex; - Flags1TextBox.Text = e.Flags1.Hex; - Flags2TextBox.Text = e.Flags2.Hex; - Flags3TextBox.Text = e.Flags3.Hex; - Flags4TextBox.Text = e.Flags4.Hex; - Flags5TextBox.Text = e.Flags5.Hex; + Unk01TextBox.Text = FloatUtil.ToString(e.Weight); + StartTimeUpDown.Value = e.MinTimeMinutes; + EndTimeUpDown.Value = e.MaxTimeMinutes; + FrequencyUpDown.Value = e.MinRepeatTime; + Unk07UpDown.Value = e.MinRepeatTimeVariance; + Unk08UpDown.Value = e.SpawnHeight; + ExplicitSpawnCombo.SelectedItem = e.ExplicitSpawn; + Unk10UpDown.Value = e.MaxLocalInstances; + Unk11UpDown.Value = e.MaxGlobalInstances; + Unk12UpDown.Value = e.BlockabilityFactor; + Unk13UpDown.Value = e.MaxPathDepth; + Flags2TextBox.Text = e.Flags.Hex; + Flags4TextBox.Text = FloatUtil.ToString(e.LastPlayTime); + Flags5TextBox.Text = FloatUtil.ToString(e.DynamicBankID); StringBuilder sb = new StringBuilder(); - if (e.Variables != null) + if (e.Conditions != null) { - foreach (var extparam in e.Variables) + foreach (var extparam in e.Conditions) { sb.Append(extparam.Name.ToString()); sb.Append(", "); sb.Append(FloatUtil.ToString(extparam.Value)); sb.Append(", "); - sb.Append(extparam.Flags.ToString()); + sb.Append(extparam.ConditionType.ToString()); sb.AppendLine(); } } @@ -125,7 +124,7 @@ namespace CodeWalker.Project.Panels if (ProjectForm.WorldForm != null) { - ProjectForm.WorldForm.SelectObject(CurrentEmitter); + ProjectForm.WorldForm.SelectObject(CurrentRule); } } @@ -133,9 +132,9 @@ namespace CodeWalker.Project.Panels private void ProjectItemChanged() { - CurrentEmitter?.UpdateFromEmitter();//also update the placement wrapper + CurrentRule?.UpdateFromAmbientRule();//also update the placement wrapper - if (CurrentEmitter?.RelFile != null) + if (CurrentRule?.RelFile != null) { ProjectForm.SetAudioFileHasChanged(true); } @@ -145,7 +144,7 @@ namespace CodeWalker.Project.Panels private void NameTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; uint hash = 0; string name = NameTextBox.Text; @@ -156,10 +155,10 @@ namespace CodeWalker.Project.Panels } //NameHashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentEmitter.AudioEmitter.NameHash != hash) + if (CurrentRule.AmbientRule.NameHash != hash) { - CurrentEmitter.AudioEmitter.Name = NameTextBox.Text; - CurrentEmitter.AudioEmitter.NameHash = hash; + CurrentRule.AmbientRule.Name = NameTextBox.Text; + CurrentRule.AmbientRule.NameHash = hash; ProjectItemChanged(); UpdateFormTitle(); @@ -169,12 +168,12 @@ namespace CodeWalker.Project.Panels private void PositionTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; var vec = FloatUtil.ParseVector3String(PositionTextBox.Text); - if (CurrentEmitter.AudioEmitter.Position != vec) + if (CurrentRule.AmbientRule.Position != vec) { - CurrentEmitter.AudioEmitter.Position = vec; + CurrentRule.AmbientRule.Position = vec; ProjectItemChanged(); @@ -192,12 +191,12 @@ namespace CodeWalker.Project.Panels private void InnerRadiusTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; float rad = FloatUtil.Parse(InnerRadiusTextBox.Text); - if (CurrentEmitter.AudioEmitter.InnerRadius != rad) + if (CurrentRule.AmbientRule.MinDist != rad) { - CurrentEmitter.AudioEmitter.InnerRadius = rad; + CurrentRule.AmbientRule.MinDist = rad; ProjectItemChanged(); } @@ -206,12 +205,12 @@ namespace CodeWalker.Project.Panels private void OuterRadiusTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; float rad = FloatUtil.Parse(OuterRadiusTextBox.Text); - if (CurrentEmitter.AudioEmitter.OuterRadius != rad) + if (CurrentRule.AmbientRule.MaxDist != rad) { - CurrentEmitter.AudioEmitter.OuterRadius = rad; + CurrentRule.AmbientRule.MaxDist = rad; ProjectItemChanged(); } @@ -220,7 +219,7 @@ namespace CodeWalker.Project.Panels private void ChildSoundTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; uint hash = 0; string name = ChildSoundTextBox.Text; @@ -231,9 +230,9 @@ namespace CodeWalker.Project.Panels } //HashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentEmitter.AudioEmitter.ChildSound != hash) + if (CurrentRule.AmbientRule.ChildSound != hash) { - CurrentEmitter.AudioEmitter.ChildSound = hash; + CurrentRule.AmbientRule.ChildSound = hash; ProjectItemChanged(); } @@ -242,7 +241,7 @@ namespace CodeWalker.Project.Panels private void CategoryTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; uint hash = 0; string name = CategoryTextBox.Text; @@ -253,9 +252,9 @@ namespace CodeWalker.Project.Panels } //HashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentEmitter.AudioEmitter.Category != hash) + if (CurrentRule.AmbientRule.Category != hash) { - CurrentEmitter.AudioEmitter.Category = hash; + CurrentRule.AmbientRule.Category = hash; ProjectItemChanged(); } @@ -264,12 +263,12 @@ namespace CodeWalker.Project.Panels private void Unk01TextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; float unk = FloatUtil.Parse(Unk01TextBox.Text); - if (CurrentEmitter.AudioEmitter.Unk01 != unk) + if (CurrentRule.AmbientRule.Weight != unk) { - CurrentEmitter.AudioEmitter.Unk01 = unk; + CurrentRule.AmbientRule.Weight = unk; ProjectItemChanged(); } @@ -278,12 +277,12 @@ namespace CodeWalker.Project.Panels private void StartTimeUpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; ushort unk = (ushort)StartTimeUpDown.Value; - if (CurrentEmitter.AudioEmitter.StartTime != unk) + if (CurrentRule.AmbientRule.MinTimeMinutes != unk) { - CurrentEmitter.AudioEmitter.StartTime = unk; + CurrentRule.AmbientRule.MinTimeMinutes = unk; ProjectItemChanged(); } @@ -292,12 +291,12 @@ namespace CodeWalker.Project.Panels private void EndTimeUpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; ushort unk = (ushort)EndTimeUpDown.Value; - if (CurrentEmitter.AudioEmitter.EndTime != unk) + if (CurrentRule.AmbientRule.MaxTimeMinutes != unk) { - CurrentEmitter.AudioEmitter.EndTime = unk; + CurrentRule.AmbientRule.MaxTimeMinutes = unk; ProjectItemChanged(); } @@ -306,12 +305,12 @@ namespace CodeWalker.Project.Panels private void FrequencyUpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; ushort unk = (ushort)FrequencyUpDown.Value; - if (CurrentEmitter.AudioEmitter.Frequency.Value != unk) + if (CurrentRule.AmbientRule.MinRepeatTime != unk) { - CurrentEmitter.AudioEmitter.Frequency = unk; + CurrentRule.AmbientRule.MinRepeatTime = unk; ProjectItemChanged(); } @@ -320,12 +319,12 @@ namespace CodeWalker.Project.Panels private void Unk07UpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; ushort unk = (ushort)Unk07UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk07.Value != unk) + if (CurrentRule.AmbientRule.MinRepeatTimeVariance != unk) { - CurrentEmitter.AudioEmitter.Unk07 = unk; + CurrentRule.AmbientRule.MinRepeatTimeVariance = unk; ProjectItemChanged(); } @@ -334,26 +333,26 @@ namespace CodeWalker.Project.Panels private void Unk08UpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; byte unk = (byte)Unk08UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk08.Value != unk) + if (CurrentRule.AmbientRule.SpawnHeight != unk) { - CurrentEmitter.AudioEmitter.Unk08 = unk; + CurrentRule.AmbientRule.SpawnHeight = unk; ProjectItemChanged(); } } - private void Unk09UpDown_ValueChanged(object sender, EventArgs e) + private void ExplicitSpawnCombo_SelectedIndexChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; - byte unk = (byte)Unk09UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk09.Value != unk) + var val = (Dat151AmbientRule.ExplicitSpawnType)ExplicitSpawnCombo.SelectedItem; + if (CurrentRule.AmbientRule.ExplicitSpawn != val) { - CurrentEmitter.AudioEmitter.Unk09 = unk; + CurrentRule.AmbientRule.ExplicitSpawn = val; ProjectItemChanged(); } @@ -362,12 +361,12 @@ namespace CodeWalker.Project.Panels private void Unk10UpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; byte unk = (byte)Unk10UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk10.Value != unk) + if (CurrentRule.AmbientRule.MaxLocalInstances != unk) { - CurrentEmitter.AudioEmitter.Unk10 = unk; + CurrentRule.AmbientRule.MaxLocalInstances = unk; ProjectItemChanged(); } @@ -376,12 +375,12 @@ namespace CodeWalker.Project.Panels private void Unk11UpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; byte unk = (byte)Unk11UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk11.Value != unk) + if (CurrentRule.AmbientRule.MaxGlobalInstances != unk) { - CurrentEmitter.AudioEmitter.Unk11 = unk; + CurrentRule.AmbientRule.MaxGlobalInstances = unk; ProjectItemChanged(); } @@ -390,12 +389,12 @@ namespace CodeWalker.Project.Panels private void Unk12UpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; byte unk = (byte)Unk12UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk12.Value != unk) + if (CurrentRule.AmbientRule.BlockabilityFactor != unk) { - CurrentEmitter.AudioEmitter.Unk12 = unk; + CurrentRule.AmbientRule.BlockabilityFactor = unk; ProjectItemChanged(); } @@ -404,79 +403,28 @@ namespace CodeWalker.Project.Panels private void Unk13UpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; byte unk = (byte)Unk13UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk13.Value != unk) + if (CurrentRule.AmbientRule.MaxPathDepth != unk) { - CurrentEmitter.AudioEmitter.Unk13 = unk; + CurrentRule.AmbientRule.MaxPathDepth = unk; ProjectItemChanged(); } } - private void Flags0TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; - - uint flags = 0; - if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentEmitter.AudioEmitter.Flags0 != flags) - { - CurrentEmitter.AudioEmitter.Flags0 = flags; - - ProjectItemChanged(); - } - } - } - - private void Flags1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; - - uint flags = 0; - if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentEmitter.AudioEmitter.Flags1 != flags) - { - CurrentEmitter.AudioEmitter.Flags1 = flags; - - ProjectItemChanged(); - } - } - } - private void Flags2TextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; uint flags = 0; if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentEmitter.AudioEmitter.Flags2 != flags) + if (CurrentRule.AmbientRule.Flags != flags) { - CurrentEmitter.AudioEmitter.Flags2 = flags; - - ProjectItemChanged(); - } - } - } - - private void Flags3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; - - uint flags = 0; - if (uint.TryParse(Flags3TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentEmitter.AudioEmitter.Flags3 != flags) - { - CurrentEmitter.AudioEmitter.Flags3 = flags; + CurrentRule.AmbientRule.Flags = flags; ProjectItemChanged(); } @@ -486,14 +434,14 @@ namespace CodeWalker.Project.Panels private void Flags4TextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; uint flags = 0; if (uint.TryParse(Flags4TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentEmitter.AudioEmitter.Flags4 != flags) + if (CurrentRule.AmbientRule.LastPlayTime != flags) { - CurrentEmitter.AudioEmitter.Flags4 = flags; + CurrentRule.AmbientRule.LastPlayTime = flags; ProjectItemChanged(); } @@ -503,14 +451,14 @@ namespace CodeWalker.Project.Panels private void Flags5TextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; uint flags = 0; if (uint.TryParse(Flags5TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentEmitter.AudioEmitter.Flags5 != flags) + if (CurrentRule.AmbientRule.DynamicBankID != flags) { - CurrentEmitter.AudioEmitter.Flags5 = flags; + CurrentRule.AmbientRule.DynamicBankID = (int)flags; ProjectItemChanged(); } @@ -520,18 +468,18 @@ namespace CodeWalker.Project.Panels private void VariablesTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; + if (CurrentRule?.AmbientRule == null) return; var paramstrs = VariablesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (paramstrs?.Length > 0) { - var paramlist = new List(); + var paramlist = new List(); foreach (var paramstr in paramstrs) { var paramvals = paramstr.Split(','); if (paramvals?.Length == 3) { - var param = new Dat151AmbientRule.Variable(); + var param = new Dat151AmbientRule.Condition(); var hashstr = paramvals[0].Trim(); var valstr = paramvals[1].Trim(); var flgstr = paramvals[2].Trim(); @@ -545,13 +493,13 @@ namespace CodeWalker.Project.Panels uint.TryParse(flgstr, out flags); param.Name = hash; param.Value = FloatUtil.Parse(valstr); - param.Flags = flags; + param.ConditionType = (byte)flags; paramlist.Add(param); } } - CurrentEmitter.AudioEmitter.Variables = paramlist.ToArray(); - CurrentEmitter.AudioEmitter.VariablesCount = (ushort)paramlist.Count; + CurrentRule.AmbientRule.Conditions = paramlist.ToArray(); + CurrentRule.AmbientRule.NumConditions = (ushort)paramlist.Count; ProjectItemChanged(); } @@ -559,22 +507,21 @@ namespace CodeWalker.Project.Panels private void GoToButton_Click(object sender, EventArgs e) { - if (CurrentEmitter == null) return; + if (CurrentRule == null) return; if (ProjectForm.WorldForm == null) return; - ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.PlaybackZoneSize); + ProjectForm.WorldForm.GoToPosition(CurrentRule.Position, SharpDX.Vector3.One * CurrentRule.OuterRadius); } private void AddToProjectButton_Click(object sender, EventArgs e) { - ProjectForm.SetProjectItem(CurrentEmitter); - ProjectForm.AddAudioFileToProject(CurrentEmitter.RelFile); + ProjectForm.SetProjectItem(CurrentRule); + ProjectForm.AddAudioFileToProject(CurrentRule.RelFile); } private void DeleteButton_Click(object sender, EventArgs e) { - ProjectForm.SetProjectItem(CurrentEmitter); - ProjectForm.DeleteAudioEmitter(); + ProjectForm.SetProjectItem(CurrentRule); + ProjectForm.DeleteAudioAmbientRule(); } - } } diff --git a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.resx b/CodeWalker/Project/Panels/EditAudioAmbientRulePanel.resx similarity index 100% rename from CodeWalker/Project/Panels/EditAudioEmitterListPanel.resx rename to CodeWalker/Project/Panels/EditAudioAmbientRulePanel.resx diff --git a/CodeWalker/Project/Panels/EditAudioZoneListPanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.Designer.cs similarity index 96% rename from CodeWalker/Project/Panels/EditAudioZoneListPanel.Designer.cs rename to CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.Designer.cs index 6182e22..22495c6 100644 --- a/CodeWalker/Project/Panels/EditAudioZoneListPanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.Designer.cs @@ -1,6 +1,6 @@ namespace CodeWalker.Project.Panels { - partial class EditAudioZoneListPanel + partial class EditAudioAmbientZoneListPanel { /// /// Required designer variable. @@ -28,14 +28,14 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioZoneListPanel)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioAmbientZoneListPanel)); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.DeleteButton = new System.Windows.Forms.Button(); this.label12 = new System.Windows.Forms.Label(); this.NameTextBox = new System.Windows.Forms.TextBox(); this.label19 = new System.Windows.Forms.Label(); this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.DeleteButton = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.SuspendLayout(); @@ -67,6 +67,17 @@ this.tabPage1.Text = "Ambient Zone List"; this.tabPage1.UseVisualStyleBackColor = true; // + // DeleteButton + // + this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.DeleteButton.Location = new System.Drawing.Point(438, 381); + this.DeleteButton.Name = "DeleteButton"; + this.DeleteButton.Size = new System.Drawing.Size(93, 23); + this.DeleteButton.TabIndex = 77; + this.DeleteButton.Text = "Delete list"; + this.DeleteButton.UseVisualStyleBackColor = true; + this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); + // // label12 // this.label12.AutoSize = true; @@ -109,26 +120,15 @@ this.HashesTextBox.WordWrap = false; this.HashesTextBox.TextChanged += new System.EventHandler(this.HashesTextBox_TextChanged); // - // DeleteButton - // - this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.DeleteButton.Location = new System.Drawing.Point(438, 381); - this.DeleteButton.Name = "DeleteButton"; - this.DeleteButton.Size = new System.Drawing.Size(93, 23); - this.DeleteButton.TabIndex = 77; - this.DeleteButton.Text = "Delete list"; - this.DeleteButton.UseVisualStyleBackColor = true; - this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); - // - // EditAudioZoneListPanel + // EditAudioAmbientZoneListPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(562, 450); this.Controls.Add(this.tabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "EditAudioZoneListPanel"; - this.Text = "Edit Audio Zone List"; + this.Name = "EditAudioAmbientZoneListPanel"; + this.Text = "Edit Audio Ambient Zone List"; this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); diff --git a/CodeWalker/Project/Panels/EditAudioZoneListPanel.cs b/CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.cs similarity index 95% rename from CodeWalker/Project/Panels/EditAudioZoneListPanel.cs rename to CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.cs index e673c51..4f59e80 100644 --- a/CodeWalker/Project/Panels/EditAudioZoneListPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.cs @@ -11,7 +11,7 @@ using System.Windows.Forms; namespace CodeWalker.Project.Panels { - public partial class EditAudioZoneListPanel : ProjectPanel + public partial class EditAudioAmbientZoneListPanel : ProjectPanel { public ProjectForm ProjectForm; public Dat151AmbientZoneList CurrentZoneList { get; set; } @@ -19,7 +19,7 @@ namespace CodeWalker.Project.Panels private bool populatingui = false; - public EditAudioZoneListPanel(ProjectForm owner) + public EditAudioAmbientZoneListPanel(ProjectForm owner) { ProjectForm = owner; InitializeComponent(); @@ -144,7 +144,7 @@ namespace CodeWalker.Project.Panels private void DeleteButton_Click(object sender, EventArgs e) { ProjectForm.SetProjectItem(CurrentZoneList); - ProjectForm.DeleteAudioZoneList(); + ProjectForm.DeleteAudioAmbientZoneList(); } } } diff --git a/CodeWalker/Project/Panels/EditAudioEmitterPanel.resx b/CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.resx similarity index 100% rename from CodeWalker/Project/Panels/EditAudioEmitterPanel.resx rename to CodeWalker/Project/Panels/EditAudioAmbientZoneListPanel.resx diff --git a/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.Designer.cs new file mode 100644 index 0000000..6c1a4f9 --- /dev/null +++ b/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.Designer.cs @@ -0,0 +1,768 @@ +namespace CodeWalker.Project.Panels +{ + partial class EditAudioAmbientZonePanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.Label label18; + System.Windows.Forms.Label label27; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioAmbientZonePanel)); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.PositioningRotationAngleTextBox = new System.Windows.Forms.TextBox(); + this.label26 = new System.Windows.Forms.Label(); + this.ActivationZoneRotationAngleTextBox = new System.Windows.Forms.TextBox(); + this.label22 = new System.Windows.Forms.Label(); + this.WindElevationSoundsTextBox = new System.Windows.Forms.TextBox(); + this.ZoneWaterCalculationTextBox = new System.Windows.Forms.TextBox(); + this.label17 = new System.Windows.Forms.Label(); + this.MaxWindInfluenceTextBox = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); + this.MinWindInfluenceTextBox = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.PedDensityScalarTextBox = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.MaxPedDensityTextBox = new System.Windows.Forms.TextBox(); + this.MinPedDensityTextBox = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.PedDensityTODTextBox = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.BuiltUpFactorTextBox = new System.Windows.Forms.TextBox(); + this.PositioningSizeScaleTextBox = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.PositioningRotationOffsetTextBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.PositioningSizeTextBox = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.ActivationSizeScaleTextBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.ActivationRotationOffsetTextBox = new System.Windows.Forms.TextBox(); + this.ActivationSizeTextBox = new System.Windows.Forms.TextBox(); + this.label25 = new System.Windows.Forms.Label(); + this.AudioSceneTextBox = new System.Windows.Forms.TextBox(); + this.label24 = new System.Windows.Forms.Label(); + this.EnviromentRuleTextBox = new System.Windows.Forms.TextBox(); + this.DeleteButton = new System.Windows.Forms.Button(); + this.AddToProjectButton = new System.Windows.Forms.Button(); + this.label21 = new System.Windows.Forms.Label(); + this.RandomRadioSettingsTextBox = new System.Windows.Forms.TextBox(); + this.label20 = new System.Windows.Forms.Label(); + this.DirAmbiencesTextBox = new CodeWalker.WinForms.TextBoxFix(); + this.label19 = new System.Windows.Forms.Label(); + this.RulesTextBox = new CodeWalker.WinForms.TextBoxFix(); + this.label13 = new System.Windows.Forms.Label(); + this.FlagsTextBox = new System.Windows.Forms.TextBox(); + this.ShapeComboBox = new System.Windows.Forms.ComboBox(); + this.label23 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.NameTextBox = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.PositioningCentreTextBox = new System.Windows.Forms.TextBox(); + this.label16 = new System.Windows.Forms.Label(); + this.ActivationZoneCentreTextBox = new System.Windows.Forms.TextBox(); + this.GoToButton = new System.Windows.Forms.Button(); + this.SelectRuleButton = new System.Windows.Forms.Button(); + label18 = new System.Windows.Forms.Label(); + label27 = new System.Windows.Forms.Label(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.SuspendLayout(); + // + // label18 + // + label18.AutoSize = true; + label18.Location = new System.Drawing.Point(162, 319); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(91, 13); + label18.TabIndex = 109; + label18.Text = "Zone Water Calc:"; + // + // label27 + // + label27.AutoSize = true; + label27.Location = new System.Drawing.Point(185, 357); + label27.Name = "label27"; + label27.Size = new System.Drawing.Size(81, 13); + label27.TabIndex = 115; + label27.Text = "Pos. Rot Angle:"; + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Location = new System.Drawing.Point(2, 3); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(559, 447); + this.tabControl1.TabIndex = 17; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.SelectRuleButton); + this.tabPage1.Controls.Add(label27); + this.tabPage1.Controls.Add(this.PositioningRotationAngleTextBox); + this.tabPage1.Controls.Add(this.label26); + this.tabPage1.Controls.Add(this.ActivationZoneRotationAngleTextBox); + this.tabPage1.Controls.Add(this.label22); + this.tabPage1.Controls.Add(this.WindElevationSoundsTextBox); + this.tabPage1.Controls.Add(label18); + this.tabPage1.Controls.Add(this.ZoneWaterCalculationTextBox); + this.tabPage1.Controls.Add(this.label17); + this.tabPage1.Controls.Add(this.MaxWindInfluenceTextBox); + this.tabPage1.Controls.Add(this.label15); + this.tabPage1.Controls.Add(this.MinWindInfluenceTextBox); + this.tabPage1.Controls.Add(this.label14); + this.tabPage1.Controls.Add(this.PedDensityScalarTextBox); + this.tabPage1.Controls.Add(this.label10); + this.tabPage1.Controls.Add(this.label9); + this.tabPage1.Controls.Add(this.MaxPedDensityTextBox); + this.tabPage1.Controls.Add(this.MinPedDensityTextBox); + this.tabPage1.Controls.Add(this.label8); + this.tabPage1.Controls.Add(this.PedDensityTODTextBox); + this.tabPage1.Controls.Add(this.label7); + this.tabPage1.Controls.Add(this.BuiltUpFactorTextBox); + this.tabPage1.Controls.Add(this.PositioningSizeScaleTextBox); + this.tabPage1.Controls.Add(this.label6); + this.tabPage1.Controls.Add(this.label5); + this.tabPage1.Controls.Add(this.PositioningRotationOffsetTextBox); + this.tabPage1.Controls.Add(this.label4); + this.tabPage1.Controls.Add(this.PositioningSizeTextBox); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.ActivationSizeScaleTextBox); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Controls.Add(this.ActivationRotationOffsetTextBox); + this.tabPage1.Controls.Add(this.ActivationSizeTextBox); + this.tabPage1.Controls.Add(this.label25); + this.tabPage1.Controls.Add(this.AudioSceneTextBox); + this.tabPage1.Controls.Add(this.label24); + this.tabPage1.Controls.Add(this.EnviromentRuleTextBox); + this.tabPage1.Controls.Add(this.DeleteButton); + this.tabPage1.Controls.Add(this.AddToProjectButton); + this.tabPage1.Controls.Add(this.label21); + this.tabPage1.Controls.Add(this.RandomRadioSettingsTextBox); + this.tabPage1.Controls.Add(this.label20); + this.tabPage1.Controls.Add(this.DirAmbiencesTextBox); + this.tabPage1.Controls.Add(this.label19); + this.tabPage1.Controls.Add(this.RulesTextBox); + this.tabPage1.Controls.Add(this.label13); + this.tabPage1.Controls.Add(this.FlagsTextBox); + this.tabPage1.Controls.Add(this.ShapeComboBox); + this.tabPage1.Controls.Add(this.label23); + this.tabPage1.Controls.Add(this.label12); + this.tabPage1.Controls.Add(this.NameTextBox); + this.tabPage1.Controls.Add(this.label11); + this.tabPage1.Controls.Add(this.PositioningCentreTextBox); + this.tabPage1.Controls.Add(this.label16); + this.tabPage1.Controls.Add(this.ActivationZoneCentreTextBox); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(551, 421); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Ambient Zone"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // PositioningRotationAngleTextBox + // + this.PositioningRotationAngleTextBox.Location = new System.Drawing.Point(272, 354); + this.PositioningRotationAngleTextBox.Name = "PositioningRotationAngleTextBox"; + this.PositioningRotationAngleTextBox.Size = new System.Drawing.Size(55, 20); + this.PositioningRotationAngleTextBox.TabIndex = 114; + this.PositioningRotationAngleTextBox.TextChanged += new System.EventHandler(this.PositioningRotationAngleTextBox_TextChanged); + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(18, 357); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(87, 13); + this.label26.TabIndex = 113; + this.label26.Text = "Activ. Rot Angle:"; + // + // ActivationZoneRotationAngleTextBox + // + this.ActivationZoneRotationAngleTextBox.Location = new System.Drawing.Point(109, 354); + this.ActivationZoneRotationAngleTextBox.Name = "ActivationZoneRotationAngleTextBox"; + this.ActivationZoneRotationAngleTextBox.Size = new System.Drawing.Size(55, 20); + this.ActivationZoneRotationAngleTextBox.TabIndex = 112; + this.ActivationZoneRotationAngleTextBox.TextChanged += new System.EventHandler(this.ActivationZoneRotationAngleTextBox_TextChanged); + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(310, 140); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(74, 13); + this.label22.TabIndex = 111; + this.label22.Text = "Wind Sounds:"; + // + // WindElevationSoundsTextBox + // + this.WindElevationSoundsTextBox.Location = new System.Drawing.Point(390, 137); + this.WindElevationSoundsTextBox.Name = "WindElevationSoundsTextBox"; + this.WindElevationSoundsTextBox.Size = new System.Drawing.Size(155, 20); + this.WindElevationSoundsTextBox.TabIndex = 110; + this.WindElevationSoundsTextBox.TextChanged += new System.EventHandler(this.WindElevationSoundsTextBox_TextChanged); + // + // ZoneWaterCalculationTextBox + // + this.ZoneWaterCalculationTextBox.Location = new System.Drawing.Point(266, 316); + this.ZoneWaterCalculationTextBox.Name = "ZoneWaterCalculationTextBox"; + this.ZoneWaterCalculationTextBox.Size = new System.Drawing.Size(55, 20); + this.ZoneWaterCalculationTextBox.TabIndex = 108; + this.ZoneWaterCalculationTextBox.TextChanged += new System.EventHandler(this.ZoneWaterCalculationTextBox_TextChanged); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(167, 394); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(105, 13); + this.label17.TabIndex = 107; + this.label17.Text = "Max Wind Influence:"; + // + // MaxWindInfluenceTextBox + // + this.MaxWindInfluenceTextBox.Location = new System.Drawing.Point(272, 391); + this.MaxWindInfluenceTextBox.Name = "MaxWindInfluenceTextBox"; + this.MaxWindInfluenceTextBox.Size = new System.Drawing.Size(55, 20); + this.MaxWindInfluenceTextBox.TabIndex = 106; + this.MaxWindInfluenceTextBox.TextChanged += new System.EventHandler(this.MaxWindInfluenceTextBox_TextChanged); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(5, 394); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(102, 13); + this.label15.TabIndex = 105; + this.label15.Text = "Min Wind Influence:"; + // + // MinWindInfluenceTextBox + // + this.MinWindInfluenceTextBox.Location = new System.Drawing.Point(109, 391); + this.MinWindInfluenceTextBox.Name = "MinWindInfluenceTextBox"; + this.MinWindInfluenceTextBox.Size = new System.Drawing.Size(55, 20); + this.MinWindInfluenceTextBox.TabIndex = 104; + this.MinWindInfluenceTextBox.TextChanged += new System.EventHandler(this.MinWindInfluenceTextBox_TextChanged); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(162, 293); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(100, 13); + this.label14.TabIndex = 103; + this.label14.Text = "Ped Density Scalar:"; + // + // PedDensityScalarTextBox + // + this.PedDensityScalarTextBox.Location = new System.Drawing.Point(266, 290); + this.PedDensityScalarTextBox.Name = "PedDensityScalarTextBox"; + this.PedDensityScalarTextBox.Size = new System.Drawing.Size(55, 20); + this.PedDensityScalarTextBox.TabIndex = 102; + this.PedDensityScalarTextBox.TextChanged += new System.EventHandler(this.PedDensityScalarTextBox_TextChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(7, 319); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(90, 13); + this.label10.TabIndex = 101; + this.label10.Text = "Max Ped Density:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(7, 293); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(87, 13); + this.label9.TabIndex = 100; + this.label9.Text = "Min Ped Density:"; + // + // MaxPedDensityTextBox + // + this.MaxPedDensityTextBox.Location = new System.Drawing.Point(98, 316); + this.MaxPedDensityTextBox.Name = "MaxPedDensityTextBox"; + this.MaxPedDensityTextBox.Size = new System.Drawing.Size(55, 20); + this.MaxPedDensityTextBox.TabIndex = 99; + this.MaxPedDensityTextBox.TextChanged += new System.EventHandler(this.MaxPedDensityTextBox_TextChanged); + // + // MinPedDensityTextBox + // + this.MinPedDensityTextBox.Location = new System.Drawing.Point(98, 290); + this.MinPedDensityTextBox.Name = "MinPedDensityTextBox"; + this.MinPedDensityTextBox.Size = new System.Drawing.Size(55, 20); + this.MinPedDensityTextBox.TabIndex = 98; + this.MinPedDensityTextBox.TextChanged += new System.EventHandler(this.MinPedDensityTextBox_TextChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(162, 267); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(93, 13); + this.label8.TabIndex = 97; + this.label8.Text = "Ped Density TOD:"; + // + // PedDensityTODTextBox + // + this.PedDensityTODTextBox.Location = new System.Drawing.Point(266, 264); + this.PedDensityTODTextBox.Name = "PedDensityTODTextBox"; + this.PedDensityTODTextBox.Size = new System.Drawing.Size(55, 20); + this.PedDensityTODTextBox.TabIndex = 96; + this.PedDensityTODTextBox.TextChanged += new System.EventHandler(this.PedDensityTODTextBox_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(7, 267); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(80, 13); + this.label7.TabIndex = 95; + this.label7.Text = "Built Up Factor:"; + // + // BuiltUpFactorTextBox + // + this.BuiltUpFactorTextBox.Location = new System.Drawing.Point(98, 264); + this.BuiltUpFactorTextBox.Name = "BuiltUpFactorTextBox"; + this.BuiltUpFactorTextBox.Size = new System.Drawing.Size(55, 20); + this.BuiltUpFactorTextBox.TabIndex = 94; + this.BuiltUpFactorTextBox.TextChanged += new System.EventHandler(this.BuiltUpFactorTextBox_TextChanged); + // + // PositioningSizeScaleTextBox + // + this.PositioningSizeScaleTextBox.Location = new System.Drawing.Point(121, 238); + this.PositioningSizeScaleTextBox.Name = "PositioningSizeScaleTextBox"; + this.PositioningSizeScaleTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningSizeScaleTextBox.TabIndex = 93; + this.PositioningSizeScaleTextBox.TextChanged += new System.EventHandler(this.PositioningSizeScaleTextBox_TextChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 243); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(114, 13); + this.label6.TabIndex = 92; + this.label6.Text = "Positioning Size Scale:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 215); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(112, 13); + this.label5.TabIndex = 91; + this.label5.Text = "Positioning Rot Offset:"; + // + // PositioningRotationOffsetTextBox + // + this.PositioningRotationOffsetTextBox.Location = new System.Drawing.Point(121, 212); + this.PositioningRotationOffsetTextBox.Name = "PositioningRotationOffsetTextBox"; + this.PositioningRotationOffsetTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningRotationOffsetTextBox.TabIndex = 90; + this.PositioningRotationOffsetTextBox.TextChanged += new System.EventHandler(this.PositioningRotationOffsetTextBox_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 189); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(84, 13); + this.label4.TabIndex = 89; + this.label4.Text = "Positioning Size:"; + // + // PositioningSizeTextBox + // + this.PositioningSizeTextBox.Location = new System.Drawing.Point(121, 186); + this.PositioningSizeTextBox.Name = "PositioningSizeTextBox"; + this.PositioningSizeTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningSizeTextBox.TabIndex = 88; + this.PositioningSizeTextBox.TextChanged += new System.EventHandler(this.PositioningSizeTextBox_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 134); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(110, 13); + this.label3.TabIndex = 87; + this.label3.Text = "Activation Size Scale:"; + // + // ActivationSizeScaleTextBox + // + this.ActivationSizeScaleTextBox.Location = new System.Drawing.Point(121, 134); + this.ActivationSizeScaleTextBox.Name = "ActivationSizeScaleTextBox"; + this.ActivationSizeScaleTextBox.Size = new System.Drawing.Size(172, 20); + this.ActivationSizeScaleTextBox.TabIndex = 86; + this.ActivationSizeScaleTextBox.TextChanged += new System.EventHandler(this.ActivationSizeScaleTextBox_TextChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 111); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(108, 13); + this.label2.TabIndex = 85; + this.label2.Text = "Activation Rot Offset:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 85); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(80, 13); + this.label1.TabIndex = 84; + this.label1.Text = "Activation Size:"; + // + // ActivationRotationOffsetTextBox + // + this.ActivationRotationOffsetTextBox.Location = new System.Drawing.Point(121, 108); + this.ActivationRotationOffsetTextBox.Name = "ActivationRotationOffsetTextBox"; + this.ActivationRotationOffsetTextBox.Size = new System.Drawing.Size(200, 20); + this.ActivationRotationOffsetTextBox.TabIndex = 83; + this.ActivationRotationOffsetTextBox.TextChanged += new System.EventHandler(this.ActivationRotationOffsetTextBox_TextChanged); + // + // ActivationSizeTextBox + // + this.ActivationSizeTextBox.Location = new System.Drawing.Point(121, 82); + this.ActivationSizeTextBox.Name = "ActivationSizeTextBox"; + this.ActivationSizeTextBox.Size = new System.Drawing.Size(172, 20); + this.ActivationSizeTextBox.TabIndex = 82; + this.ActivationSizeTextBox.TextChanged += new System.EventHandler(this.ActivationSizeTextBox_TextChanged); + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(313, 58); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(71, 13); + this.label25.TabIndex = 74; + this.label25.Text = "Audio Scene:"; + // + // AudioSceneTextBox + // + this.AudioSceneTextBox.Location = new System.Drawing.Point(390, 58); + this.AudioSceneTextBox.Name = "AudioSceneTextBox"; + this.AudioSceneTextBox.Size = new System.Drawing.Size(155, 20); + this.AudioSceneTextBox.TabIndex = 75; + this.AudioSceneTextBox.TextChanged += new System.EventHandler(this.AudioSceneTextBox_TextChanged); + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(296, 88); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(88, 13); + this.label24.TabIndex = 72; + this.label24.Text = "Enviroment Rule:"; + // + // EnviromentRuleTextBox + // + this.EnviromentRuleTextBox.Location = new System.Drawing.Point(390, 85); + this.EnviromentRuleTextBox.Name = "EnviromentRuleTextBox"; + this.EnviromentRuleTextBox.Size = new System.Drawing.Size(155, 20); + this.EnviromentRuleTextBox.TabIndex = 73; + this.EnviromentRuleTextBox.TextChanged += new System.EventHandler(this.EnviromentRuleTextBox_TextChanged); + // + // DeleteButton + // + this.DeleteButton.Location = new System.Drawing.Point(343, 3); + this.DeleteButton.Name = "DeleteButton"; + this.DeleteButton.Size = new System.Drawing.Size(93, 23); + this.DeleteButton.TabIndex = 81; + this.DeleteButton.Text = "Delete zone"; + this.DeleteButton.UseVisualStyleBackColor = true; + this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); + // + // AddToProjectButton + // + this.AddToProjectButton.Location = new System.Drawing.Point(452, 3); + this.AddToProjectButton.Name = "AddToProjectButton"; + this.AddToProjectButton.Size = new System.Drawing.Size(93, 23); + this.AddToProjectButton.TabIndex = 80; + this.AddToProjectButton.Text = "Add to project"; + this.AddToProjectButton.UseVisualStyleBackColor = true; + this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click); + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(268, 36); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(122, 13); + this.label21.TabIndex = 70; + this.label21.Text = "Random Radio Settings:"; + // + // RandomRadioSettingsTextBox + // + this.RandomRadioSettingsTextBox.Location = new System.Drawing.Point(390, 33); + this.RandomRadioSettingsTextBox.Name = "RandomRadioSettingsTextBox"; + this.RandomRadioSettingsTextBox.Size = new System.Drawing.Size(155, 20); + this.RandomRadioSettingsTextBox.TabIndex = 71; + this.RandomRadioSettingsTextBox.TextChanged += new System.EventHandler(this.RandomisedRadioSettings_TextChanged); + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(340, 306); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(115, 13); + this.label20.TabIndex = 78; + this.label20.Text = "Directional Ambiences:"; + // + // DirAmbiencesTextBox + // + this.DirAmbiencesTextBox.Location = new System.Drawing.Point(335, 322); + this.DirAmbiencesTextBox.Multiline = true; + this.DirAmbiencesTextBox.Name = "DirAmbiencesTextBox"; + this.DirAmbiencesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.DirAmbiencesTextBox.Size = new System.Drawing.Size(209, 92); + this.DirAmbiencesTextBox.TabIndex = 79; + this.DirAmbiencesTextBox.WordWrap = false; + this.DirAmbiencesTextBox.TextChanged += new System.EventHandler(this.DirAmbiencesTextBox_TextChanged); + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(340, 161); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(37, 13); + this.label19.TabIndex = 76; + this.label19.Text = "Rules:"; + // + // RulesTextBox + // + this.RulesTextBox.Location = new System.Drawing.Point(335, 177); + this.RulesTextBox.Multiline = true; + this.RulesTextBox.Name = "RulesTextBox"; + this.RulesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.RulesTextBox.Size = new System.Drawing.Size(209, 92); + this.RulesTextBox.TabIndex = 77; + this.RulesTextBox.WordWrap = false; + this.RulesTextBox.TextChanged += new System.EventHandler(this.RulesTextBox_TextChanged); + this.RulesTextBox.Enter += new System.EventHandler(this.RulesTextBox_Enter); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(340, 114); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(35, 13); + this.label13.TabIndex = 66; + this.label13.Text = "Flags:"; + // + // FlagsTextBox + // + this.FlagsTextBox.Location = new System.Drawing.Point(390, 111); + this.FlagsTextBox.Name = "FlagsTextBox"; + this.FlagsTextBox.Size = new System.Drawing.Size(155, 20); + this.FlagsTextBox.TabIndex = 67; + this.FlagsTextBox.TextChanged += new System.EventHandler(this.FlagsTextBox_TextChanged); + // + // ShapeComboBox + // + this.ShapeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ShapeComboBox.FormattingEnabled = true; + this.ShapeComboBox.Items.AddRange(new object[] { + "Box", + "Line", + "Sphere"}); + this.ShapeComboBox.Location = new System.Drawing.Point(84, 28); + this.ShapeComboBox.Name = "ShapeComboBox"; + this.ShapeComboBox.Size = new System.Drawing.Size(178, 21); + this.ShapeComboBox.TabIndex = 33; + this.ShapeComboBox.SelectedIndexChanged += new System.EventHandler(this.ShapeComboBox_SelectedIndexChanged); + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(7, 33); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(41, 13); + this.label23.TabIndex = 32; + this.label23.Text = "Shape:"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(7, 9); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(64, 13); + this.label12.TabIndex = 29; + this.label12.Text = "Name hash:"; + // + // NameTextBox + // + this.NameTextBox.Location = new System.Drawing.Point(84, 6); + this.NameTextBox.Name = "NameTextBox"; + this.NameTextBox.Size = new System.Drawing.Size(237, 20); + this.NameTextBox.TabIndex = 30; + this.NameTextBox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(7, 163); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(95, 13); + this.label11.TabIndex = 46; + this.label11.Text = "Positioning Centre:"; + // + // PositioningCentreTextBox + // + this.PositioningCentreTextBox.Location = new System.Drawing.Point(121, 160); + this.PositioningCentreTextBox.Name = "PositioningCentreTextBox"; + this.PositioningCentreTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningCentreTextBox.TabIndex = 47; + this.PositioningCentreTextBox.TextChanged += new System.EventHandler(this.OuterPosTextBox_TextChanged); + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(7, 58); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(91, 13); + this.label16.TabIndex = 34; + this.label16.Text = "Activation Centre:"; + // + // ActivationZoneCentreTextBox + // + this.ActivationZoneCentreTextBox.Location = new System.Drawing.Point(121, 55); + this.ActivationZoneCentreTextBox.Name = "ActivationZoneCentreTextBox"; + this.ActivationZoneCentreTextBox.Size = new System.Drawing.Size(186, 20); + this.ActivationZoneCentreTextBox.TabIndex = 35; + this.ActivationZoneCentreTextBox.TextChanged += new System.EventHandler(this.PositioningCentreTextBoxTextChanged); + // + // GoToButton + // + this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.GoToButton.Location = new System.Drawing.Point(483, 0); + this.GoToButton.Name = "GoToButton"; + this.GoToButton.Size = new System.Drawing.Size(68, 23); + this.GoToButton.TabIndex = 31; + this.GoToButton.Text = "Go to"; + this.GoToButton.UseVisualStyleBackColor = true; + this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click); + // + // SelectRuleButton + // + this.SelectRuleButton.Enabled = false; + this.SelectRuleButton.Location = new System.Drawing.Point(469, 272); + this.SelectRuleButton.Name = "SelectRuleButton"; + this.SelectRuleButton.Size = new System.Drawing.Size(75, 23); + this.SelectRuleButton.TabIndex = 116; + this.SelectRuleButton.Text = "Select Rule"; + this.SelectRuleButton.UseVisualStyleBackColor = true; + this.SelectRuleButton.Click += new System.EventHandler(this.SelectRuleButton_Click); + // + // EditAudioAmbientZonePanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(562, 450); + this.Controls.Add(this.GoToButton); + this.Controls.Add(this.tabControl1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "EditAudioAmbientZonePanel"; + this.Text = "Edit Audio Ambient Zone"; + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.TextBox ActivationZoneCentreTextBox; + private System.Windows.Forms.Button GoToButton; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox NameTextBox; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox PositioningCentreTextBox; + private System.Windows.Forms.ComboBox ShapeComboBox; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.TextBox FlagsTextBox; + private WinForms.TextBoxFix RulesTextBox; + private System.Windows.Forms.Label label20; + private WinForms.TextBoxFix DirAmbiencesTextBox; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.TextBox RandomRadioSettingsTextBox; + private System.Windows.Forms.Button AddToProjectButton; + private System.Windows.Forms.Button DeleteButton; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.TextBox AudioSceneTextBox; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.TextBox EnviromentRuleTextBox; + private System.Windows.Forms.TextBox ActivationSizeTextBox; + private System.Windows.Forms.TextBox ActivationRotationOffsetTextBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox ActivationSizeScaleTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox PositioningSizeTextBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox PositioningRotationOffsetTextBox; + private System.Windows.Forms.TextBox PositioningSizeScaleTextBox; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox BuiltUpFactorTextBox; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox PedDensityTODTextBox; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox MaxPedDensityTextBox; + private System.Windows.Forms.TextBox MinPedDensityTextBox; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox PedDensityScalarTextBox; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox MinWindInfluenceTextBox; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.TextBox MaxWindInfluenceTextBox; + private System.Windows.Forms.TextBox ZoneWaterCalculationTextBox; + private System.Windows.Forms.TextBox WindElevationSoundsTextBox; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.TextBox ActivationZoneRotationAngleTextBox; + private System.Windows.Forms.TextBox PositioningRotationAngleTextBox; + private System.Windows.Forms.Button SelectRuleButton; + } +} \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.cs b/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.cs new file mode 100644 index 0000000..3a5074e --- /dev/null +++ b/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.cs @@ -0,0 +1,675 @@ +using CodeWalker.GameFiles; +using CodeWalker.World; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; + +namespace CodeWalker.Project.Panels +{ + public partial class EditAudioAmbientZonePanel : ProjectPanel + { + public ProjectForm ProjectForm; + public AudioPlacement CurrentZone { get; set; } + + private bool populatingui = false; + + + public EditAudioAmbientZonePanel(ProjectForm owner) + { + ProjectForm = owner; + InitializeComponent(); + } + + public void SetZone(AudioPlacement zone) + { + CurrentZone = zone; + Tag = zone; + UpdateFormTitle(); + UpdateUI(); + } + + private void UpdateFormTitle() + { + Text = CurrentZone?.NameHash.ToString() ?? ""; + } + + + private void UpdateUI() + { + + if (CurrentZone?.AmbientZone == null) + { + AddToProjectButton.Enabled = false; + DeleteButton.Enabled = false; + + populatingui = true; + NameTextBox.Text = string.Empty; + ShapeComboBox.Text = string.Empty; + FlagsTextBox.Text = string.Empty; + + ActivationZoneCentreTextBox.Text = string.Empty; + ActivationSizeTextBox.Text = string.Empty; + ActivationRotationOffsetTextBox.Text = string.Empty; + ActivationSizeScaleTextBox.Text = string.Empty; + + PositioningCentreTextBox.Text = string.Empty; + PositioningSizeTextBox.Text = string.Empty; + PositioningRotationOffsetTextBox.Text = string.Empty; + PositioningSizeScaleTextBox.Text = string.Empty; + + BuiltUpFactorTextBox.Text = string.Empty; + MinPedDensityTextBox.Text = string.Empty; + MaxPedDensityTextBox.Text = string.Empty; + PedDensityTODTextBox.Text = string.Empty; + PedDensityScalarTextBox.Text = string.Empty; + ZoneWaterCalculationTextBox.Text = string.Empty; + PositioningRotationAngleTextBox.Text = string.Empty; + ActivationZoneRotationAngleTextBox.Text = string.Empty; + MinWindInfluenceTextBox.Text = string.Empty; + + WindElevationSoundsTextBox.Text = string.Empty; + RandomRadioSettingsTextBox.Text = string.Empty; + EnviromentRuleTextBox.Text = string.Empty; + AudioSceneTextBox.Text = string.Empty; + RulesTextBox.Text = string.Empty; + DirAmbiencesTextBox.Text = string.Empty; + populatingui = false; + } + else + { + AddToProjectButton.Enabled = CurrentZone?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentZone.RelFile) : false; + DeleteButton.Enabled = !AddToProjectButton.Enabled; + + populatingui = true; + var z = CurrentZone.AmbientZone; + NameTextBox.Text = z.NameHash.ToString(); + ShapeComboBox.Text = z.Shape.ToString(); + FlagsTextBox.Text = z.Flags.Hex; + ActivationZoneCentreTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneCentre); + ActivationSizeTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSize); + ActivationRotationOffsetTextBox.Text = FloatUtil.GetVector3String(z.ActivationZonePostRotationOffset); + ActivationSizeScaleTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSizeScale); + + PositioningCentreTextBox.Text = FloatUtil.GetVector3String(z.PositioningZoneCentre); + PositioningSizeTextBox.Text = FloatUtil.GetVector3String(z.PositioningZoneSize); + PositioningRotationOffsetTextBox.Text = FloatUtil.GetVector3String(z.PositioningZonePostRotationOffset); + PositioningSizeScaleTextBox.Text = FloatUtil.GetVector3String(z.PositioningZoneSizeScale); + + BuiltUpFactorTextBox.Text = z.BuiltUpFactor.ToString(); + MinPedDensityTextBox.Text = z.MinPedDensity.ToString(); + MaxPedDensityTextBox.Text = z.MaxPedDensity.ToString(); + PedDensityTODTextBox.Text = z.PedDensityTOD.ToString(); + PedDensityScalarTextBox.Text = z.PedDensityScalar.ToString(); + ZoneWaterCalculationTextBox.Text = z.ZoneWaterCalculation.ToString(); + PositioningRotationAngleTextBox.Text = z.PositioningZoneRotationAngle.ToString(); + ActivationZoneRotationAngleTextBox.Text = z.ActivationZoneRotationAngle.ToString(); + MinWindInfluenceTextBox.Text = z.MinWindInfluence.ToString(); + + WindElevationSoundsTextBox.Text = z.WindElevationSounds.ToString(); + RandomRadioSettingsTextBox.Text = z.RandomisedRadioSettings.ToString(); + EnviromentRuleTextBox.Text = z.EnvironmentRule.ToString(); + AudioSceneTextBox.Text = z.AudioScene.ToString(); + + StringBuilder sb = new StringBuilder(); + if (z.Rules != null) + { + foreach (var hash in z.Rules) + { + sb.AppendLine(hash.ToString()); + } + } + RulesTextBox.Text = sb.ToString(); + + sb.Clear(); + if (z.DirAmbiences != null) + { + foreach (var extparam in z.DirAmbiences) + { + sb.Append(extparam.Name.ToString()); + sb.Append(", "); + sb.Append(FloatUtil.ToString(extparam.Volume)); + sb.AppendLine(); + } + } + DirAmbiencesTextBox.Text = sb.ToString(); + + populatingui = false; + + if (ProjectForm.WorldForm != null) + { + ProjectForm.WorldForm.SelectObject(CurrentZone); + } + + } + + } + + + private void ProjectItemChanged() + { + CurrentZone?.UpdateFromAmbientZone();//also update the placement wrapper + + if (CurrentZone?.RelFile != null) + { + ProjectForm.SetAudioFileHasChanged(true); + } + } + + + private void NameTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + uint hash = 0; + string name = NameTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //NameHashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentZone.AmbientZone.NameHash != hash) + { + CurrentZone.AmbientZone.Name = NameTextBox.Text; + CurrentZone.AmbientZone.NameHash = hash; + + ProjectItemChanged(); + UpdateFormTitle(); + } + + } + + private void ShapeComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + Dat151ZoneShape shape = Dat151ZoneShape.Box; + if (Enum.TryParse(ShapeComboBox.Text, out shape)) + { + if (CurrentZone.AmbientZone.Shape != shape) + { + CurrentZone.AmbientZone.Shape = shape; + + ProjectItemChanged(); + } + } + + } + + private void PositioningCentreTextBoxTextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningCentreTextBox.Text); + if (CurrentZone.AmbientZone.PositioningZoneCentre != vec) + { + CurrentZone.AmbientZone.PositioningZoneCentre = vec; + + ProjectItemChanged(); + + } + } + + private void OuterPosTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningCentreTextBox.Text); + if (CurrentZone.AmbientZone.ActivationZoneCentre != vec) + { + CurrentZone.AmbientZone.ActivationZoneCentre = vec; + + ProjectItemChanged(); + } + } + + private void ActivationZoneRotationAngleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + uint ang; + if (uint.TryParse(ActivationZoneRotationAngleTextBox.Text, out ang)) + { + if (CurrentZone.AmbientZone.ActivationZoneRotationAngle != ang) + { + CurrentZone.AmbientZone.ActivationZoneRotationAngle = (ushort)ang; + + ProjectItemChanged(); + } + } + } + + private void FlagsTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + uint flags = 0; + if (uint.TryParse(FlagsTextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) + { + if (CurrentZone.AmbientZone.Flags != flags) + { + CurrentZone.AmbientZone.Flags = flags; + + ProjectItemChanged(); + } + } + + } + + private void RandomisedRadioSettings_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var hashstr = RandomRadioSettingsTextBox.Text; + uint hash = 0; + if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(hashstr); + JenkIndex.Ensure(hashstr); + } + + if (CurrentZone.AmbientZone.RandomisedRadioSettings != hash) + { + CurrentZone.AmbientZone.RandomisedRadioSettings = hash; + + ProjectItemChanged(); + } + } + + private void EnviromentRuleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var hashstr = EnviromentRuleTextBox.Text; + uint hash = 0; + if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(hashstr); + JenkIndex.Ensure(hashstr); + } + + if (CurrentZone.AmbientZone.EnvironmentRule != hash) + { + CurrentZone.AmbientZone.EnvironmentRule = hash; + + ProjectItemChanged(); + } + } + + private void AudioSceneTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var hashstr = AudioSceneTextBox.Text; + uint hash = 0; + if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(hashstr); + JenkIndex.Ensure(hashstr); + } + + if (CurrentZone.AmbientZone.AudioScene != hash) + { + CurrentZone.AmbientZone.AudioScene = hash; + + ProjectItemChanged(); + } + } + + private void RulesTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var hashstrs = RulesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); + if (hashstrs?.Length > 0) + { + var hashlist = new List(); + foreach (var hashstr in hashstrs) + { + uint hash = 0; + if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(hashstr); + JenkIndex.Ensure(hashstr); + } + hashlist.Add(hash); + } + + CurrentZone.AmbientZone.Rules = hashlist.ToArray(); + CurrentZone.AmbientZone.NumRules = (byte)hashlist.Count; + + ProjectItemChanged(); + } + } + + private void DirAmbiencesTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var paramstrs = DirAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); + if (paramstrs?.Length > 0) + { + var paramlist = new List(); + foreach (var paramstr in paramstrs) + { + var paramvals = paramstr.Split(','); + if (paramvals?.Length == 2) + { + var param = new Dat151AmbientZone.DirAmbience(); + var hashstr = paramvals[0].Trim(); + var valstr = paramvals[1].Trim(); + uint hash = 0; + if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(hashstr); + JenkIndex.Ensure(hashstr); + } + param.Name = hash; + param.Volume = FloatUtil.Parse(valstr); + paramlist.Add(param); + } + } + + CurrentZone.AmbientZone.DirAmbiences = paramlist.ToArray(); + CurrentZone.AmbientZone.NumDirAmbiences = (byte)paramlist.Count; + + ProjectItemChanged(); + } + } + + private void GoToButton_Click(object sender, EventArgs e) + { + if (CurrentZone == null) return; + if (ProjectForm.WorldForm == null) return; + ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AmbientZone.PositioningZoneSize); + } + + private void AddToProjectButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentZone); + ProjectForm.AddAudioFileToProject(CurrentZone.RelFile); + } + + private void DeleteButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentZone); + ProjectForm.DeleteAudioAmbientZone(); + } + + private void BuiltUpFactorTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(BuiltUpFactorTextBox.Text); + if (CurrentZone.AmbientZone.BuiltUpFactor != vec) + { + CurrentZone.AmbientZone.BuiltUpFactor = vec; + + ProjectItemChanged(); + } + } + + private void PedDensityTODTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(PedDensityTODTextBox.Text); + if (CurrentZone.AmbientZone.PedDensityTOD != vec) + { + CurrentZone.AmbientZone.PedDensityTOD = (uint)vec; + + ProjectItemChanged(); + } + } + + private void MinPedDensityTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(MinPedDensityTextBox.Text); + if (CurrentZone.AmbientZone.MinPedDensity != vec) + { + CurrentZone.AmbientZone.MinPedDensity = vec; + + ProjectItemChanged(); + } + } + + private void PedDensityScalarTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(PedDensityScalarTextBox.Text); + if (CurrentZone.AmbientZone.PedDensityScalar != vec) + { + CurrentZone.AmbientZone.PedDensityScalar = vec; + + ProjectItemChanged(); + } + } + + private void MaxPedDensityTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(MaxPedDensityTextBox.Text); + if (CurrentZone.AmbientZone.MaxPedDensity != vec) + { + CurrentZone.AmbientZone.MaxPedDensity = vec; + + ProjectItemChanged(); + } + } + + private void ZoneWaterCalculationTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(ZoneWaterCalculationTextBox.Text); + if (CurrentZone.AmbientZone.ZoneWaterCalculation != vec) + { + CurrentZone.AmbientZone.ZoneWaterCalculation = (byte)vec; + + ProjectItemChanged(); + } + } + + private void PositioningSizeTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningSizeTextBox.Text); + if (CurrentZone.AmbientZone.PositioningZoneSize != vec) + { + CurrentZone.AmbientZone.PositioningZoneSize = vec; + + ProjectItemChanged(); + } + } + + private void PositioningRotationAngleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + uint ang = 0; + if (uint.TryParse(PositioningRotationAngleTextBox.Text, out ang)) + { + if (CurrentZone.AmbientZone.PositioningZoneRotationAngle != ang) + { + CurrentZone.AmbientZone.PositioningZoneRotationAngle = (ushort)ang; + + ProjectItemChanged(); + } + } + } + + private void PositioningRotationOffsetTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningRotationOffsetTextBox.Text); + if (CurrentZone.AmbientZone.PositioningZonePostRotationOffset != vec) + { + CurrentZone.AmbientZone.PositioningZonePostRotationOffset = vec; + + ProjectItemChanged(); + } + } + + private void PositioningSizeScaleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningSizeTextBox.Text); + if (CurrentZone.AmbientZone.PositioningZoneSizeScale != vec) + { + CurrentZone.AmbientZone.PositioningZoneSizeScale = vec; + + ProjectItemChanged(); + } + } + + private void ActivationSizeTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(ActivationSizeTextBox.Text); + if (CurrentZone.AmbientZone.ActivationZoneSize != vec) + { + CurrentZone.AmbientZone.ActivationZoneSize = vec; + + ProjectItemChanged(); + } + } + + private void ActivationRotationOffsetTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(ActivationRotationOffsetTextBox.Text); + if (CurrentZone.AmbientZone.ActivationZonePostRotationOffset != vec) + { + CurrentZone.AmbientZone.ActivationZonePostRotationOffset = vec; + + ProjectItemChanged(); + } + } + + private void ActivationSizeScaleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.ParseVector3String(ActivationSizeScaleTextBox.Text); + if (CurrentZone.AmbientZone.ActivationZoneSizeScale != vec) + { + CurrentZone.AmbientZone.ActivationZoneSizeScale = vec; + + ProjectItemChanged(); + } + } + + private void MinWindInfluenceTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(MinWindInfluenceTextBox.Text); + if (CurrentZone.AmbientZone.MinWindInfluence != vec) + { + CurrentZone.AmbientZone.MinWindInfluence = vec; + + ProjectItemChanged(); + } + } + + private void MaxWindInfluenceTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(MaxWindInfluenceTextBox.Text); + if (CurrentZone.AmbientZone.MaxWindInfluence != vec) + { + CurrentZone.AmbientZone.MaxWindInfluence = vec; + + ProjectItemChanged(); + } + } + + private void WindElevationSoundsTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AmbientZone == null) return; + + var vec = FloatUtil.Parse(WindElevationSoundsTextBox.Text); + if (CurrentZone.AmbientZone.WindElevationSounds != vec) + { + CurrentZone.AmbientZone.WindElevationSounds = (uint)vec; + + ProjectItemChanged(); + } + } + + private void RulesTextBox_Enter(object sender, EventArgs e) + { + if (RulesTextBox.Text.Length == 0) return; + SelectRuleButton.Enabled = true; + } + + private void SelectRuleButton_Click(object sender, EventArgs e) + { + var txt = RulesTextBox.Text; + var start = RulesTextBox.SelectionStart; + if (txt.Length == 0) return; + if (start >= txt.Length) start = txt.Length - 1; + for (int i = start; i >= 0; i--) + { + if (txt[i] == '\n') break; + start = i; + } + var end = start; + for (int i = start; i < txt.Length; i++) + { + if ((txt[i] == '\n') || (txt[i] == '\r')) break; + end = i; + } + var str = txt.Substring(start, end - start + 1); + if (string.IsNullOrEmpty(str)) return; + + uint hash; + if (!uint.TryParse(str, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(str); + } + + ProjectForm?.ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(hash); + + } + } +} diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.resx b/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.resx similarity index 98% rename from CodeWalker/Project/Panels/EditAudioZonePanel.resx rename to CodeWalker/Project/Panels/EditAudioAmbientZonePanel.resx index 1431f6b..48f71f3 100644 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.resx +++ b/CodeWalker/Project/Panels/EditAudioAmbientZonePanel.resx @@ -117,6 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + False + + + False + diff --git a/CodeWalker/Project/Panels/EditAudioInteriorPanel.cs b/CodeWalker/Project/Panels/EditAudioInteriorPanel.cs index ef412f6..52eee03 100644 --- a/CodeWalker/Project/Panels/EditAudioInteriorPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioInteriorPanel.cs @@ -15,7 +15,7 @@ namespace CodeWalker.Project.Panels public partial class EditAudioInteriorPanel : ProjectPanel { public ProjectForm ProjectForm; - public Dat151Interior CurrentInterior { get; set; } + public Dat151InteriorSettings CurrentInterior { get; set; } private bool populatingui = false; @@ -27,7 +27,7 @@ namespace CodeWalker.Project.Panels } - public void SetInterior(Dat151Interior interior) + public void SetInterior(Dat151InteriorSettings interior) { CurrentInterior = interior; Tag = interior; @@ -66,8 +66,8 @@ namespace CodeWalker.Project.Panels NameTextBox.Text = ci.NameHash.ToString(); FlagsTextBox.Text = ci.Flags.Hex; - WallaTextBox.Text = ci.Walla.ToString(); - TunnelTextBox.Text = ci.Tunnel.ToString(); + WallaTextBox.Text = ci.InteriorWallaSoundSet.ToString(); + TunnelTextBox.Text = ci.InteriorReflections.ToString(); StringBuilder sb = new StringBuilder(); if (ci.Rooms != null) @@ -150,9 +150,9 @@ namespace CodeWalker.Project.Panels JenkIndex.Ensure(name); } - if (CurrentInterior.Walla != hash) + if (CurrentInterior.InteriorWallaSoundSet != hash) { - CurrentInterior.Walla = hash; + CurrentInterior.InteriorWallaSoundSet = hash; ProjectItemChanged(); } @@ -171,9 +171,9 @@ namespace CodeWalker.Project.Panels JenkIndex.Ensure(name); } - if (CurrentInterior.Tunnel != hash) + if (CurrentInterior.InteriorReflections != hash) { - CurrentInterior.Tunnel = hash; + CurrentInterior.InteriorReflections = hash; ProjectItemChanged(); } diff --git a/CodeWalker/Project/Panels/EditAudioInteriorRoomPanel.cs b/CodeWalker/Project/Panels/EditAudioInteriorRoomPanel.cs index 39efd8e..d26ce0d 100644 --- a/CodeWalker/Project/Panels/EditAudioInteriorRoomPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioInteriorRoomPanel.cs @@ -75,22 +75,22 @@ namespace CodeWalker.Project.Panels var cr = CurrentRoom; NameTextBox.Text = cr.NameHash.ToString(); - MloRoomTextBox.Text = cr.MloRoom.ToString(); - ZoneTextBox.Text = cr.Zone.ToString(); - Unk02TextBox.Text = cr.Unk02.ToString(); - Unk03TextBox.Text = FloatUtil.ToString(cr.Unk03); - ReverbTextBox.Text = FloatUtil.ToString(cr.Reverb); - EchoTextBox.Text = FloatUtil.ToString(cr.Echo); - SoundTextBox.Text = cr.Sound.ToString(); - Unk07TextBox.Text = FloatUtil.ToString(cr.Unk07); - Unk08TextBox.Text = FloatUtil.ToString(cr.Unk08); - Unk09TextBox.Text = FloatUtil.ToString(cr.Unk09); - Unk10TextBox.Text = FloatUtil.ToString(cr.Unk10); - Unk11TextBox.Text = FloatUtil.ToString(cr.Unk11); - Unk12TextBox.Text = FloatUtil.ToString(cr.Unk12); - Unk13TextBox.Text = cr.Unk13.ToString(); - SoundSetTextBox.Text = cr.SoundSet.ToString(); - Flags0TextBox.Text = cr.Flags0.Hex; + MloRoomTextBox.Text = cr.RoomName.ToString(); + ZoneTextBox.Text = cr.AmbientZone.ToString(); + Unk02TextBox.Text = cr.InteriorType.ToString(); + Unk03TextBox.Text = FloatUtil.ToString(cr.ReverbSmall); + ReverbTextBox.Text = FloatUtil.ToString(cr.ReverbMedium); + EchoTextBox.Text = FloatUtil.ToString(cr.ReverbLarge); + SoundTextBox.Text = cr.RoomToneSound.ToString(); + Unk07TextBox.Text = FloatUtil.ToString(cr.RainType); + Unk08TextBox.Text = FloatUtil.ToString(cr.ExteriorAudibility); + Unk09TextBox.Text = FloatUtil.ToString(cr.RoomOcclusionDamping); + Unk10TextBox.Text = FloatUtil.ToString(cr.NonMarkedPortalOcclusion); + Unk11TextBox.Text = FloatUtil.ToString(cr.DistanceFromPortalForOcclusion); + Unk12TextBox.Text = FloatUtil.ToString(cr.DistanceFromPortalFadeDistance); + Unk13TextBox.Text = cr.WeaponMetrics.ToString(); + SoundSetTextBox.Text = cr.InteriorWallaSoundSet.ToString(); + Flags0TextBox.Text = cr.Flags.Hex; populatingui = false; @@ -144,9 +144,9 @@ namespace CodeWalker.Project.Panels } //NameHashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentRoom.MloRoom != hash) + if (CurrentRoom.RoomName != hash) { - CurrentRoom.MloRoom = hash; + CurrentRoom.RoomName = hash; ProjectItemChanged(); } @@ -166,9 +166,9 @@ namespace CodeWalker.Project.Panels } //NameHashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentRoom.Zone != hash) + if (CurrentRoom.AmbientZone != hash) { - CurrentRoom.Zone = hash; + CurrentRoom.AmbientZone = hash; ProjectItemChanged(); } @@ -182,9 +182,9 @@ namespace CodeWalker.Project.Panels uint val = 0; if (uint.TryParse(Unk02TextBox.Text, out val)) { - if (CurrentRoom.Unk02 != val) + if (CurrentRoom.InteriorType != val) { - CurrentRoom.Unk02 = val; + CurrentRoom.InteriorType = (byte)val; ProjectItemChanged(); } @@ -199,9 +199,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk03TextBox.Text, out val)) { - if (CurrentRoom.Unk03 != val) + if (CurrentRoom.ReverbSmall != val) { - CurrentRoom.Unk03 = val; + CurrentRoom.ReverbSmall = val; ProjectItemChanged(); } @@ -216,9 +216,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(ReverbTextBox.Text, out val)) { - if (CurrentRoom.Reverb != val) + if (CurrentRoom.ReverbMedium != val) { - CurrentRoom.Reverb = val; + CurrentRoom.ReverbMedium = val; ProjectItemChanged(); } @@ -233,9 +233,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(EchoTextBox.Text, out val)) { - if (CurrentRoom.Echo != val) + if (CurrentRoom.ReverbLarge != val) { - CurrentRoom.Echo = val; + CurrentRoom.ReverbLarge = val; ProjectItemChanged(); } @@ -256,9 +256,9 @@ namespace CodeWalker.Project.Panels } //NameHashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentRoom.Sound != hash) + if (CurrentRoom.RoomToneSound != hash) { - CurrentRoom.Sound = hash; + CurrentRoom.RoomToneSound = hash; ProjectItemChanged(); } @@ -272,9 +272,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk07TextBox.Text, out val)) { - if (CurrentRoom.Unk07 != val) + if (CurrentRoom.RainType != val) { - CurrentRoom.Unk07 = val; + CurrentRoom.RainType = (byte)val; ProjectItemChanged(); } @@ -289,9 +289,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk08TextBox.Text, out val)) { - if (CurrentRoom.Unk08 != val) + if (CurrentRoom.ExteriorAudibility != val) { - CurrentRoom.Unk08 = val; + CurrentRoom.ExteriorAudibility = val; ProjectItemChanged(); } @@ -306,9 +306,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk09TextBox.Text, out val)) { - if (CurrentRoom.Unk09 != val) + if (CurrentRoom.RoomOcclusionDamping != val) { - CurrentRoom.Unk09 = val; + CurrentRoom.RoomOcclusionDamping = val; ProjectItemChanged(); } @@ -323,9 +323,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk10TextBox.Text, out val)) { - if (CurrentRoom.Unk10 != val) + if (CurrentRoom.NonMarkedPortalOcclusion != val) { - CurrentRoom.Unk10 = val; + CurrentRoom.NonMarkedPortalOcclusion = val; ProjectItemChanged(); } @@ -340,9 +340,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk11TextBox.Text, out val)) { - if (CurrentRoom.Unk11 != val) + if (CurrentRoom.DistanceFromPortalForOcclusion != val) { - CurrentRoom.Unk11 = val; + CurrentRoom.DistanceFromPortalForOcclusion = val; ProjectItemChanged(); } @@ -357,9 +357,9 @@ namespace CodeWalker.Project.Panels float val = 0; if (FloatUtil.TryParse(Unk12TextBox.Text, out val)) { - if (CurrentRoom.Unk12 != val) + if (CurrentRoom.DistanceFromPortalFadeDistance != val) { - CurrentRoom.Unk12 = val; + CurrentRoom.DistanceFromPortalFadeDistance = val; ProjectItemChanged(); } @@ -380,9 +380,9 @@ namespace CodeWalker.Project.Panels } //NameHashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentRoom.Unk13 != hash) + if (CurrentRoom.WeaponMetrics != hash) { - CurrentRoom.Unk13 = hash; + CurrentRoom.WeaponMetrics = hash; ProjectItemChanged(); } @@ -402,9 +402,9 @@ namespace CodeWalker.Project.Panels } //NameHashLabel.Text = "Hash: " + hash.ToString(); - if (CurrentRoom.SoundSet != hash) + if (CurrentRoom.InteriorWallaSoundSet != hash) { - CurrentRoom.SoundSet = hash; + CurrentRoom.InteriorWallaSoundSet = hash; ProjectItemChanged(); } @@ -418,9 +418,9 @@ namespace CodeWalker.Project.Panels uint flags = 0; if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentRoom.Flags0 != flags) + if (CurrentRoom.Flags != flags) { - CurrentRoom.Flags0 = flags; + CurrentRoom.Flags = flags; ProjectItemChanged(); } diff --git a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.Designer.cs similarity index 95% rename from CodeWalker/Project/Panels/EditAudioEmitterListPanel.Designer.cs rename to CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.Designer.cs index 3b99fc3..161cac7 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.Designer.cs @@ -1,6 +1,6 @@ namespace CodeWalker.Project.Panels { - partial class EditAudioEmitterListPanel + partial class EditAudioStaticEmitterListPanel { /// /// Required designer variable. @@ -28,14 +28,14 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioEmitterListPanel)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioStaticEmitterListPanel)); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.DeleteButton = new System.Windows.Forms.Button(); this.label12 = new System.Windows.Forms.Label(); this.NameTextBox = new System.Windows.Forms.TextBox(); this.label19 = new System.Windows.Forms.Label(); this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.DeleteButton = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.SuspendLayout(); @@ -64,9 +64,20 @@ this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(551, 420); this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Ambient Emitter List"; + this.tabPage1.Text = "Static Emitter List"; this.tabPage1.UseVisualStyleBackColor = true; // + // DeleteButton + // + this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.DeleteButton.Location = new System.Drawing.Point(438, 381); + this.DeleteButton.Name = "DeleteButton"; + this.DeleteButton.Size = new System.Drawing.Size(93, 23); + this.DeleteButton.TabIndex = 76; + this.DeleteButton.Text = "Delete list"; + this.DeleteButton.UseVisualStyleBackColor = true; + this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); + // // label12 // this.label12.AutoSize = true; @@ -109,26 +120,15 @@ this.HashesTextBox.WordWrap = false; this.HashesTextBox.TextChanged += new System.EventHandler(this.HashesTextBox_TextChanged); // - // DeleteButton - // - this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.DeleteButton.Location = new System.Drawing.Point(438, 381); - this.DeleteButton.Name = "DeleteButton"; - this.DeleteButton.Size = new System.Drawing.Size(93, 23); - this.DeleteButton.TabIndex = 76; - this.DeleteButton.Text = "Delete list"; - this.DeleteButton.UseVisualStyleBackColor = true; - this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); - // - // EditAudioEmitterListPanel + // EditAudioStaticEmitterListPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(562, 450); this.Controls.Add(this.tabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "EditAudioEmitterListPanel"; - this.Text = "Edit Audio Emitter List"; + this.Name = "EditAudioStaticEmitterListPanel"; + this.Text = "Edit Audio Static Emitter List"; this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); diff --git a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs b/CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.cs similarity index 95% rename from CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs rename to CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.cs index 306913c..d09538f 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterListPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.cs @@ -11,7 +11,7 @@ using System.Windows.Forms; namespace CodeWalker.Project.Panels { - public partial class EditAudioEmitterListPanel : ProjectPanel + public partial class EditAudioStaticEmitterListPanel : ProjectPanel { public ProjectForm ProjectForm; public Dat151StaticEmitterList CurrentEmitterList { get; set; } @@ -19,7 +19,7 @@ namespace CodeWalker.Project.Panels private bool populatingui = false; - public EditAudioEmitterListPanel(ProjectForm owner) + public EditAudioStaticEmitterListPanel(ProjectForm owner) { ProjectForm = owner; InitializeComponent(); @@ -144,7 +144,7 @@ namespace CodeWalker.Project.Panels private void DeleteButton_Click(object sender, EventArgs e) { ProjectForm.SetProjectItem(CurrentEmitterList); - ProjectForm.DeleteAudioEmitterList(); + ProjectForm.DeleteAudioStaticEmitterList(); } } } diff --git a/CodeWalker/Project/Panels/EditAudioZoneListPanel.resx b/CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.resx similarity index 100% rename from CodeWalker/Project/Panels/EditAudioZoneListPanel.resx rename to CodeWalker/Project/Panels/EditAudioStaticEmitterListPanel.resx diff --git a/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.Designer.cs new file mode 100644 index 0000000..f49f358 --- /dev/null +++ b/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.Designer.cs @@ -0,0 +1,883 @@ +namespace CodeWalker.Project.Panels +{ + partial class EditAudioStaticEmitterPanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioStaticEmitterPanel)); + this.GoToButton = new System.Windows.Forms.Button(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.label28 = new System.Windows.Forms.Label(); + this.UndamagedHealthTextBox = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.BrokenHealthTextBox = new System.Windows.Forms.TextBox(); + this.LargeReverbUpDown = new System.Windows.Forms.NumericUpDown(); + this.label26 = new System.Windows.Forms.Label(); + this.MediumReverbUpDown = new System.Windows.Forms.NumericUpDown(); + this.label25 = new System.Windows.Forms.Label(); + this.SmallReverbUpDown = new System.Windows.Forms.NumericUpDown(); + this.label24 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.MaxLeakageTextBox = new System.Windows.Forms.TextBox(); + this.MaxLeakageDistUpDown = new System.Windows.Forms.NumericUpDown(); + this.label22 = new System.Windows.Forms.Label(); + this.MinLeakageDistUpDown = new System.Windows.Forms.NumericUpDown(); + this.label20 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.OnBreakTextBox = new System.Windows.Forms.TextBox(); + this.label17 = new System.Windows.Forms.Label(); + this.AlarmTextBox = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); + this.RoomTextBox = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.InteriorTextBox = new System.Windows.Forms.TextBox(); + this.RolloffFactorUpDown = new System.Windows.Forms.NumericUpDown(); + this.label13 = new System.Windows.Forms.Label(); + this.HPFCutoffUpDown = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); + this.LPFCutoffUpDown = new System.Windows.Forms.NumericUpDown(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.VolumeTextBox = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.MaxPathDepthUpDown = new System.Windows.Forms.NumericUpDown(); + this.EndTimeUpDown = new System.Windows.Forms.NumericUpDown(); + this.StartTimeUpDown = new System.Windows.Forms.NumericUpDown(); + this.DeleteButton = new System.Windows.Forms.Button(); + this.AddToProjectButton = new System.Windows.Forms.Button(); + this.label21 = new System.Windows.Forms.Label(); + this.FlagsTextBox = new System.Windows.Forms.TextBox(); + this.label18 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.NameTextBox = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.OuterRadiusTextBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.RadioScoreTextBox = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.RadioStationTextBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.ChildSoundTextBox = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.InnerRadiusTextBox = new System.Windows.Forms.TextBox(); + this.label16 = new System.Windows.Forms.Label(); + this.PositionTextBox = new System.Windows.Forms.TextBox(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LargeReverbUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MediumReverbUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmallReverbUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxLeakageDistUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinLeakageDistUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RolloffFactorUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.HPFCutoffUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.LPFCutoffUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxPathDepthUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.EndTimeUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.StartTimeUpDown)).BeginInit(); + this.SuspendLayout(); + // + // GoToButton + // + this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.GoToButton.Location = new System.Drawing.Point(483, 0); + this.GoToButton.Name = "GoToButton"; + this.GoToButton.Size = new System.Drawing.Size(68, 23); + this.GoToButton.TabIndex = 1; + this.GoToButton.Text = "Go to"; + this.GoToButton.UseVisualStyleBackColor = true; + this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click); + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Location = new System.Drawing.Point(2, 3); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(559, 447); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.label28); + this.tabPage1.Controls.Add(this.UndamagedHealthTextBox); + this.tabPage1.Controls.Add(this.label27); + this.tabPage1.Controls.Add(this.BrokenHealthTextBox); + this.tabPage1.Controls.Add(this.LargeReverbUpDown); + this.tabPage1.Controls.Add(this.label26); + this.tabPage1.Controls.Add(this.MediumReverbUpDown); + this.tabPage1.Controls.Add(this.label25); + this.tabPage1.Controls.Add(this.SmallReverbUpDown); + this.tabPage1.Controls.Add(this.label24); + this.tabPage1.Controls.Add(this.label23); + this.tabPage1.Controls.Add(this.MaxLeakageTextBox); + this.tabPage1.Controls.Add(this.MaxLeakageDistUpDown); + this.tabPage1.Controls.Add(this.label22); + this.tabPage1.Controls.Add(this.MinLeakageDistUpDown); + this.tabPage1.Controls.Add(this.label20); + this.tabPage1.Controls.Add(this.label19); + this.tabPage1.Controls.Add(this.OnBreakTextBox); + this.tabPage1.Controls.Add(this.label17); + this.tabPage1.Controls.Add(this.AlarmTextBox); + this.tabPage1.Controls.Add(this.label15); + this.tabPage1.Controls.Add(this.RoomTextBox); + this.tabPage1.Controls.Add(this.label14); + this.tabPage1.Controls.Add(this.InteriorTextBox); + this.tabPage1.Controls.Add(this.RolloffFactorUpDown); + this.tabPage1.Controls.Add(this.label13); + this.tabPage1.Controls.Add(this.HPFCutoffUpDown); + this.tabPage1.Controls.Add(this.label11); + this.tabPage1.Controls.Add(this.LPFCutoffUpDown); + this.tabPage1.Controls.Add(this.label6); + this.tabPage1.Controls.Add(this.label5); + this.tabPage1.Controls.Add(this.VolumeTextBox); + this.tabPage1.Controls.Add(this.label9); + this.tabPage1.Controls.Add(this.label8); + this.tabPage1.Controls.Add(this.MaxPathDepthUpDown); + this.tabPage1.Controls.Add(this.EndTimeUpDown); + this.tabPage1.Controls.Add(this.StartTimeUpDown); + this.tabPage1.Controls.Add(this.DeleteButton); + this.tabPage1.Controls.Add(this.AddToProjectButton); + this.tabPage1.Controls.Add(this.label21); + this.tabPage1.Controls.Add(this.FlagsTextBox); + this.tabPage1.Controls.Add(this.label18); + this.tabPage1.Controls.Add(this.label12); + this.tabPage1.Controls.Add(this.NameTextBox); + this.tabPage1.Controls.Add(this.label7); + this.tabPage1.Controls.Add(this.label10); + this.tabPage1.Controls.Add(this.OuterRadiusTextBox); + this.tabPage1.Controls.Add(this.label4); + this.tabPage1.Controls.Add(this.RadioScoreTextBox); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.RadioStationTextBox); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.ChildSoundTextBox); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Controls.Add(this.InnerRadiusTextBox); + this.tabPage1.Controls.Add(this.label16); + this.tabPage1.Controls.Add(this.PositionTextBox); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(551, 421); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Static Emitter"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // label28 + // + this.label28.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(336, 335); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(100, 13); + this.label28.TabIndex = 82; + this.label28.Text = "Undamaged health:"; + // + // UndamagedHealthTextBox + // + this.UndamagedHealthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.UndamagedHealthTextBox.Location = new System.Drawing.Point(442, 332); + this.UndamagedHealthTextBox.Name = "UndamagedHealthTextBox"; + this.UndamagedHealthTextBox.Size = new System.Drawing.Size(102, 20); + this.UndamagedHealthTextBox.TabIndex = 83; + this.UndamagedHealthTextBox.TextChanged += new System.EventHandler(this.UndamagedHealthTextBox_TextChanged); + // + // label27 + // + this.label27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(360, 310); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(76, 13); + this.label27.TabIndex = 80; + this.label27.Text = "Broken health:"; + // + // BrokenHealthTextBox + // + this.BrokenHealthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.BrokenHealthTextBox.Location = new System.Drawing.Point(442, 307); + this.BrokenHealthTextBox.Name = "BrokenHealthTextBox"; + this.BrokenHealthTextBox.Size = new System.Drawing.Size(102, 20); + this.BrokenHealthTextBox.TabIndex = 81; + this.BrokenHealthTextBox.TextChanged += new System.EventHandler(this.BrokenHealthTextBox_TextChanged); + // + // LargeReverbUpDown + // + this.LargeReverbUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.LargeReverbUpDown.Location = new System.Drawing.Point(442, 281); + this.LargeReverbUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.LargeReverbUpDown.Name = "LargeReverbUpDown"; + this.LargeReverbUpDown.Size = new System.Drawing.Size(48, 20); + this.LargeReverbUpDown.TabIndex = 79; + this.LargeReverbUpDown.ValueChanged += new System.EventHandler(this.LargeReverbUpDown_ValueChanged); + // + // label26 + // + this.label26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(340, 283); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(96, 13); + this.label26.TabIndex = 78; + this.label26.Text = "Large reverb send:"; + // + // MediumReverbUpDown + // + this.MediumReverbUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.MediumReverbUpDown.Location = new System.Drawing.Point(442, 255); + this.MediumReverbUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.MediumReverbUpDown.Name = "MediumReverbUpDown"; + this.MediumReverbUpDown.Size = new System.Drawing.Size(48, 20); + this.MediumReverbUpDown.TabIndex = 77; + this.MediumReverbUpDown.ValueChanged += new System.EventHandler(this.MediumReverbUpDown_ValueChanged); + // + // label25 + // + this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(331, 257); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(106, 13); + this.label25.TabIndex = 76; + this.label25.Text = "Medium reverb send:"; + // + // SmallReverbUpDown + // + this.SmallReverbUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.SmallReverbUpDown.Location = new System.Drawing.Point(442, 229); + this.SmallReverbUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.SmallReverbUpDown.Name = "SmallReverbUpDown"; + this.SmallReverbUpDown.Size = new System.Drawing.Size(48, 20); + this.SmallReverbUpDown.TabIndex = 75; + this.SmallReverbUpDown.ValueChanged += new System.EventHandler(this.SmallReverbUpDown_ValueChanged); + // + // label24 + // + this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(340, 231); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(94, 13); + this.label24.TabIndex = 74; + this.label24.Text = "Small reverb send:"; + // + // label23 + // + this.label23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(365, 130); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(71, 13); + this.label23.TabIndex = 66; + this.label23.Text = "Max leakage:"; + // + // MaxLeakageTextBox + // + this.MaxLeakageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.MaxLeakageTextBox.Location = new System.Drawing.Point(442, 127); + this.MaxLeakageTextBox.Name = "MaxLeakageTextBox"; + this.MaxLeakageTextBox.Size = new System.Drawing.Size(102, 20); + this.MaxLeakageTextBox.TabIndex = 67; + this.MaxLeakageTextBox.TextChanged += new System.EventHandler(this.MaxLeakageTextBox_TextChanged); + // + // MaxLeakageDistUpDown + // + this.MaxLeakageDistUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.MaxLeakageDistUpDown.Location = new System.Drawing.Point(442, 179); + this.MaxLeakageDistUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.MaxLeakageDistUpDown.Name = "MaxLeakageDistUpDown"; + this.MaxLeakageDistUpDown.Size = new System.Drawing.Size(102, 20); + this.MaxLeakageDistUpDown.TabIndex = 71; + this.MaxLeakageDistUpDown.ValueChanged += new System.EventHandler(this.MaxLeakageDistUpDown_ValueChanged); + // + // label22 + // + this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(348, 181); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(90, 13); + this.label22.TabIndex = 70; + this.label22.Text = "Max leakage dist:"; + // + // MinLeakageDistUpDown + // + this.MinLeakageDistUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.MinLeakageDistUpDown.Location = new System.Drawing.Point(442, 153); + this.MinLeakageDistUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.MinLeakageDistUpDown.Name = "MinLeakageDistUpDown"; + this.MinLeakageDistUpDown.Size = new System.Drawing.Size(102, 20); + this.MinLeakageDistUpDown.TabIndex = 69; + this.MinLeakageDistUpDown.ValueChanged += new System.EventHandler(this.MinLeakageDistUpDown_ValueChanged); + // + // label20 + // + this.label20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(349, 155); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(87, 13); + this.label20.TabIndex = 68; + this.label20.Text = "Min leakage dist:"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(7, 258); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(54, 13); + this.label19.TabIndex = 49; + this.label19.Text = "On break:"; + // + // OnBreakTextBox + // + this.OnBreakTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.OnBreakTextBox.Location = new System.Drawing.Point(84, 255); + this.OnBreakTextBox.Name = "OnBreakTextBox"; + this.OnBreakTextBox.Size = new System.Drawing.Size(237, 20); + this.OnBreakTextBox.TabIndex = 50; + this.OnBreakTextBox.TextChanged += new System.EventHandler(this.OnBreakTextBox_TextChanged); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(7, 232); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(36, 13); + this.label17.TabIndex = 47; + this.label17.Text = "Alarm:"; + // + // AlarmTextBox + // + this.AlarmTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.AlarmTextBox.Location = new System.Drawing.Point(84, 229); + this.AlarmTextBox.Name = "AlarmTextBox"; + this.AlarmTextBox.Size = new System.Drawing.Size(237, 20); + this.AlarmTextBox.TabIndex = 48; + this.AlarmTextBox.TextChanged += new System.EventHandler(this.AlarmTextBox_TextChanged); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(7, 206); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(68, 13); + this.label15.TabIndex = 45; + this.label15.Text = "Interior room:"; + // + // RoomTextBox + // + this.RoomTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.RoomTextBox.Location = new System.Drawing.Point(84, 203); + this.RoomTextBox.Name = "RoomTextBox"; + this.RoomTextBox.Size = new System.Drawing.Size(237, 20); + this.RoomTextBox.TabIndex = 46; + this.RoomTextBox.TextChanged += new System.EventHandler(this.RoomTextBox_TextChanged); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(7, 180); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(42, 13); + this.label14.TabIndex = 43; + this.label14.Text = "Interior:"; + // + // InteriorTextBox + // + this.InteriorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.InteriorTextBox.Location = new System.Drawing.Point(84, 177); + this.InteriorTextBox.Name = "InteriorTextBox"; + this.InteriorTextBox.Size = new System.Drawing.Size(237, 20); + this.InteriorTextBox.TabIndex = 44; + this.InteriorTextBox.TextChanged += new System.EventHandler(this.InteriorTextBox_TextChanged); + // + // RolloffFactorUpDown + // + this.RolloffFactorUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.RolloffFactorUpDown.Location = new System.Drawing.Point(442, 103); + this.RolloffFactorUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.RolloffFactorUpDown.Name = "RolloffFactorUpDown"; + this.RolloffFactorUpDown.Size = new System.Drawing.Size(102, 20); + this.RolloffFactorUpDown.TabIndex = 65; + this.RolloffFactorUpDown.ValueChanged += new System.EventHandler(this.RolloffFactorUpDown_ValueChanged); + // + // label13 + // + this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(365, 106); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(70, 13); + this.label13.TabIndex = 64; + this.label13.Text = "Rolloff factor:"; + // + // HPFCutoffUpDown + // + this.HPFCutoffUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.HPFCutoffUpDown.Location = new System.Drawing.Point(442, 79); + this.HPFCutoffUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.HPFCutoffUpDown.Name = "HPFCutoffUpDown"; + this.HPFCutoffUpDown.Size = new System.Drawing.Size(102, 20); + this.HPFCutoffUpDown.TabIndex = 63; + this.HPFCutoffUpDown.ValueChanged += new System.EventHandler(this.HPFCutoffUpDown_ValueChanged); + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(365, 82); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(62, 13); + this.label11.TabIndex = 62; + this.label11.Text = "HPF Cutoff:"; + // + // LPFCutoffUpDown + // + this.LPFCutoffUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.LPFCutoffUpDown.Location = new System.Drawing.Point(442, 54); + this.LPFCutoffUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.LPFCutoffUpDown.Name = "LPFCutoffUpDown"; + this.LPFCutoffUpDown.Size = new System.Drawing.Size(102, 20); + this.LPFCutoffUpDown.TabIndex = 61; + this.LPFCutoffUpDown.ValueChanged += new System.EventHandler(this.LPFCutoffUpDown_ValueChanged); + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(365, 57); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(60, 13); + this.label6.TabIndex = 60; + this.label6.Text = "LPF Cutoff:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 284); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(45, 13); + this.label5.TabIndex = 51; + this.label5.Text = "Volume:"; + // + // VolumeTextBox + // + this.VolumeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.VolumeTextBox.Location = new System.Drawing.Point(84, 281); + this.VolumeTextBox.Name = "VolumeTextBox"; + this.VolumeTextBox.Size = new System.Drawing.Size(237, 20); + this.VolumeTextBox.TabIndex = 52; + this.VolumeTextBox.TextChanged += new System.EventHandler(this.VolumeTextBox_TextChanged); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(192, 310); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(78, 13); + this.label9.TabIndex = 55; + this.label9.Text = "(game minutes)"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(7, 335); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(55, 13); + this.label8.TabIndex = 56; + this.label8.Text = "End Time:"; + // + // MaxPathDepthUpDown + // + this.MaxPathDepthUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.MaxPathDepthUpDown.Location = new System.Drawing.Point(442, 203); + this.MaxPathDepthUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.MaxPathDepthUpDown.Name = "MaxPathDepthUpDown"; + this.MaxPathDepthUpDown.Size = new System.Drawing.Size(48, 20); + this.MaxPathDepthUpDown.TabIndex = 73; + this.MaxPathDepthUpDown.ValueChanged += new System.EventHandler(this.MaxPathDepthUpDown_ValueChanged); + // + // EndTimeUpDown + // + this.EndTimeUpDown.Location = new System.Drawing.Point(84, 333); + this.EndTimeUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.EndTimeUpDown.Name = "EndTimeUpDown"; + this.EndTimeUpDown.Size = new System.Drawing.Size(102, 20); + this.EndTimeUpDown.TabIndex = 57; + this.EndTimeUpDown.ValueChanged += new System.EventHandler(this.EndTimeUpDown_ValueChanged); + // + // StartTimeUpDown + // + this.StartTimeUpDown.Location = new System.Drawing.Point(84, 307); + this.StartTimeUpDown.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.StartTimeUpDown.Name = "StartTimeUpDown"; + this.StartTimeUpDown.Size = new System.Drawing.Size(102, 20); + this.StartTimeUpDown.TabIndex = 54; + this.StartTimeUpDown.ValueChanged += new System.EventHandler(this.StartTimeUpDown_ValueChanged); + // + // DeleteButton + // + this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.DeleteButton.Location = new System.Drawing.Point(343, 3); + this.DeleteButton.Name = "DeleteButton"; + this.DeleteButton.Size = new System.Drawing.Size(93, 23); + this.DeleteButton.TabIndex = 85; + this.DeleteButton.Text = "Delete emitter"; + this.DeleteButton.UseVisualStyleBackColor = true; + this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); + // + // AddToProjectButton + // + this.AddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.AddToProjectButton.Location = new System.Drawing.Point(452, 3); + this.AddToProjectButton.Name = "AddToProjectButton"; + this.AddToProjectButton.Size = new System.Drawing.Size(93, 23); + this.AddToProjectButton.TabIndex = 84; + this.AddToProjectButton.Text = "Add to project"; + this.AddToProjectButton.UseVisualStyleBackColor = true; + this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click); + // + // label21 + // + this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(339, 33); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(35, 13); + this.label21.TabIndex = 58; + this.label21.Text = "Flags:"; + // + // FlagsTextBox + // + this.FlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.FlagsTextBox.Location = new System.Drawing.Point(389, 30); + this.FlagsTextBox.Name = "FlagsTextBox"; + this.FlagsTextBox.Size = new System.Drawing.Size(155, 20); + this.FlagsTextBox.TabIndex = 59; + this.FlagsTextBox.TextChanged += new System.EventHandler(this.FlagsTextBox_TextChanged); + // + // label18 + // + this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(348, 205); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(87, 13); + this.label18.TabIndex = 72; + this.label18.Text = "Max Path Depth:"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(7, 9); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(64, 13); + this.label12.TabIndex = 29; + this.label12.Text = "Name hash:"; + // + // NameTextBox + // + this.NameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.NameTextBox.Location = new System.Drawing.Point(84, 6); + this.NameTextBox.Name = "NameTextBox"; + this.NameTextBox.Size = new System.Drawing.Size(237, 20); + this.NameTextBox.TabIndex = 30; + this.NameTextBox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(7, 310); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(58, 13); + this.label7.TabIndex = 53; + this.label7.Text = "Start Time:"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(7, 81); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(67, 13); + this.label10.TabIndex = 35; + this.label10.Text = "Outer radius:"; + // + // OuterRadiusTextBox + // + this.OuterRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.OuterRadiusTextBox.Location = new System.Drawing.Point(84, 78); + this.OuterRadiusTextBox.Name = "OuterRadiusTextBox"; + this.OuterRadiusTextBox.Size = new System.Drawing.Size(237, 20); + this.OuterRadiusTextBox.TabIndex = 36; + this.OuterRadiusTextBox.TextChanged += new System.EventHandler(this.OuterRadiusTextBox_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 154); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(67, 13); + this.label4.TabIndex = 41; + this.label4.Text = "Radio score:"; + // + // RadioScoreTextBox + // + this.RadioScoreTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.RadioScoreTextBox.Location = new System.Drawing.Point(84, 151); + this.RadioScoreTextBox.Name = "RadioScoreTextBox"; + this.RadioScoreTextBox.Size = new System.Drawing.Size(237, 20); + this.RadioScoreTextBox.TabIndex = 42; + this.RadioScoreTextBox.TextChanged += new System.EventHandler(this.RadioScoreTextBox_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 130); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(72, 13); + this.label3.TabIndex = 39; + this.label3.Text = "Radio station:"; + // + // RadioStationTextBox + // + this.RadioStationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.RadioStationTextBox.Location = new System.Drawing.Point(84, 127); + this.RadioStationTextBox.Name = "RadioStationTextBox"; + this.RadioStationTextBox.Size = new System.Drawing.Size(237, 20); + this.RadioStationTextBox.TabIndex = 40; + this.RadioStationTextBox.TextChanged += new System.EventHandler(this.RadioStationTextBox_TextChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 106); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(67, 13); + this.label2.TabIndex = 37; + this.label2.Text = "Child Sound:"; + // + // ChildSoundTextBox + // + this.ChildSoundTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ChildSoundTextBox.Location = new System.Drawing.Point(84, 103); + this.ChildSoundTextBox.Name = "ChildSoundTextBox"; + this.ChildSoundTextBox.Size = new System.Drawing.Size(237, 20); + this.ChildSoundTextBox.TabIndex = 38; + this.ChildSoundTextBox.TextChanged += new System.EventHandler(this.ChildSoundTextBox_TextChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 57); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(65, 13); + this.label1.TabIndex = 33; + this.label1.Text = "Inner radius:"; + // + // InnerRadiusTextBox + // + this.InnerRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.InnerRadiusTextBox.Location = new System.Drawing.Point(84, 54); + this.InnerRadiusTextBox.Name = "InnerRadiusTextBox"; + this.InnerRadiusTextBox.Size = new System.Drawing.Size(237, 20); + this.InnerRadiusTextBox.TabIndex = 34; + this.InnerRadiusTextBox.TextChanged += new System.EventHandler(this.InnerRadiusTextBox_TextChanged); + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(7, 33); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(47, 13); + this.label16.TabIndex = 31; + this.label16.Text = "Position:"; + // + // PositionTextBox + // + this.PositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PositionTextBox.Location = new System.Drawing.Point(84, 30); + this.PositionTextBox.Name = "PositionTextBox"; + this.PositionTextBox.Size = new System.Drawing.Size(237, 20); + this.PositionTextBox.TabIndex = 32; + this.PositionTextBox.TextChanged += new System.EventHandler(this.PositionTextBox_TextChanged); + // + // EditAudioStaticEmitterPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(562, 450); + this.Controls.Add(this.GoToButton); + this.Controls.Add(this.tabControl1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "EditAudioStaticEmitterPanel"; + this.Text = "Edit Audio Static Emitter"; + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LargeReverbUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MediumReverbUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmallReverbUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxLeakageDistUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinLeakageDistUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RolloffFactorUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.HPFCutoffUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.LPFCutoffUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxPathDepthUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.EndTimeUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.StartTimeUpDown)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button GoToButton; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.NumericUpDown MaxPathDepthUpDown; + private System.Windows.Forms.NumericUpDown EndTimeUpDown; + private System.Windows.Forms.NumericUpDown StartTimeUpDown; + private System.Windows.Forms.Button DeleteButton; + private System.Windows.Forms.Button AddToProjectButton; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox NameTextBox; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox OuterRadiusTextBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox RadioScoreTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox RadioStationTextBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox ChildSoundTextBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox InnerRadiusTextBox; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.TextBox PositionTextBox; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.TextBox FlagsTextBox; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox VolumeTextBox; + private System.Windows.Forms.NumericUpDown RolloffFactorUpDown; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.NumericUpDown HPFCutoffUpDown; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.NumericUpDown LPFCutoffUpDown; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox RoomTextBox; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.TextBox InteriorTextBox; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.TextBox OnBreakTextBox; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.TextBox AlarmTextBox; + private System.Windows.Forms.NumericUpDown MaxLeakageDistUpDown; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.NumericUpDown MinLeakageDistUpDown; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.TextBox MaxLeakageTextBox; + private System.Windows.Forms.NumericUpDown LargeReverbUpDown; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.NumericUpDown MediumReverbUpDown; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.NumericUpDown SmallReverbUpDown; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.TextBox UndamagedHealthTextBox; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.TextBox BrokenHealthTextBox; + } +} \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.cs b/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.cs new file mode 100644 index 0000000..3f3477a --- /dev/null +++ b/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.cs @@ -0,0 +1,613 @@ +using CodeWalker.GameFiles; +using CodeWalker.World; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CodeWalker.Project.Panels +{ + public partial class EditAudioStaticEmitterPanel : ProjectPanel + { + public ProjectForm ProjectForm; + public AudioPlacement CurrentEmitter { get; set; } + + private bool populatingui = false; + + + public EditAudioStaticEmitterPanel(ProjectForm owner) + { + ProjectForm = owner; + InitializeComponent(); + } + + public void SetEmitter(AudioPlacement emitter) + { + CurrentEmitter = emitter; + Tag = emitter; + UpdateFormTitle(); + UpdateUI(); + } + + private void UpdateFormTitle() + { + Text = CurrentEmitter?.NameHash.ToString() ?? ""; + } + + + private void UpdateUI() + { + if (CurrentEmitter?.StaticEmitter == null) + { + AddToProjectButton.Enabled = false; + DeleteButton.Enabled = false; + + populatingui = true; + NameTextBox.Text = string.Empty; + FlagsTextBox.Text = string.Empty; + PositionTextBox.Text = string.Empty; + InnerRadiusTextBox.Text = string.Empty; + OuterRadiusTextBox.Text = string.Empty; + ChildSoundTextBox.Text = string.Empty; + RadioStationTextBox.Text = string.Empty; + RadioScoreTextBox.Text = string.Empty; + InteriorTextBox.Text = string.Empty; + RoomTextBox.Text = string.Empty; + AlarmTextBox.Text = string.Empty; + OnBreakTextBox.Text = string.Empty; + VolumeTextBox.Text = string.Empty; + StartTimeUpDown.Value = 0; + EndTimeUpDown.Value = 0; + LPFCutoffUpDown.Value = 0; + HPFCutoffUpDown.Value = 0; + RolloffFactorUpDown.Value = 0; + MaxLeakageTextBox.Text = string.Empty; + MinLeakageDistUpDown.Value = 0; + MaxLeakageDistUpDown.Value = 0; + MaxPathDepthUpDown.Value = 0; + SmallReverbUpDown.Value = 0; + MediumReverbUpDown.Value = 0; + LargeReverbUpDown.Value = 0; + BrokenHealthTextBox.Text = string.Empty; + UndamagedHealthTextBox.Text = string.Empty; + populatingui = false; + } + else + { + AddToProjectButton.Enabled = CurrentEmitter?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentEmitter.RelFile) : false; + DeleteButton.Enabled = !AddToProjectButton.Enabled; + + populatingui = true; + var e = CurrentEmitter.StaticEmitter; + NameTextBox.Text = e.NameHash.ToString(); + FlagsTextBox.Text = e.Flags.Hex; + PositionTextBox.Text = FloatUtil.GetVector3String(e.Position); + InnerRadiusTextBox.Text = FloatUtil.ToString(e.MinDistance); + OuterRadiusTextBox.Text = FloatUtil.ToString(e.MaxDistance); + ChildSoundTextBox.Text = e.ChildSound.ToString(); + RadioStationTextBox.Text = e.RadioStation.ToString(); + RadioScoreTextBox.Text = e.RadioStationForScore.ToString(); + InteriorTextBox.Text = e.Interior.ToString(); + RoomTextBox.Text = e.Room.ToString(); + AlarmTextBox.Text = e.Alarm.ToString(); + OnBreakTextBox.Text = e.OnBreakOneShot.ToString(); + VolumeTextBox.Text = e.EmittedVolume.ToString(); + StartTimeUpDown.Value = e.MinTimeMinutes; + EndTimeUpDown.Value = e.MaxTimeMinutes; + LPFCutoffUpDown.Value = e.LPFCutoff; + HPFCutoffUpDown.Value = e.HPFCutoff; + RolloffFactorUpDown.Value = e.RolloffFactor; + MaxLeakageTextBox.Text = FloatUtil.ToString(e.MaxLeakage); + MinLeakageDistUpDown.Value = e.MinLeakageDistance; + MaxLeakageDistUpDown.Value = e.MaxLeakageDistance; + MaxPathDepthUpDown.Value = e.MaxPathDepth; + SmallReverbUpDown.Value = e.SmallReverbSend; + MediumReverbUpDown.Value = e.MediumReverbSend; + LargeReverbUpDown.Value = e.LargeReverbSend; + BrokenHealthTextBox.Text = FloatUtil.ToString(e.BrokenHealth); + UndamagedHealthTextBox.Text = FloatUtil.ToString(e.UndamagedHealth); + + populatingui = false; + + if (ProjectForm.WorldForm != null) + { + ProjectForm.WorldForm.SelectObject(CurrentEmitter); + } + + } + } + + private void ProjectItemChanged() + { + CurrentEmitter?.UpdateFromStaticEmitter();//also update the placement wrapper + + if (CurrentEmitter?.RelFile != null) + { + ProjectForm.SetAudioFileHasChanged(true); + } + } + + + + private void NameTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = NameTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //NameHashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.NameHash != hash) + { + CurrentEmitter.StaticEmitter.Name = NameTextBox.Text; + CurrentEmitter.StaticEmitter.NameHash = hash; + + ProjectItemChanged(); + UpdateFormTitle(); + } + } + + private void PositionTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var vec = FloatUtil.ParseVector3String(PositionTextBox.Text); + if (CurrentEmitter.StaticEmitter.Position != vec) + { + CurrentEmitter.StaticEmitter.Position = vec; + + ProjectItemChanged(); + + //var wf = ProjectForm.WorldForm; + //if (wf != null) + //{ + // wf.BeginInvoke(new Action(() => + // { + // wf.SetWidgetPosition(CurrentEmitter.Position, true); + // })); + //} + } + } + + private void InnerRadiusTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + float rad = FloatUtil.Parse(InnerRadiusTextBox.Text); + if (CurrentEmitter.StaticEmitter.MinDistance != rad) + { + CurrentEmitter.StaticEmitter.MinDistance = rad; + + ProjectItemChanged(); + } + } + + private void OuterRadiusTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + float rad = FloatUtil.Parse(OuterRadiusTextBox.Text); + if (CurrentEmitter.StaticEmitter.MaxDistance != rad) + { + CurrentEmitter.StaticEmitter.MaxDistance = rad; + + ProjectItemChanged(); + } + } + + private void ChildSoundTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = ChildSoundTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.ChildSound != hash) + { + CurrentEmitter.StaticEmitter.ChildSound = hash; + + ProjectItemChanged(); + } + } + + private void RadioStationTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = RadioStationTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.RadioStation != hash) + { + CurrentEmitter.StaticEmitter.RadioStation = hash; + + ProjectItemChanged(); + } + } + + private void RadioScoreTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = RadioScoreTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.RadioStationForScore != hash) + { + CurrentEmitter.StaticEmitter.RadioStationForScore = hash; + + ProjectItemChanged(); + } + } + + private void InteriorTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = InteriorTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.Interior != hash) + { + CurrentEmitter.StaticEmitter.Interior = hash; + + ProjectItemChanged(); + } + } + + private void RoomTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = RoomTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.Room != hash) + { + CurrentEmitter.StaticEmitter.Room = hash; + + ProjectItemChanged(); + } + } + + private void AlarmTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = AlarmTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.Alarm != hash) + { + CurrentEmitter.StaticEmitter.Alarm = hash; + + ProjectItemChanged(); + } + } + + private void OnBreakTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint hash = 0; + string name = OnBreakTextBox.Text; + if (!uint.TryParse(name, out hash))//don't re-hash hashes + { + hash = JenkHash.GenHash(name); + JenkIndex.Ensure(name); + } + //HashLabel.Text = "Hash: " + hash.ToString(); + + if (CurrentEmitter.StaticEmitter.OnBreakOneShot != hash) + { + CurrentEmitter.StaticEmitter.OnBreakOneShot = hash; + + ProjectItemChanged(); + } + } + + private void VolumeTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + int.TryParse(VolumeTextBox.Text, out var val); + if (CurrentEmitter.StaticEmitter.EmittedVolume != val) + { + CurrentEmitter.StaticEmitter.EmittedVolume = val; + + ProjectItemChanged(); + } + } + + private void StartTimeUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)StartTimeUpDown.Value; + if (CurrentEmitter.StaticEmitter.MinTimeMinutes != val) + { + CurrentEmitter.StaticEmitter.MinTimeMinutes = val; + + ProjectItemChanged(); + } + } + + private void EndTimeUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)EndTimeUpDown.Value; + if (CurrentEmitter.StaticEmitter.MaxTimeMinutes != val) + { + CurrentEmitter.StaticEmitter.MaxTimeMinutes = val; + + ProjectItemChanged(); + } + } + + private void FlagsTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + uint flags = 0; + if (uint.TryParse(FlagsTextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) + { + if (CurrentEmitter.StaticEmitter.Flags != flags) + { + CurrentEmitter.StaticEmitter.Flags = flags; + + ProjectItemChanged(); + } + } + } + + private void LPFCutoffUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)LPFCutoffUpDown.Value; + if (CurrentEmitter.StaticEmitter.LPFCutoff != val) + { + CurrentEmitter.StaticEmitter.LPFCutoff = val; + + ProjectItemChanged(); + } + } + + private void HPFCutoffUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)HPFCutoffUpDown.Value; + if (CurrentEmitter.StaticEmitter.HPFCutoff != val) + { + CurrentEmitter.StaticEmitter.HPFCutoff = val; + + ProjectItemChanged(); + } + } + + private void RolloffFactorUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)RolloffFactorUpDown.Value; + if (CurrentEmitter.StaticEmitter.RolloffFactor != val) + { + CurrentEmitter.StaticEmitter.RolloffFactor = val; + + ProjectItemChanged(); + } + } + + private void MaxLeakageTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = FloatUtil.Parse(MaxLeakageTextBox.Text); + if (CurrentEmitter.StaticEmitter.MaxLeakage != val) + { + CurrentEmitter.StaticEmitter.MaxLeakage = val; + + ProjectItemChanged(); + } + } + + private void MinLeakageDistUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)MinLeakageDistUpDown.Value; + if (CurrentEmitter.StaticEmitter.MinLeakageDistance != val) + { + CurrentEmitter.StaticEmitter.MinLeakageDistance = val; + + ProjectItemChanged(); + } + } + + private void MaxLeakageDistUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (ushort)MaxLeakageDistUpDown.Value; + if (CurrentEmitter.StaticEmitter.MaxLeakageDistance != val) + { + CurrentEmitter.StaticEmitter.MaxLeakageDistance = val; + + ProjectItemChanged(); + } + } + + private void MaxPathDepthUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (byte)MaxPathDepthUpDown.Value; + if (CurrentEmitter.StaticEmitter.MaxPathDepth != val) + { + CurrentEmitter.StaticEmitter.MaxPathDepth = val; + + ProjectItemChanged(); + } + } + + private void SmallReverbUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (byte)SmallReverbUpDown.Value; + if (CurrentEmitter.StaticEmitter.SmallReverbSend != val) + { + CurrentEmitter.StaticEmitter.SmallReverbSend = val; + + ProjectItemChanged(); + } + } + + private void MediumReverbUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (byte)MediumReverbUpDown.Value; + if (CurrentEmitter.StaticEmitter.MediumReverbSend != val) + { + CurrentEmitter.StaticEmitter.MediumReverbSend = val; + + ProjectItemChanged(); + } + } + + private void LargeReverbUpDown_ValueChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = (byte)LargeReverbUpDown.Value; + if (CurrentEmitter.StaticEmitter.LargeReverbSend != val) + { + CurrentEmitter.StaticEmitter.LargeReverbSend = val; + + ProjectItemChanged(); + } + } + + private void BrokenHealthTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = FloatUtil.Parse(BrokenHealthTextBox.Text); + if (CurrentEmitter.StaticEmitter.BrokenHealth != val) + { + CurrentEmitter.StaticEmitter.BrokenHealth = val; + + ProjectItemChanged(); + } + } + + private void UndamagedHealthTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentEmitter?.StaticEmitter == null) return; + + var val = FloatUtil.Parse(UndamagedHealthTextBox.Text); + if (CurrentEmitter.StaticEmitter.UndamagedHealth != val) + { + CurrentEmitter.StaticEmitter.UndamagedHealth = val; + + ProjectItemChanged(); + } + } + + private void GoToButton_Click(object sender, EventArgs e) + { + if (CurrentEmitter == null) return; + if (ProjectForm.WorldForm == null) return; + ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, SharpDX.Vector3.One * CurrentEmitter.InnerRadius * 2.0f); + } + + private void AddToProjectButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentEmitter); + ProjectForm.AddAudioFileToProject(CurrentEmitter.RelFile); + } + + private void DeleteButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentEmitter); + ProjectForm.DeleteAudioStaticEmitter(); + } + } +} diff --git a/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.resx b/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.resx new file mode 100644 index 0000000..0960cbe --- /dev/null +++ b/CodeWalker/Project/Panels/EditAudioStaticEmitterPanel.resx @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA + AABAAAAAAQAYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////v8/u3v+Pn6//7+//////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //7+/vX3/rzA3OHl9fz9//////////////////////////////////////////////////////////// + //////////////////////////////////////////////////7//+zv+3Z6qcLI5Pr7//////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////7+/+br+15in6+33vf5//////////////////7+//7+//////////////////// + //////////////////////////////3+//v8//v8//3+//////////////////////7+/+Ho+1dana20 + 4/b4//////////z9//P2/+Tp/ezw/vz9//////////////////////////////////////////7///X4 + /9Pa+tPa+/H1//z9//////////////////7+/93k+SsscaSr3PX3//////7+//L1/7W98AcWgrvC8Pj6 + //////////////////////////////////////////7+/+bs/xohiAEJdrvF9+7y//z9//////////// + //7+/9rh+CEkapmh0/T3//////j6/9HZ/AEHcgEEb9LZ+/r7//////////////////////////////// + //////////7//+/z/3F+zAAAXwQLcZai3fb4//////////////3+/97l/E9Tmaau4fT3/////+/0/1dd + sAAAV7a/8/H1//7+//////////////////////////////////////////////r8/+jv/46Y3QUUf6Ot + 5PX4//////////////3+/9zj+3Z6wLe/7fX4//////D0/212xnaAzerw//z9//////////////////// + //////////////////////////////////v8/+/z/+Dm+/D0//z9//////////7+//j6/9Pd+UhLjb/H + 9/D0//3+//n7/+nt/+jt//n7//////////////////////////////////////////////////////// + //7///7+//7+//7+//////////r8/+7z/83W+ImU2A0UdFNarr/K9env//X4//z9//3+//7///////// + //////////////////////////////////////////////////////////////////7///j6/+Pq/255 + xhckjE5XsVVftUlTqwAKeTA9nr3H8+7z//v8//////////////////////////////////////////// + //////////////////////////////7+//b4/9Tc+Sc0mRonj8rV/crX/ZSb48rX/brG8wwWgQAEdJei + 4efu//n7//7+//z9//z9//z9//z9//3+//////////////////////////////3+//f5/+3y/+nv/+ft + /8vV+io2mImU2M7c/7vG9yIvlQAOfCg4mM3Y/s/c/4aR1AQRfGtzwtni/ebt/9vi/tri/tXd+9Tc+O3x + /vz9//////////////////////////n6/87V+FVftkRPrFlnvSEqjQoUfmJvwWFvvg0TfQQIcxEchwAD + cy89n19rvVVitQwZgwAAaiMrkT9NqTVBoiw3mhQihig1mNLX+fv8//////////////////////////b5 + /52l4EFLqoCK03yF0VBctGhyw52o5GVrvQAAaneBzsHM+jA3mhYgiTtIpJOf3ouW2AAAbmh0wbbA8bS+ + 7qiz5pCb16+56e/z//3+//////////////////////////v8//H1/+vw/+zx/+nv/7/J9YqP3MbP/8LM + +hwqkFZftaCp5EhRrcTQ+9jj/8rW/UJMqn6J0ebt//X3//f5//b4//X3//f5//z9//////////////// + //////////7+//z9//3+//////////3+/+7z/6at64iP3aWs7XN8zRIfhyUykp2o5MHM+oKM0xonjY6X + 2+jv//v8//////7+//n7//b5//r7//7///////////////////7+//f5/+rw/9Pa9fL0/v7///////// + //v8//H1/+Tr/7i/91liu0NPq0VQrS06m0NNqDdCoYqU1+nv//v8//////////n7/9zi/qSt59ri/fL1 + //v8//7///////z9//D0/8rT+h0sjkVQrPD0//////////////////////z9/+7z/8LL9Jqk4aGq6LW/ + 8c3W9+Xs/vH1//v8//////////////f5/6at5gAAbxIfh6u16+Po/fr7//////b5/6ev5gAIeAAPernC + 8fX4//////////3+//v8//z9//////3+//j6//P3//P2//b4//r8//7+//7+//v8//r8//3+//////v8 + /+Xr/nuIzwAAbBseg5Sb2fb5//////f5/8DF8pWe3d/n/vT3//39//////v8/+zx/87V9+3x/v3+//// + //3+//j6//X4//v8//////////n7/+Dm/snR9fD0//39//z8/fv8/+3y/8LK9aGq4dfd9/n7//////z9 + //b5//X4//v8//////////7+/+7z/4aP1gEPet7k/f39//////f5/83U+ZCZ2u3x/v7+//////P3/215 + wgAJd7fB8/L1//7+//////3+//j6//f5//r8//7+//////////////////////////////j6/87W/AAA + X2duue3y//7+//////D0/05asBQfidzj/P39//////X4/6Su6AAAXBccgtff/vv8//////////////// + //////////////////////////////////////P3/3F8xhYli9Xe/fn6/////////+3y/1pltQAJd9be + /fv8//////z9/+rw/36I0Bknjs/W+vv8//////////////////////////////////////////////// + //////f5/8HI7tnf+/X4//7+/////////+/0/3R7xgAAb9ng/Pz9//////////n7/+Ln/dLY+fP2//3+ + //////////////////////////////////////////////////////3+//r7//v8//7+//////////// + //b4/7/F84eP0e/0//7+//////////7+//z9//v8//3+//////////////////////////////////// + //////////////////////////////////////////////////z9//b5//X4//v8//////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////w////4 + P///+D////g8//D4MH/geCB/4Dggf+A4IH/wOCD/+DAB//hgAf//gAP//wAAB/AAAAPwAAAD8AAAA/AA + AAfjAAEHgYADAQPgBwEDEAEBAghgAQwIIEH8CCB//Bggf/wYMH/8ODD///h/////////////KAAAABAA + AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v// + /////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO + 6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f// + /wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA + AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc + skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU + 0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq + +ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz + /eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR + p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1eHm + +P////v8//T3/wAAAAAAAAAAAAAAAP//AAD8PwAA/D8AAPwDAACAAwAAgAMAAIAHAADABwAAwAEAAMAB + AAAAAQAAAAEAAAABAAAAAQAAwAcAAOAPAAAoAAAAQAAAAIAAAAABABgAAAAAAAAwAAAAAAAAAAAAAAAA + AAAAAAAA//////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////v7//f7//P3//P3//P3/ + /f7//v7///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////v7//P3/ + +fv/+fv/+Pr/+fv/+vv//P3//v////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////f7/+fr/8/b/7PL/5+3/6e/+9Pf/+vv//v7///////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////P3/9/r/6O7/cXe1UVaet7z17fL/+Pr//f3///////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////+/z/9Pj/4Oj/NzyCUlOd2dz/6O//9Pf//P3///// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////+vv/8vb/2+P9X2OmREGLnqPd + 4+v/8vb/+/z///////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////+vv/8fb/ + 1N35bXK1JSRtbHGz5O7/8fX/+/z///////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////+vv/8PX/3Ob/U1eaDwtXjZLT4+z/8fX/+/z///////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////+vv/8fb/2eP+MjR6AAA+c3i34Or/8fX/+/z///////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////+vv/8vb/1d/7MS91AAA1UFSS4On/8vb/+/z///// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////+vv/8fb/2OL+NjZ7AAArX2Ok + 4uz/8fX/+/z///////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////+vv/8fb/ + 2eP/LjJ1DAxKfYTE4Or/8fX/+/z//////////////////////////////v7//v7//f7//f7//v7//v// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////+vv/8PX/3OX/gILIR0eVeoHC3eb/8fX/+/z//////////////////////v7//P3/+fv/+Pr/ + +Pr/+Pr/+vv//P3//v7///////////////////////////////////////////////////////////// + /////////////////////////////v7//f7//P3/+vv/+vv/+/z//f3//v7///////////////////// + ////////////////////////+vv/8PX/2eP9ZWeqHx1obnOz4Or/8fX/+/z//////////////////v7/ + +/z/9fj/8vb/8PX/7vT/8fb/9fj/+fr//f7///////////////////////////////////////////// + /////////////////////////////////////////v///P3/+Pr/9fj/9fj/9Pj/9Pf/9vn/+/z//v7/ + ////////////////////////////////////////+vv/8fb/2eP9ODp9AAA5jZDQ5O7/8PX/+/z///// + /////////v7/+/z/9Pf/7fP/5u//wsz6j5XfuMDx7fL/9vn//P3///////////////////////////// + /////////////////////////////////////////////////////////f7/+Pr/8/b/5+3/2eH/2uP/ + 5u3/7fP/8/b/+vv//f7/////////////////////////////////////+vv/8PX/3ef/U1ebBgVKio/O + 4uz/8fX/+/z//////////v///P3/9fj/7fP/4uv/hIzZHSWPAABmU1i14ub/9/r/+/z///////////// + /////////////////////////////////////////////////////////////////////////P3/9Pf/ + 7/X/09z/TlSzNzWYj5bh5O7/6/L/8vb/+fv//f7/////////////////////////////////+vv/8fX/ + 2eP/QUWIEhBZbnSz3uj/8fb/+/z//////////f7/+Pr/7/T/6PH/iI7cAABvAABqAABncXjK6O//9fj/ + +/z///////////////////////////////////////////////////////////////////////////// + ////////+/z/8/f/2uD/Z27EAABnAABiBgl4jJTd5vD/6O//8vX/+fv//f7///////////////////// + ////////+vv/8fb/2OP/Mjd6AQE6ZGup4er/8fX/+/z/////////+vz/8fX/6/T/xM/8ExyJAABwAABu + GySRxc387fT/9ff//P3///////////////////////////////////////////////////////////// + ////////////////////////+vz/8/f/1Nr/MzqhAABhAxOBAARyBgp5jpLg5Oz/7PP/9Pf/+vz//v7/ + ////////////////////////+vv/8fb/2eP/KCtvBwZOjJHS4Or/8fX/+/z//////f7/9/n/7fP/3+j/ + UFq3AABtAAZ3BAh6mZ/n5vD/7vP/+Pr//v7///////////////////////////////////////////// + ////////////////////////////////////////+/z/9Pj/6e//sbb1KzWcAABwBhaBAAFyAgp6fITR + 1d777/T/+Pr//f7/////////////////////////+vv/8PX/3+j/WF2hBglTnaTj5O3/8PX/+/z///// + /P3/9Pf/6vL/k5riAAByAAR0AABrY2vE4ur/6vH/9ff//P3///////////////////////////////// + /////////////////////////////////////////////////////////f3/9/n/7fL/5O3/ytX/RU6w + AABpAA5+AABuAABnhord6e7/+fv//f7/////////////////////////+vv/7/T/3+j/k5jbT1KdgYjJ + 3uf+8fX/+/z/////+/z/9fn/4ef/NDqhAABnAABrJjCU0Nn/5/D/8fX/+vv//v7///////////////// + /////////////////////////////////////////////////////////////////////////v7/+/z/ + 9vn/7vP/6vP/ztb/O0CmAABpAABrQkuoxMn57PH/+Pr//f7/////////////////////////+vv/8PX/ + 2+X/en/CUFGak5nY3+j/8fX//P3//////P3/9fj/4en/i5DbNT2hIyuTpqzv4uz/7vP/9/n//f7///// + //////////////////////////////////////////////////////////////////////////////// + /////////////v7//P3/9vn/7/P/6vL/ytH/X2i9XWi7wsf/6e//8/f/+Pr//v7///////////////// + ////////+vv/8PX/3OX/WF2hW1ylvMD+3uf/8PX/+/z//////f7/9vn/7fP/4uj/j5Pgf4LV3+X/6fD/ + 9Pf//P3///////////////////////////////////////////////////////////////////////// + /////////////////////////////////v///P3/+Pr/8vX/7fP/5+//5u7/6vD/8PT/9vn//P3//v7/ + /////////////////////f7/9/n/7fP/0tz9LDJzNjh/nqTk2uT/7fL/9/n//f7//f7/+fv/8/b/7PL/ + 3eX/zM//5ev/9fj/+fv//v7///////////////////////////////////////////////////////// + /////////////////////////////////////////////////////v///f3/+vv/9/n/9vn/9fj/9vn/ + +fr//P3//v7//////////////v///f7/+vv/9vn/7/T/5vD/2Ob/VFubERNdoajk4u//5O7/7vP/9vj/ + +fr/+vv/+Pr/9fj/9Pj/9fj/9fj/+Pr//P3///////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////v///v7/ + /f7//P3//P3//f3//v7//v///////////////f7/+vz/9vn/8fX/7vT/5O3/3eb/z9n/cHjICxN5d37L + z9n/2eP/5O3/6/L/8PT/9Pf/9/n/+vv/+vv/+/z//P3//f3//v7///////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////P3/+Pr/8/b/7vT/6vL/z9r+jZjeQUeq + IiuQCBN3AAFrBRB8Nj2iUViym6XlydH/4+z/6/L/8PT/9/n/+/z//f7//v////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////f3/9/n/8fX/6/L/3uf/ + mKTkLzibAABoAAB0Fx+HDBh7FSGDAg16AABYAABlCBB/Ji2UhYza1+D/6PL/7fL/9Pf/+vv//f7///// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////v7//P3/9/n/ + 8PT/7PT/z9j/XmO+AABtAABcMDSXoajsu8X7VV+5hYzblZ/fTVSxFSKMAABkAABnAAN2Qkmpsbrz5e3/ + 6vH/8fX/+Pr//P3//v////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////P3/9/n/8PX/7PT/vcn3LTOZAABaAgR1ZWzD0Nf/5vL/1OP/l53lzs3/6fP/4+7/sLzwZ23CBxSD + AABnAABlHiaSmqHo3+j/5+//7/T/9vn//P3//v7///////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////v7/ + /v7//v7//v7//f7/+/z/9vj/7vP/7PX/tcLzEBeGAABkPEWlqLPt2eX/4e7/3On/uMX1gofVe3vPhYzY + z93+5/X/4e3/lJ3gHiOPAABtAABqChiEbHLIytD/5/D/7PL/8/f/+Pr/+fr/+Pr/+Pr/+Pr/+Pr/+Pr/ + +Pr/+fv/+vv/+/z//f7//v7///////////////////////////////////////////////////////// + /v7//f7/+/z/+fv/9/n/9vj/9fj/9Pf/8fX/7PL/4uv/l6HgDhF7AAN4iZDe0d7/3uz/4vD/w83/VVm3 + ICiSAAFyAABlAABwaHTD1N//2un/3er/w838ZW3BEyOJJzKVAQ16NDmfwsn75fD/5u7/7PL/7vP/7fP/ + 7fP/7fL/7fP/7vP/7/T/8fb/9Pj/9vn/+fr//f3//v////////////////////////////////////// + /////////////v7//P3/+Pr/9Pf/8fX/7vT/7PL/6/L/6fH/5u7/6vX/tsD0CQx4AAFwkZvi7ff/4vD/ + 4fD/z9j/OkGlAABiAABwBxWAAAt7BBN+P0uofYLUztb/4O7/6fb/6fP/qa7xQkyoBg56AABqMjugx8/+ + 5fH/4Ov/4On/3uj/3eb/3+j/3uj/1+L/0d3/1d7/3+f/7fL/9vj/+vz//v7///////////////////// + /////////////////////////////f7/+fr/8/f/6/L/2d//v8j6vcf5ucP1wMv8wM3+vMj6PkqoAABo + UF25usP7tsPyvsr6sLrwQ0utAABqAAV1OUameIDRKDWZAAd2GyeOLDecmaHntsL0pbLom6riq7LzUlu0 + AANzBhR/AAZ0NT+ja3bBY2i/XGG6UViyWl65XGG7XGC6TVWvQU6pPkalODygqK7p8vb/+vz//v7///// + /////////////////////////////////////////////P3/9/n/7/T/wcj2R0ysExeFERmGDxuIFB6K + FBqICxSEAABsAAByDBiDCRSBBRCADhaFCRODAAh4AxF/AAl4CxeDHSaPAAp6AAN0AA19AAd3CBOBEBqH + BhGBAAh5AABwAAByAAh5BhSCAxWCAABsAABvAABlAABnAABxAABjAABmAABhAABdAABYAABhCAt/q7Lr + 8/f/+vv//v7//////////////////////////////////////////////////P3/+fv/3uT/SE2vAABn + CBB/GiCMLzmfLTWcGByJFRyKGCOOMj2gHymRDxiGGyOPLDCXBRF/AAh3BhaCEyKMICqTKC2WNDqfIzCV + Awx6Eh+JHiaPAAR3AAZ5CxSDICWQX2q7Q1CqAA1+AAFxDxuHiZTbVGC4dHnQnabrTVqzY23EUV62Slau + LjaZXWm9sLjz5ez/9vn/+fv//v7//////////////////////////////////////////////////P3/ + +Pv/4+n+e4LPfoPVpqv2vsf/zNX/zdb/xtH/v8v8pK7spKfysLb3vcr4ws784ej/hI/YAAZ1AAJzVF25 + yM//3Of/5+//i5LcAABpMzyfp6vxoKznlqHhqbbtx9H/8fz/kpvfAABiAABph4zc5PD/2OP/193/3un/ + 1+D/2OH/1+D/0Nr/zNL/3+j/6/L/7/T/9vn//P3//v////////////////////////////////////// + /////////////f7/+Pr/9Pf/6vD/5u3/3+b/4uv/6PD/5+//5O3/5/P/sL3sXmS7mZzoz9f/3+z/4e// + mKLiEiKKCBF/KTWZr7T06/f/3ev/VF2zChSBipPcz9v+4u7/3ur/3ev/5/X/qrPrISmSDRJ2Xmq/3ur/ + 4uv/6vH/7fP/7fL/7/T/7vP/7fP/7fP/8PX/8fX/9Pf/+Pr/+/z//v7///////////////////////// + /////////////////////////////v7//P3/+Pr/9vn/9Pf/8vb/8vb/8/b/9Pf/7/T/6/L/tL/ubXLH + en/Ti43gqavy0t3/nafjMj6fJzaaAAV1GyeOYmW7Nz6fAABgNj6i1N//3uz/2uX/3Oj/5PH/wcj7FR2J + AAN0gong0tr/6fH/7/P/9vj/+Pr/+fv/+fv/+Pr/+Pr/+Pr/+fv/+vv//P3//f7//v////////////// + /////////////////////////////////////////////////v7//f7//P3/+/z/+/z/+/z//f3//f7/ + +fv/8fX/5Oz/jpbfc3jObnXLcXfOk5rks7b4iY3dR1KvDhuEAABoAABlEBV9U12ytcD13Or/3en/3ej/ + 1eL/q7fvGR+MKDKZbnnNxc/76PD/8fX/+fr//f7//v///////v7//f7//f3//P3//f3//f7//v////// + /////////////////////////////////////////////////////v7//f7//P3//P3//f7//v7///// + /////////////////f7/9vn/7/T/yNH5lJrleoDVmZ3pmpzpc3nPfoTWf4bYVFy3HSaLZ3PGsrb8v8r8 + y9n9q7jre4LRf4fUgIvXAwZ1AABrhYjb0NX/6PH/8PX/+Pr//f7//////////v///f3/+vv/+Pr/9/r/ + 9/n/+Pr/+/z//f7//v7//////////////////////////////////////v///f7/+/z/+fr/9vj/9/n/ + +vz/+vv/+/z//v7//////////////////v7/+vz/8/f/7PL/2uT/t8H1srP6vcH+nKTnSlOxV2C7TVaz + WGS8QUqmSlSuSFOtR1GtbXTKVl23ARB5AAh2AABnd33P3eP/4ur/7/T/9/n//P3//////////////P3/ + 9/n/8vb/7PH/6fD/7PL/7vP/8vb/9vn/+/z//f7//////////////////////////////v7/+/z/+Pr/ + 8/b/7/T/8Pb/6vH/3eP97vL++fr//P3//////////////////////f7/+vv/9fj/7/T/5+//z9f+t7v4 + uLn9Z2zFLzucFCGIMz6gGCCMAAd4AAl2Dx2EER+GXWK8c3XLKzKXd4LP4er/6/L/8PX/9/n//P3//v// + /////////v7/+fv/8/b/7PP/y9H/i4/erLbt4er/5e3/7fP/8/b/+fv//f3//v7///////////////// + /v7/+/z/9vj/8PT/6/L/3+n/x9H9aHTAZGvG3+b9+Pr/+/z//////////////////////////v7/+/z/ + +Pr/8vb/6/H/3OX+wMn4maDmdHrPWGG6T1a1eoHWcHfOTlayUlq1SlKubHjAxMj/0dn/4+v/7PL/8vb/ + +Pr//P3//v7//////////////f7/+fr/7vP/xsv5YGXAHymRKjKYYWS9rbLz4u3/6/P/8vb/+fr//f7/ + /////////////v//+/z/9vj/7fL/5e3/xs7/Y23BIiiSAABeLTab3+b/9/r/+/z///////////////// + /////////////////f7/+vz/9vj/8PX/6vH/3eb/ydL8xM/6uMPyt733w8j/zNb/1Nz/3OT/4uz/5u7/ + 7fP/8vb/9vj/+vz//f7//////////////////////f7/+fv/7vP/jpHiAAJ1CxaBER6GAABoFRmGbXbH + 0Nf/7PL/9fj//P3//////////////v7/+fv/8/f/4Of/hYvbKDGZAABuAABdAAZyi5La5+7/9vn/+/z/ + /////////////////////////////////////v7//P3/+fv/9ff/8vb/7/X/7fP/6/L/5u3/5ez/6fD/ + 7PP/7/T/8fX/9Pf/9/n/+vv//P3//v7//v///////////////////////v7/+fv/8fb/2eH9fIbQExqH + AABrAAp6AAFyAABwS0+uztX39vn/+vz//////////////f7/+Pr/8ff/qbLpAABrAABhAABwDBWAfobX + 5e3/8PX/9vn//f3//////////v///f7/+/z/+vv/+vv/+vz//P3//v7//v///v7//P3/+vz/+Pr/9/n/ + 9vj/9vj/9vj/9vj/9/n/+fr/+/z//P3//f7//v7//f7//P3/+/z/+vz/+/z//P3//v7//////v7/+/z/ + 9fj/7/T/5/H/uML1U1e1AAh5AABuAABvMjmdv8bz9vr/+vv//////////////f7/+fv/7/T/iY7aDxSA + GiONa3XHsr7w4Oj/6/H/9Pf/+vz//v7//////v///P3/+Pr/9Pf/8/f/9fj/9fj/9vn/+/z//v7///// + /////////v7//f7//P3/+/z/+/z//P3//f7//v///////////////v7/+/z/9/n/9vn/9vn/9Pj/9vn/ + +/z//v7//////f7/+vz/9fj/7/T/6vL/3ef/i5PbGRqJBQl5jJbZ6vH/9Pj/+/z//////////////f7/ + +fv/8fT/1Nn9t7/0wcr54er/7fT/8fX/9fj/+vv//f7//////////f3/+Pr/8PT/6/L/3uX/ztb/5Or/ + 8/f/+Pr//f7//////////////f7/+vz/+Pr/+fv/+fv/+vv//f3//v///////////////P3/9/n/7vL/ + 193/ztf/5u3/7vP/9Pf/+/z//v7//////v7//P3/+Pr/8fX/7PP/5/D/sLfxoKnk4+r/8vf/9/n//f3/ + /////////////v7/+/z/9vn/9Pf/8vb/8fb/8fX/9Pf/+Pr//P3//v7//////////v7/+vv/8vb/5+7/ + y9H/WWO9KSmSkZXj6vD/+Pv//P3//////////f7/+Pr/9fj/8vb/6O7/7vP/9fj/+Pr//f7///////// + /v//+vv/8vb/7PP/hYraKiqKlp7i6PD/7fP/9ff/+/z//v7//////////f7/+vv/9ff/8fX/8PX/8vb/ + 8/f/9vn/+/z//v7//////////////////f7/+/z/+vv/+fr/+fr/+vv//P3//v7///////////////// + /P3/9fj/7PL/1d7/RUysAABhAABlg4ja6/D/+Pr//P3/////////+/z/9fj/6e7/2eD/h4/bnaXg7PH/ + 9fj/+/z//////////v7/+Pr/8PX/y9X1JDGVAABaERWDoKnp6PH/7vP/9/n//P3//////////////v7/ + /P3/+vv/+fv/+fv/+vv//P3//v7//////////////////////////v7//v7//v7//v7//v////////// + /////////////v7/+fv/8PX/7PX/ipPdAABsAABlQ1Cp3Ob/7vP/9/n//f7/////////+fv/9Pj/yNH5 + Ule2DBJ8Ljie0df+8fb/+fv//v7//////v7/+Pr/7/X/hY3YAABxAAl7AABuEBaEs7nz6fH/8fX/+vv/ + /v7//////////////////v///v7//v7//v7///////////////////////////////////////////// + /////////////////////////////f3/9vn/7PL/0tn/LzidAQFsAAB0iZHb6vP/8PT/+fv//v////// + /v7/+Pr/8vf/r7rqAAV4AABdPUen1N//7PL/9vn//f7//////v7/+fr/7/T/yc75S1G0AABrARKAAABp + Qker0df/7fP/9/n//f7///////////////////////////////////////////////////////////// + /////////////////////////////////////////////P3/9/n/5+7/cXXNAAd2AABuMDebzdT97PL/ + 9vj//P3//////////v7/9/n/7/X/tL/uFCCLAABqHSqRvcf46fD/9Pf//f3/////////+vv/8vX/6vH/ + yM3+JC2XAABtAAV2Agx9q7Ly7vT/9vn//f7///////////////////////////////////////////// + /////////////////////////////////////////////////////////////P3/9/r/4uj/WWO1AAVx + KTaYu8T07fT/8vb/+vv//v7//////////v7/9/n/7vX/vsn1Iy2SAABrAQ99mp/o6PD/9Pf//P3///// + /////P3/9/n/7vP/6fL/s7z2DBB/AABeQ0uttrr56e7/+Pr//f7///////////////////////////// + /////////////////////////////////////////////////////////////////////////////P3/ + +fv/4ef6g4zNbXfFw8v27fT/8vb/+Pr//f3//////////////v7/9/n/7vT/yNL7MjucAABtBxF/nKLo + 6fH/9Pf//P3//////////v7/+/z/9fj/7fL/6/T/jZXbLzScrrP14en/7fL/+fv//v7///////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////f7/+vz/8PP91dr34+f/8vb/8/f/9/r//P3//v///////////////v7/+Pr/8PX/1N3/ + QUqmAQRxBQ98m6Dm7PL/9fj//P3//////////////v7/+/z/9ff/8PX/5ez/ytH94ej/8vb/9vj/+/z/ + /v7///////////////////////////////////////////////////////////////////////////// + /////////////////////////////v7//P3/+vz/+fv/+Pr/+Pr/+vv//f3//v////////////////// + /v//+fv/9Pf/2+L/SVGtAABsLTaZytL58fX/9/n//f7//////////////////v7/+/z/9/n/9fj/9vn/ + 9fj/9vj/+vz//f7///////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////v7//f7//f3//f3//f3//v7//v////// + ////////////////////+/z/9vn/6e//mZ7gTVarr7bp6/H/9fj/+vv//v7///////////////////// + /v7//f7/+/z/+/z/+/z//P3//v7///////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////f3/+Pr/9fj/6e7/4+n/8fb/9Pf/+Pr//f3///////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////v7//P3/+fv/+fv/+vv/+Pr/+vv/ + /P3//v7///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////v7//f7/ + /f3//P3//f7//v7//v////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////4D/////////AH////////8Af////////wB/////////AH////////8Af////////wB/////// + //AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA + H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A + A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA + ////+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A + AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf + AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4 + AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A// + ///////gD/////////Af//////////////8= + + + \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs deleted file mode 100644 index 5de9905..0000000 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs +++ /dev/null @@ -1,757 +0,0 @@ -namespace CodeWalker.Project.Panels -{ - partial class EditAudioZonePanel - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioZonePanel)); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.label22 = new System.Windows.Forms.Label(); - this.UnkBytesTextBox = new System.Windows.Forms.TextBox(); - this.DeleteButton = new System.Windows.Forms.Button(); - this.AddToProjectButton = new System.Windows.Forms.Button(); - this.label21 = new System.Windows.Forms.Label(); - this.Unk13TextBox = new System.Windows.Forms.TextBox(); - this.label20 = new System.Windows.Forms.Label(); - this.DependentAmbiencesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.label19 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.UnkVec3TextBox = new System.Windows.Forms.TextBox(); - this.label17 = new System.Windows.Forms.Label(); - this.UnkVec2TextBox = new System.Windows.Forms.TextBox(); - this.label18 = new System.Windows.Forms.Label(); - this.UnkVec1TextBox = new System.Windows.Forms.TextBox(); - this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.label14 = new System.Windows.Forms.Label(); - this.Flags1TextBox = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.Flags0TextBox = new System.Windows.Forms.TextBox(); - this.ShapeComboBox = new System.Windows.Forms.ComboBox(); - this.label23 = new System.Windows.Forms.Label(); - this.label12 = new System.Windows.Forms.Label(); - this.NameTextBox = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.OuterVec3TextBox = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.OuterVec2TextBox = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.OuterVec1TextBox = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.OuterAngleTextBox = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.OuterSizeTextBox = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.OuterPosTextBox = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.InnerVec3TextBox = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.InnerVec2TextBox = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.InnerVec1TextBox = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.InnerAngleTextBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.InnerSizeTextBox = new System.Windows.Forms.TextBox(); - this.label16 = new System.Windows.Forms.Label(); - this.InnerPosTextBox = new System.Windows.Forms.TextBox(); - this.GoToButton = new System.Windows.Forms.Button(); - this.label24 = new System.Windows.Forms.Label(); - this.Hash0TextBox = new System.Windows.Forms.TextBox(); - this.label25 = new System.Windows.Forms.Label(); - this.SceneTextBox = new System.Windows.Forms.TextBox(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.SuspendLayout(); - // - // tabControl1 - // - this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Location = new System.Drawing.Point(2, 3); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(559, 447); - this.tabControl1.TabIndex = 17; - // - // tabPage1 - // - this.tabPage1.Controls.Add(this.label25); - this.tabPage1.Controls.Add(this.SceneTextBox); - this.tabPage1.Controls.Add(this.label24); - this.tabPage1.Controls.Add(this.Hash0TextBox); - this.tabPage1.Controls.Add(this.label22); - this.tabPage1.Controls.Add(this.UnkBytesTextBox); - this.tabPage1.Controls.Add(this.DeleteButton); - this.tabPage1.Controls.Add(this.AddToProjectButton); - this.tabPage1.Controls.Add(this.label21); - this.tabPage1.Controls.Add(this.Unk13TextBox); - this.tabPage1.Controls.Add(this.label20); - this.tabPage1.Controls.Add(this.DependentAmbiencesTextBox); - this.tabPage1.Controls.Add(this.label19); - this.tabPage1.Controls.Add(this.label15); - this.tabPage1.Controls.Add(this.UnkVec3TextBox); - this.tabPage1.Controls.Add(this.label17); - this.tabPage1.Controls.Add(this.UnkVec2TextBox); - this.tabPage1.Controls.Add(this.label18); - this.tabPage1.Controls.Add(this.UnkVec1TextBox); - this.tabPage1.Controls.Add(this.HashesTextBox); - this.tabPage1.Controls.Add(this.label14); - this.tabPage1.Controls.Add(this.Flags1TextBox); - this.tabPage1.Controls.Add(this.label13); - this.tabPage1.Controls.Add(this.Flags0TextBox); - this.tabPage1.Controls.Add(this.ShapeComboBox); - this.tabPage1.Controls.Add(this.label23); - this.tabPage1.Controls.Add(this.label12); - this.tabPage1.Controls.Add(this.NameTextBox); - this.tabPage1.Controls.Add(this.label6); - this.tabPage1.Controls.Add(this.OuterVec3TextBox); - this.tabPage1.Controls.Add(this.label7); - this.tabPage1.Controls.Add(this.OuterVec2TextBox); - this.tabPage1.Controls.Add(this.label8); - this.tabPage1.Controls.Add(this.OuterVec1TextBox); - this.tabPage1.Controls.Add(this.label9); - this.tabPage1.Controls.Add(this.OuterAngleTextBox); - this.tabPage1.Controls.Add(this.label10); - this.tabPage1.Controls.Add(this.OuterSizeTextBox); - this.tabPage1.Controls.Add(this.label11); - this.tabPage1.Controls.Add(this.OuterPosTextBox); - this.tabPage1.Controls.Add(this.label5); - this.tabPage1.Controls.Add(this.InnerVec3TextBox); - this.tabPage1.Controls.Add(this.label4); - this.tabPage1.Controls.Add(this.InnerVec2TextBox); - this.tabPage1.Controls.Add(this.label3); - this.tabPage1.Controls.Add(this.InnerVec1TextBox); - this.tabPage1.Controls.Add(this.label2); - this.tabPage1.Controls.Add(this.InnerAngleTextBox); - this.tabPage1.Controls.Add(this.label1); - this.tabPage1.Controls.Add(this.InnerSizeTextBox); - this.tabPage1.Controls.Add(this.label16); - this.tabPage1.Controls.Add(this.InnerPosTextBox); - this.tabPage1.Location = new System.Drawing.Point(4, 22); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(551, 421); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Ambient Zone"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // label22 - // - this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(327, 34); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(58, 13); - this.label22.TabIndex = 64; - this.label22.Text = "Unk bytes:"; - // - // UnkBytesTextBox - // - this.UnkBytesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.UnkBytesTextBox.Location = new System.Drawing.Point(390, 31); - this.UnkBytesTextBox.Name = "UnkBytesTextBox"; - this.UnkBytesTextBox.Size = new System.Drawing.Size(155, 20); - this.UnkBytesTextBox.TabIndex = 65; - this.UnkBytesTextBox.TextChanged += new System.EventHandler(this.UnkBytesTextBox_TextChanged); - // - // DeleteButton - // - this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.DeleteButton.Location = new System.Drawing.Point(343, 3); - this.DeleteButton.Name = "DeleteButton"; - this.DeleteButton.Size = new System.Drawing.Size(93, 23); - this.DeleteButton.TabIndex = 81; - this.DeleteButton.Text = "Delete zone"; - this.DeleteButton.UseVisualStyleBackColor = true; - this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click); - // - // AddToProjectButton - // - this.AddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.AddToProjectButton.Location = new System.Drawing.Point(452, 3); - this.AddToProjectButton.Name = "AddToProjectButton"; - this.AddToProjectButton.Size = new System.Drawing.Size(93, 23); - this.AddToProjectButton.TabIndex = 80; - this.AddToProjectButton.Text = "Add to project"; - this.AddToProjectButton.UseVisualStyleBackColor = true; - this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click); - // - // label21 - // - this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(340, 106); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(44, 13); - this.label21.TabIndex = 70; - this.label21.Text = "Unk13:"; - // - // Unk13TextBox - // - this.Unk13TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Unk13TextBox.Location = new System.Drawing.Point(390, 103); - this.Unk13TextBox.Name = "Unk13TextBox"; - this.Unk13TextBox.Size = new System.Drawing.Size(155, 20); - this.Unk13TextBox.TabIndex = 71; - this.Unk13TextBox.TextChanged += new System.EventHandler(this.Unk13TextBox_TextChanged); - // - // label20 - // - this.label20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(340, 303); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(193, 13); - this.label20.TabIndex = 78; - this.label20.Text = "Ext params: Name (hash), Value (float)"; - // - // DependentAmbiencesTextBox - // - this.DependentAmbiencesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.DependentAmbiencesTextBox.Location = new System.Drawing.Point(335, 319); - this.DependentAmbiencesTextBox.Multiline = true; - this.DependentAmbiencesTextBox.Name = "DependentAmbiencesTextBox"; - this.DependentAmbiencesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.DependentAmbiencesTextBox.Size = new System.Drawing.Size(209, 92); - this.DependentAmbiencesTextBox.TabIndex = 79; - this.DependentAmbiencesTextBox.WordWrap = false; - this.DependentAmbiencesTextBox.TextChanged += new System.EventHandler(this.DependentAmbiencesTextBox_TextChanged); - // - // label19 - // - this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(340, 183); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(46, 13); - this.label19.TabIndex = 76; - this.label19.Text = "Hashes:"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(7, 394); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(60, 13); - this.label15.TabIndex = 62; - this.label15.Text = "Unk vec 3:"; - // - // UnkVec3TextBox - // - this.UnkVec3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.UnkVec3TextBox.Location = new System.Drawing.Point(84, 391); - this.UnkVec3TextBox.Name = "UnkVec3TextBox"; - this.UnkVec3TextBox.Size = new System.Drawing.Size(237, 20); - this.UnkVec3TextBox.TabIndex = 63; - this.UnkVec3TextBox.TextChanged += new System.EventHandler(this.UnkVec3TextBox_TextChanged); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(7, 370); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(60, 13); - this.label17.TabIndex = 60; - this.label17.Text = "Unk vec 2:"; - // - // UnkVec2TextBox - // - this.UnkVec2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.UnkVec2TextBox.Location = new System.Drawing.Point(84, 367); - this.UnkVec2TextBox.Name = "UnkVec2TextBox"; - this.UnkVec2TextBox.Size = new System.Drawing.Size(237, 20); - this.UnkVec2TextBox.TabIndex = 61; - this.UnkVec2TextBox.TextChanged += new System.EventHandler(this.UnkVec2TextBox_TextChanged); - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(7, 346); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(60, 13); - this.label18.TabIndex = 58; - this.label18.Text = "Unk vec 1:"; - // - // UnkVec1TextBox - // - this.UnkVec1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.UnkVec1TextBox.Location = new System.Drawing.Point(84, 343); - this.UnkVec1TextBox.Name = "UnkVec1TextBox"; - this.UnkVec1TextBox.Size = new System.Drawing.Size(237, 20); - this.UnkVec1TextBox.TabIndex = 59; - this.UnkVec1TextBox.TextChanged += new System.EventHandler(this.UnkVec1TextBox_TextChanged); - // - // HashesTextBox - // - this.HashesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.HashesTextBox.Location = new System.Drawing.Point(335, 199); - this.HashesTextBox.Multiline = true; - this.HashesTextBox.Name = "HashesTextBox"; - this.HashesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.HashesTextBox.Size = new System.Drawing.Size(209, 92); - this.HashesTextBox.TabIndex = 77; - this.HashesTextBox.WordWrap = false; - this.HashesTextBox.TextChanged += new System.EventHandler(this.HashesTextBox_TextChanged); - // - // label14 - // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(340, 82); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(44, 13); - this.label14.TabIndex = 68; - this.label14.Text = "Flags 1:"; - // - // Flags1TextBox - // - this.Flags1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags1TextBox.Location = new System.Drawing.Point(390, 79); - this.Flags1TextBox.Name = "Flags1TextBox"; - this.Flags1TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags1TextBox.TabIndex = 69; - this.Flags1TextBox.TextChanged += new System.EventHandler(this.Flags1TextBox_TextChanged); - // - // label13 - // - this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(340, 58); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(44, 13); - this.label13.TabIndex = 66; - this.label13.Text = "Flags 0:"; - // - // Flags0TextBox - // - this.Flags0TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags0TextBox.Location = new System.Drawing.Point(390, 55); - this.Flags0TextBox.Name = "Flags0TextBox"; - this.Flags0TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags0TextBox.TabIndex = 67; - this.Flags0TextBox.TextChanged += new System.EventHandler(this.Flags0TextBox_TextChanged); - // - // ShapeComboBox - // - this.ShapeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ShapeComboBox.FormattingEnabled = true; - this.ShapeComboBox.Items.AddRange(new object[] { - "Box", - "Line", - "Sphere"}); - this.ShapeComboBox.Location = new System.Drawing.Point(84, 30); - this.ShapeComboBox.Name = "ShapeComboBox"; - this.ShapeComboBox.Size = new System.Drawing.Size(151, 21); - this.ShapeComboBox.TabIndex = 33; - this.ShapeComboBox.SelectedIndexChanged += new System.EventHandler(this.ShapeComboBox_SelectedIndexChanged); - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(7, 33); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(41, 13); - this.label23.TabIndex = 32; - this.label23.Text = "Shape:"; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(7, 9); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(64, 13); - this.label12.TabIndex = 29; - this.label12.Text = "Name hash:"; - // - // NameTextBox - // - this.NameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.NameTextBox.Location = new System.Drawing.Point(84, 6); - this.NameTextBox.Name = "NameTextBox"; - this.NameTextBox.Size = new System.Drawing.Size(237, 20); - this.NameTextBox.TabIndex = 30; - this.NameTextBox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(7, 322); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(66, 13); - this.label6.TabIndex = 56; - this.label6.Text = "Outer vec 3:"; - // - // OuterVec3TextBox - // - this.OuterVec3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterVec3TextBox.Location = new System.Drawing.Point(84, 319); - this.OuterVec3TextBox.Name = "OuterVec3TextBox"; - this.OuterVec3TextBox.Size = new System.Drawing.Size(237, 20); - this.OuterVec3TextBox.TabIndex = 57; - this.OuterVec3TextBox.TextChanged += new System.EventHandler(this.OuterVec3TextBox_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(7, 298); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(66, 13); - this.label7.TabIndex = 54; - this.label7.Text = "Outer vec 2:"; - // - // OuterVec2TextBox - // - this.OuterVec2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterVec2TextBox.Location = new System.Drawing.Point(84, 295); - this.OuterVec2TextBox.Name = "OuterVec2TextBox"; - this.OuterVec2TextBox.Size = new System.Drawing.Size(237, 20); - this.OuterVec2TextBox.TabIndex = 55; - this.OuterVec2TextBox.TextChanged += new System.EventHandler(this.OuterVec2TextBox_TextChanged); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(7, 274); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(66, 13); - this.label8.TabIndex = 52; - this.label8.Text = "Outer vec 1:"; - // - // OuterVec1TextBox - // - this.OuterVec1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterVec1TextBox.Location = new System.Drawing.Point(84, 271); - this.OuterVec1TextBox.Name = "OuterVec1TextBox"; - this.OuterVec1TextBox.Size = new System.Drawing.Size(237, 20); - this.OuterVec1TextBox.TabIndex = 53; - this.OuterVec1TextBox.TextChanged += new System.EventHandler(this.OuterVec1TextBox_TextChanged); - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(7, 250); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(65, 13); - this.label9.TabIndex = 50; - this.label9.Text = "Outer angle:"; - // - // OuterAngleTextBox - // - this.OuterAngleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterAngleTextBox.Location = new System.Drawing.Point(84, 247); - this.OuterAngleTextBox.Name = "OuterAngleTextBox"; - this.OuterAngleTextBox.Size = new System.Drawing.Size(237, 20); - this.OuterAngleTextBox.TabIndex = 51; - this.OuterAngleTextBox.TextChanged += new System.EventHandler(this.OuterAngleTextBox_TextChanged); - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(7, 226); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(57, 13); - this.label10.TabIndex = 48; - this.label10.Text = "Outer size:"; - // - // OuterSizeTextBox - // - this.OuterSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterSizeTextBox.Location = new System.Drawing.Point(84, 223); - this.OuterSizeTextBox.Name = "OuterSizeTextBox"; - this.OuterSizeTextBox.Size = new System.Drawing.Size(237, 20); - this.OuterSizeTextBox.TabIndex = 49; - this.OuterSizeTextBox.TextChanged += new System.EventHandler(this.OuterSizeTextBox_TextChanged); - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(7, 202); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(75, 13); - this.label11.TabIndex = 46; - this.label11.Text = "Outer position:"; - // - // OuterPosTextBox - // - this.OuterPosTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterPosTextBox.Location = new System.Drawing.Point(84, 199); - this.OuterPosTextBox.Name = "OuterPosTextBox"; - this.OuterPosTextBox.Size = new System.Drawing.Size(237, 20); - this.OuterPosTextBox.TabIndex = 47; - this.OuterPosTextBox.TextChanged += new System.EventHandler(this.OuterPosTextBox_TextChanged); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(7, 178); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(64, 13); - this.label5.TabIndex = 44; - this.label5.Text = "Inner vec 3:"; - // - // InnerVec3TextBox - // - this.InnerVec3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerVec3TextBox.Location = new System.Drawing.Point(84, 175); - this.InnerVec3TextBox.Name = "InnerVec3TextBox"; - this.InnerVec3TextBox.Size = new System.Drawing.Size(237, 20); - this.InnerVec3TextBox.TabIndex = 45; - this.InnerVec3TextBox.TextChanged += new System.EventHandler(this.InnerVec3TextBox_TextChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(7, 154); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(64, 13); - this.label4.TabIndex = 42; - this.label4.Text = "Inner vec 2:"; - // - // InnerVec2TextBox - // - this.InnerVec2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerVec2TextBox.Location = new System.Drawing.Point(84, 151); - this.InnerVec2TextBox.Name = "InnerVec2TextBox"; - this.InnerVec2TextBox.Size = new System.Drawing.Size(237, 20); - this.InnerVec2TextBox.TabIndex = 43; - this.InnerVec2TextBox.TextChanged += new System.EventHandler(this.InnerVec2TextBox_TextChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(7, 130); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(64, 13); - this.label3.TabIndex = 40; - this.label3.Text = "Inner vec 1:"; - // - // InnerVec1TextBox - // - this.InnerVec1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerVec1TextBox.Location = new System.Drawing.Point(84, 127); - this.InnerVec1TextBox.Name = "InnerVec1TextBox"; - this.InnerVec1TextBox.Size = new System.Drawing.Size(237, 20); - this.InnerVec1TextBox.TabIndex = 41; - this.InnerVec1TextBox.TextChanged += new System.EventHandler(this.InnerVec1TextBox_TextChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(7, 106); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(63, 13); - this.label2.TabIndex = 38; - this.label2.Text = "Inner angle:"; - // - // InnerAngleTextBox - // - this.InnerAngleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerAngleTextBox.Location = new System.Drawing.Point(84, 103); - this.InnerAngleTextBox.Name = "InnerAngleTextBox"; - this.InnerAngleTextBox.Size = new System.Drawing.Size(237, 20); - this.InnerAngleTextBox.TabIndex = 39; - this.InnerAngleTextBox.TextChanged += new System.EventHandler(this.InnerAngleTextBox_TextChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(7, 82); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(55, 13); - this.label1.TabIndex = 36; - this.label1.Text = "Inner size:"; - // - // InnerSizeTextBox - // - this.InnerSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerSizeTextBox.Location = new System.Drawing.Point(84, 79); - this.InnerSizeTextBox.Name = "InnerSizeTextBox"; - this.InnerSizeTextBox.Size = new System.Drawing.Size(237, 20); - this.InnerSizeTextBox.TabIndex = 37; - this.InnerSizeTextBox.TextChanged += new System.EventHandler(this.InnerSizeTextBox_TextChanged); - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(7, 58); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(73, 13); - this.label16.TabIndex = 34; - this.label16.Text = "Inner position:"; - // - // InnerPosTextBox - // - this.InnerPosTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerPosTextBox.Location = new System.Drawing.Point(84, 55); - this.InnerPosTextBox.Name = "InnerPosTextBox"; - this.InnerPosTextBox.Size = new System.Drawing.Size(237, 20); - this.InnerPosTextBox.TabIndex = 35; - this.InnerPosTextBox.TextChanged += new System.EventHandler(this.InnerPosTextBox_TextChanged); - // - // GoToButton - // - this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.GoToButton.Location = new System.Drawing.Point(483, 0); - this.GoToButton.Name = "GoToButton"; - this.GoToButton.Size = new System.Drawing.Size(68, 23); - this.GoToButton.TabIndex = 31; - this.GoToButton.Text = "Go to"; - this.GoToButton.UseVisualStyleBackColor = true; - this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click); - // - // label24 - // - this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(340, 130); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(44, 13); - this.label24.TabIndex = 72; - this.label24.Text = "Hash 0:"; - // - // Hash0TextBox - // - this.Hash0TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Hash0TextBox.Location = new System.Drawing.Point(390, 127); - this.Hash0TextBox.Name = "Hash0TextBox"; - this.Hash0TextBox.Size = new System.Drawing.Size(155, 20); - this.Hash0TextBox.TabIndex = 73; - this.Hash0TextBox.TextChanged += new System.EventHandler(this.Hash0TextBox_TextChanged); - // - // label25 - // - this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(340, 154); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(44, 13); - this.label25.TabIndex = 74; - this.label25.Text = "Hash 1:"; - // - // SceneTextBox - // - this.SceneTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SceneTextBox.Location = new System.Drawing.Point(390, 151); - this.SceneTextBox.Name = "SceneTextBox"; - this.SceneTextBox.Size = new System.Drawing.Size(155, 20); - this.SceneTextBox.TabIndex = 75; - this.SceneTextBox.TextChanged += new System.EventHandler(this.SceneTextBox_TextChanged); - // - // EditAudioZonePanel - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(562, 450); - this.Controls.Add(this.GoToButton); - this.Controls.Add(this.tabControl1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "EditAudioZonePanel"; - this.Text = "Edit Audio Zone"; - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.tabPage1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.TextBox InnerPosTextBox; - private System.Windows.Forms.Button GoToButton; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox InnerSizeTextBox; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox InnerVec2TextBox; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox InnerVec1TextBox; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox InnerAngleTextBox; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox InnerVec3TextBox; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.TextBox NameTextBox; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox OuterVec3TextBox; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox OuterVec2TextBox; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.TextBox OuterVec1TextBox; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox OuterAngleTextBox; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox OuterSizeTextBox; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox OuterPosTextBox; - private System.Windows.Forms.ComboBox ShapeComboBox; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox Flags1TextBox; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox Flags0TextBox; - private WinForms.TextBoxFix HashesTextBox; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.TextBox UnkVec3TextBox; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.TextBox UnkVec2TextBox; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.TextBox UnkVec1TextBox; - private System.Windows.Forms.Label label20; - private WinForms.TextBoxFix DependentAmbiencesTextBox; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.Label label21; - private System.Windows.Forms.TextBox Unk13TextBox; - private System.Windows.Forms.Button AddToProjectButton; - private System.Windows.Forms.Button DeleteButton; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.TextBox UnkBytesTextBox; - private System.Windows.Forms.Label label25; - private System.Windows.Forms.TextBox SceneTextBox; - private System.Windows.Forms.Label label24; - private System.Windows.Forms.TextBox Hash0TextBox; - } -} \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.cs b/CodeWalker/Project/Panels/EditAudioZonePanel.cs deleted file mode 100644 index ac11e26..0000000 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.cs +++ /dev/null @@ -1,624 +0,0 @@ -using CodeWalker.GameFiles; -using CodeWalker.World; -using SharpDX; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace CodeWalker.Project.Panels -{ - public partial class EditAudioZonePanel : ProjectPanel - { - public ProjectForm ProjectForm; - public AudioPlacement CurrentZone { get; set; } - - private bool populatingui = false; - - - public EditAudioZonePanel(ProjectForm owner) - { - ProjectForm = owner; - InitializeComponent(); - } - - public void SetZone(AudioPlacement zone) - { - CurrentZone = zone; - Tag = zone; - UpdateFormTitle(); - UpdateUI(); - } - - private void UpdateFormTitle() - { - Text = CurrentZone?.NameHash.ToString() ?? ""; - } - - - private void UpdateUI() - { - - if (CurrentZone?.AudioZone == null) - { - AddToProjectButton.Enabled = false; - DeleteButton.Enabled = false; - - populatingui = true; - NameTextBox.Text = string.Empty; - ShapeComboBox.Text = string.Empty; - InnerPosTextBox.Text = string.Empty; - InnerSizeTextBox.Text = string.Empty; - InnerAngleTextBox.Text = string.Empty; - InnerVec1TextBox.Text = string.Empty; - InnerVec2TextBox.Text = string.Empty; - InnerVec3TextBox.Text = string.Empty; - OuterPosTextBox.Text = string.Empty; - OuterSizeTextBox.Text = string.Empty; - OuterAngleTextBox.Text = string.Empty; - OuterVec1TextBox.Text = string.Empty; - OuterVec2TextBox.Text = string.Empty; - OuterVec3TextBox.Text = string.Empty; - UnkVec1TextBox.Text = string.Empty; - UnkVec2TextBox.Text = string.Empty; - UnkVec3TextBox.Text = string.Empty; - UnkBytesTextBox.Text = string.Empty; - Flags0TextBox.Text = string.Empty; - Flags1TextBox.Text = string.Empty; - Unk13TextBox.Text = string.Empty; - Hash0TextBox.Text = string.Empty; - SceneTextBox.Text = string.Empty; - HashesTextBox.Text = string.Empty; - DependentAmbiencesTextBox.Text = string.Empty; - populatingui = false; - } - else - { - AddToProjectButton.Enabled = CurrentZone?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentZone.RelFile) : false; - DeleteButton.Enabled = !AddToProjectButton.Enabled; - - populatingui = true; - var z = CurrentZone.AudioZone; - NameTextBox.Text = z.NameHash.ToString(); - ShapeComboBox.Text = z.Shape.ToString(); - InnerPosTextBox.Text = FloatUtil.GetVector3String(z.PlaybackZonePosition); - InnerSizeTextBox.Text = FloatUtil.GetVector3String(z.PlaybackZoneSize); - InnerAngleTextBox.Text = z.PlaybackZoneAngle.ToString(); - InnerVec1TextBox.Text = FloatUtil.GetVector4String(z.PlaybackZoneVec1); - InnerVec2TextBox.Text = FloatUtil.GetVector4String(z.PlaybackZoneVec2); - InnerVec3TextBox.Text = FloatUtil.GetVector3String(z.PlaybackZoneVec3); - OuterPosTextBox.Text = FloatUtil.GetVector3String(z.ActivationZonePosition); - OuterSizeTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSize); - OuterAngleTextBox.Text = z.ActivationZoneAngle.ToString(); - OuterVec1TextBox.Text = FloatUtil.GetVector4String(z.ActivationZoneVec1); - OuterVec2TextBox.Text = FloatUtil.GetVector4String(z.ActivationZoneVec2); - OuterVec3TextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneVec3); - UnkVec1TextBox.Text = FloatUtil.GetVector4String(z.UnkVec1); - UnkVec2TextBox.Text = FloatUtil.GetVector4String(z.UnkVec2); - UnkVec3TextBox.Text = FloatUtil.GetVector2String(z.UnkVec3); - UnkBytesTextBox.Text = string.Format("{0}, {1}, {2}", z.Unk14, z.Unk15, z.Unk16); - Flags0TextBox.Text = z.Flags0.Hex; - Flags1TextBox.Text = z.Flags1.Hex; - Unk13TextBox.Text = z.Unk13.Hex; - Hash0TextBox.Text = z.UnkHash0.ToString(); - SceneTextBox.Text = z.Scene.ToString(); - - StringBuilder sb = new StringBuilder(); - if (z.Rules != null) - { - foreach (var hash in z.Rules) - { - sb.AppendLine(hash.ToString()); - } - } - HashesTextBox.Text = sb.ToString(); - - sb.Clear(); - if (z.DependentAmbiences != null) - { - foreach (var extparam in z.DependentAmbiences) - { - sb.Append(extparam.Name.ToString()); - sb.Append(", "); - sb.Append(FloatUtil.ToString(extparam.Value)); - sb.AppendLine(); - } - } - DependentAmbiencesTextBox.Text = sb.ToString(); - - populatingui = false; - - if (ProjectForm.WorldForm != null) - { - ProjectForm.WorldForm.SelectObject(CurrentZone); - } - - } - - } - - - private void ProjectItemChanged() - { - CurrentZone?.UpdateFromZone();//also update the placement wrapper - - if (CurrentZone?.RelFile != null) - { - ProjectForm.SetAudioFileHasChanged(true); - } - } - - - private void NameTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint hash = 0; - string name = NameTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - //NameHashLabel.Text = "Hash: " + hash.ToString(); - - if (CurrentZone.AudioZone.NameHash != hash) - { - CurrentZone.AudioZone.Name = NameTextBox.Text; - CurrentZone.AudioZone.NameHash = hash; - - ProjectItemChanged(); - UpdateFormTitle(); - } - - } - - private void ShapeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - Dat151ZoneShape shape = Dat151ZoneShape.Box; - if (Enum.TryParse(ShapeComboBox.Text, out shape)) - { - if (CurrentZone.AudioZone.Shape != shape) - { - CurrentZone.AudioZone.Shape = shape; - - ProjectItemChanged(); - } - } - - } - - private void InnerPosTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(InnerPosTextBox.Text); - if (CurrentZone.AudioZone.PlaybackZonePosition != vec) - { - CurrentZone.AudioZone.PlaybackZonePosition = vec; - - ProjectItemChanged(); - - //var wf = ProjectForm.WorldForm; - //if (wf != null) - //{ - // wf.BeginInvoke(new Action(() => - // { - // wf.SetWidgetPosition(CurrentZone.Position, true); - // })); - //} - } - } - - private void InnerSizeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(InnerSizeTextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneSize != vec) - { - CurrentZone.AudioZone.PlaybackZoneSize = vec; - - ProjectItemChanged(); - } - } - - private void InnerAngleTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint ang = 0; - if (uint.TryParse(InnerAngleTextBox.Text, out ang)) - { - if (CurrentZone.AudioZone.PlaybackZoneAngle != ang) - { - CurrentZone.AudioZone.PlaybackZoneAngle = ang; - - ProjectItemChanged(); - } - } - } - - private void InnerVec1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(InnerVec1TextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneVec1 != vec) - { - CurrentZone.AudioZone.PlaybackZoneVec1 = vec; - - ProjectItemChanged(); - } - } - - private void InnerVec2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(InnerVec2TextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneVec2 != vec) - { - CurrentZone.AudioZone.PlaybackZoneVec2 = vec; - - ProjectItemChanged(); - } - } - - private void InnerVec3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(InnerVec3TextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneVec3 != vec) - { - CurrentZone.AudioZone.PlaybackZoneVec3 = vec; - - ProjectItemChanged(); - } - } - - private void OuterPosTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(OuterPosTextBox.Text); - if (CurrentZone.AudioZone.ActivationZonePosition != vec) - { - CurrentZone.AudioZone.ActivationZonePosition = vec; - - ProjectItemChanged(); - } - } - - private void OuterSizeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(OuterSizeTextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneSize != vec) - { - CurrentZone.AudioZone.ActivationZoneSize = vec; - - ProjectItemChanged(); - } - } - - private void OuterAngleTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint ang = 0; - if (uint.TryParse(OuterAngleTextBox.Text, out ang)) - { - if (CurrentZone.AudioZone.ActivationZoneAngle != ang) - { - CurrentZone.AudioZone.ActivationZoneAngle = ang; - - ProjectItemChanged(); - } - } - } - - private void OuterVec1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(OuterVec1TextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneVec1 != vec) - { - CurrentZone.AudioZone.ActivationZoneVec1 = vec; - - ProjectItemChanged(); - } - } - - private void OuterVec2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(OuterVec2TextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneVec2 != vec) - { - CurrentZone.AudioZone.ActivationZoneVec2 = vec; - - ProjectItemChanged(); - } - } - - private void OuterVec3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(OuterVec3TextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneVec3 != vec) - { - CurrentZone.AudioZone.ActivationZoneVec3 = vec; - - ProjectItemChanged(); - } - } - - private void UnkVec1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(UnkVec1TextBox.Text); - if (CurrentZone.AudioZone.UnkVec1 != vec) - { - CurrentZone.AudioZone.UnkVec1 = vec; - - ProjectItemChanged(); - } - } - - private void UnkVec2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(UnkVec2TextBox.Text); - if (CurrentZone.AudioZone.UnkVec2 != vec) - { - CurrentZone.AudioZone.UnkVec2 = vec; - - ProjectItemChanged(); - } - } - - private void UnkVec3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector2String(UnkVec3TextBox.Text); - if (CurrentZone.AudioZone.UnkVec3 != vec) - { - CurrentZone.AudioZone.UnkVec3 = vec; - - ProjectItemChanged(); - } - } - - private void UnkBytesTextBox_TextChanged(object sender, EventArgs e) - { - var vals = UnkBytesTextBox.Text.Split(','); - if (vals?.Length == 3) - { - byte val0 = 0, val1 = 0, val2 = 0; - byte.TryParse(vals[0].Trim(), out val0); - byte.TryParse(vals[1].Trim(), out val1); - byte.TryParse(vals[2].Trim(), out val2); - - CurrentZone.AudioZone.Unk14 = val0; - CurrentZone.AudioZone.Unk15 = val1; - CurrentZone.AudioZone.Unk16 = val2; - - ProjectItemChanged(); - } - } - - private void Flags0TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint flags = 0; - if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentZone.AudioZone.Flags0 != flags) - { - CurrentZone.AudioZone.Flags0 = flags; - - ProjectItemChanged(); - } - } - - } - - private void Flags1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint flags = 0; - if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentZone.AudioZone.Flags1 != flags) - { - CurrentZone.AudioZone.Flags1 = flags; - - ProjectItemChanged(); - } - } - } - - private void Unk13TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var hashstr = Unk13TextBox.Text; - uint hash = 0; - if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(hashstr); - JenkIndex.Ensure(hashstr); - } - - if (CurrentZone.AudioZone.Unk13 != hash) - { - CurrentZone.AudioZone.Unk13 = hash; - - ProjectItemChanged(); - } - } - - private void Hash0TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var hashstr = Hash0TextBox.Text; - uint hash = 0; - if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(hashstr); - JenkIndex.Ensure(hashstr); - } - - if (CurrentZone.AudioZone.UnkHash0 != hash) - { - CurrentZone.AudioZone.UnkHash0 = hash; - - ProjectItemChanged(); - } - } - - private void SceneTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var hashstr = SceneTextBox.Text; - uint hash = 0; - if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(hashstr); - JenkIndex.Ensure(hashstr); - } - - if (CurrentZone.AudioZone.Scene != hash) - { - CurrentZone.AudioZone.Scene = hash; - - ProjectItemChanged(); - } - } - - private void HashesTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var hashstrs = HashesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); - if (hashstrs?.Length > 0) - { - var hashlist = new List(); - foreach (var hashstr in hashstrs) - { - uint hash = 0; - if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(hashstr); - JenkIndex.Ensure(hashstr); - } - hashlist.Add(hash); - } - - CurrentZone.AudioZone.Rules = hashlist.ToArray(); - CurrentZone.AudioZone.RulesCount = (byte)hashlist.Count; - - ProjectItemChanged(); - } - } - - private void DependentAmbiencesTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var paramstrs = DependentAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); - if (paramstrs?.Length > 0) - { - var paramlist = new List(); - foreach (var paramstr in paramstrs) - { - var paramvals = paramstr.Split(','); - if (paramvals?.Length == 2) - { - var param = new Dat151AmbientZone.DependentAmbience(); - var hashstr = paramvals[0].Trim(); - var valstr = paramvals[1].Trim(); - uint hash = 0; - if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(hashstr); - JenkIndex.Ensure(hashstr); - } - param.Name = hash; - param.Value = FloatUtil.Parse(valstr); - paramlist.Add(param); - } - } - - CurrentZone.AudioZone.DependentAmbiences = paramlist.ToArray(); - CurrentZone.AudioZone.DependentAmbiencesCount = (uint)paramlist.Count; - - ProjectItemChanged(); - } - } - - private void GoToButton_Click(object sender, EventArgs e) - { - if (CurrentZone == null) return; - if (ProjectForm.WorldForm == null) return; - ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.PlaybackZoneSize); - } - - private void AddToProjectButton_Click(object sender, EventArgs e) - { - ProjectForm.SetProjectItem(CurrentZone); - ProjectForm.AddAudioFileToProject(CurrentZone.RelFile); - } - - private void DeleteButton_Click(object sender, EventArgs e) - { - ProjectForm.SetProjectItem(CurrentZone); - ProjectForm.DeleteAudioZone(); - } - } -} diff --git a/CodeWalker/Project/Panels/ProjectExplorerPanel.cs b/CodeWalker/Project/Panels/ProjectExplorerPanel.cs index 9d8592e..2f7cba1 100644 --- a/CodeWalker/Project/Panels/ProjectExplorerPanel.cs +++ b/CodeWalker/Project/Panels/ProjectExplorerPanel.cs @@ -700,7 +700,7 @@ namespace CodeWalker.Project.Panels } private void LoadAudioRelTreeNodes(RelFile rel, TreeNode node) { - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Zones, Emitters + if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Zones, Rules node.Nodes.Clear(); @@ -709,10 +709,11 @@ namespace CodeWalker.Project.Panels var zones = new List(); - var emitters = new List(); + var rules = new List(); + var emitters = new List(); var zonelists = new List(); var emitterlists = new List(); - var interiors = new List(); + var interiors = new List(); var interiorrooms = new List(); foreach (var reldata in rel.RelDatasSorted) @@ -723,7 +724,11 @@ namespace CodeWalker.Project.Panels } if (reldata is Dat151AmbientRule) { - emitters.Add(reldata as Dat151AmbientRule); + rules.Add(reldata as Dat151AmbientRule); + } + if (reldata is Dat151StaticEmitter) + { + emitters.Add(reldata as Dat151StaticEmitter); } if (reldata is Dat151AmbientZoneList) { @@ -733,9 +738,9 @@ namespace CodeWalker.Project.Panels { emitterlists.Add(reldata as Dat151StaticEmitterList); } - if (reldata is Dat151Interior) + if (reldata is Dat151InteriorSettings) { - interiors.Add(reldata as Dat151Interior); + interiors.Add(reldata as Dat151InteriorSettings); } if (reldata is Dat151InteriorRoom) { @@ -759,11 +764,24 @@ namespace CodeWalker.Project.Panels } } + if (rules.Count > 0) + { + var n = node.Nodes.Add("Ambient Rules (" + rules.Count.ToString() + ")"); + n.Name = "AmbientRules"; + n.Tag = rel; + + for (int i = 0; i < rules.Count; i++) + { + var rule = rules[i]; + var tnode = n.Nodes.Add(rule.NameHash.ToString()); + tnode.Tag = rule; + } + } if (emitters.Count > 0) { - var n = node.Nodes.Add("Ambient Emitters (" + emitters.Count.ToString() + ")"); - n.Name = "AmbientEmitters"; + var n = node.Nodes.Add("Static Emitters (" + emitters.Count.ToString() + ")"); + n.Name = "StaticEmitters"; n.Tag = rel; for (int i = 0; i < emitters.Count; i++) @@ -791,8 +809,8 @@ namespace CodeWalker.Project.Panels if (emitterlists.Count > 0) { - var emitterlistsnode = node.Nodes.Add("Ambient Emitter Lists (" + emitterlists.Count.ToString() + ")"); - emitterlistsnode.Name = "AmbientEmitterLists"; + var emitterlistsnode = node.Nodes.Add("Static Emitter Lists (" + emitterlists.Count.ToString() + ")"); + emitterlistsnode.Name = "StaticEmitterLists"; emitterlistsnode.Tag = rel; for (int i = 0; i < emitterlists.Count; i++) { @@ -1482,44 +1500,79 @@ namespace CodeWalker.Project.Panels { if (ProjectTreeView.Nodes.Count <= 0) return null; var projnode = ProjectTreeView.Nodes[0]; - var scenariosnode = GetChildTreeNode(projnode, "AudioRels"); - if (scenariosnode == null) return null; - for (int i = 0; i < scenariosnode.Nodes.Count; i++) + var relsnode = GetChildTreeNode(projnode, "AudioRels"); + if (relsnode == null) return null; + for (int i = 0; i < relsnode.Nodes.Count; i++) { - var ymtnode = scenariosnode.Nodes[i]; - if (ymtnode.Tag == rel) return ymtnode; + var relnode = relsnode.Nodes[i]; + if (relnode.Tag == rel) return relnode; } return null; } - public TreeNode FindAudioZoneTreeNode(AudioPlacement zone) + public TreeNode FindAudioAmbientZoneTreeNode(AudioPlacement zone) { if (zone == null) return null; TreeNode relnode = FindAudioRelTreeNode(zone.RelFile); - var zonenode = GetChildTreeNode(relnode, "AmbientZones"); - if (zonenode == null) return null; - //zonenode.Tag = zone; - for (int i = 0; i < zonenode.Nodes.Count; i++) + var zonesnode = GetChildTreeNode(relnode, "AmbientZones"); + if (zonesnode == null) return null; + for (int i = 0; i < zonesnode.Nodes.Count; i++) { - TreeNode znode = zonenode.Nodes[i]; - if (znode.Tag == zone.AudioZone) return znode; + TreeNode znode = zonesnode.Nodes[i]; + if (znode.Tag == zone.AmbientZone) return znode; } - return zonenode; + return zonesnode; } - public TreeNode FindAudioEmitterTreeNode(AudioPlacement emitter) + public TreeNode FindAudioAmbientRuleTreeNode(AudioPlacement rule) + { + if (rule == null) return null; + TreeNode relnode = FindAudioRelTreeNode(rule.RelFile); + var rulesnode = GetChildTreeNode(relnode, "AmbientRules"); + if (rulesnode == null) return null; + for (int i = 0; i < rulesnode.Nodes.Count; i++) + { + TreeNode rnode = rulesnode.Nodes[i]; + if (rnode.Tag == rule.AmbientRule) return rnode; + } + return rulesnode; + } + public TreeNode FindAudioAmbientRuleTreeNode(uint hash) + { + if (ProjectTreeView.Nodes.Count <= 0) return null; + var projnode = ProjectTreeView.Nodes[0]; + var relsnode = GetChildTreeNode(projnode, "AudioRels"); + if (relsnode == null) return null; + for (int i = 0; i < relsnode.Nodes.Count; i++) + { + var relnode = relsnode.Nodes[i]; + var rel = relnode.Tag as RelFile; + if (rel == null) continue; + var rulesnode = GetChildTreeNode(relnode, "AmbientRules"); + if (rulesnode == null) continue; + for (int j = 0; j < rulesnode.Nodes.Count; j++) + { + var rnode = rulesnode.Nodes[j]; + var rule = rnode.Tag as Dat151AmbientRule; + if (rule == null) continue; + if (rule.NameHash == hash) return rnode; + } + } + return null; + } + public TreeNode FindAudioStaticEmitterTreeNode(AudioPlacement emitter) { if (emitter == null) return null; TreeNode relnode = FindAudioRelTreeNode(emitter.RelFile); - var zonenode = GetChildTreeNode(relnode, "AmbientEmitters"); + var zonenode = GetChildTreeNode(relnode, "StaticEmitters"); if (zonenode == null) return null; //zonenode.Tag = emitter; for (int i = 0; i < zonenode.Nodes.Count; i++) { TreeNode znode = zonenode.Nodes[i]; - if (znode.Tag == emitter.AudioEmitter) return znode; + if (znode.Tag == emitter.StaticEmitter) return znode; } return zonenode; } - public TreeNode FindAudioZoneListTreeNode(Dat151AmbientZoneList list) + public TreeNode FindAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list) { if (list == null) return null; TreeNode relnode = FindAudioRelTreeNode(list.Rel); @@ -1532,11 +1585,11 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioEmitterListTreeNode(Dat151StaticEmitterList list) + public TreeNode FindAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list) { if (list == null) return null; TreeNode relnode = FindAudioRelTreeNode(list.Rel); - var emitterlistsnode = GetChildTreeNode(relnode, "AmbientEmitterLists"); + var emitterlistsnode = GetChildTreeNode(relnode, "StaticEmitterLists"); if (emitterlistsnode == null) return null; for (int i = 0; i < emitterlistsnode.Nodes.Count; i++) { @@ -1545,7 +1598,7 @@ namespace CodeWalker.Project.Panels } return null; } - public TreeNode FindAudioInteriorTreeNode(Dat151Interior interior) + public TreeNode FindAudioInteriorTreeNode(Dat151InteriorSettings interior) { if (interior == null) return null; TreeNode relnode = FindAudioRelTreeNode(interior.Rel); @@ -1986,9 +2039,9 @@ namespace CodeWalker.Project.Panels } } } - public void TrySelectAudioZoneTreeNode(AudioPlacement zone) + public void TrySelectAudioAmbientZoneTreeNode(AudioPlacement zone) { - TreeNode tnode = FindAudioZoneTreeNode(zone); + TreeNode tnode = FindAudioAmbientZoneTreeNode(zone); if (tnode == null) { tnode = FindAudioRelTreeNode(zone?.RelFile); @@ -2005,9 +2058,44 @@ namespace CodeWalker.Project.Panels } } } - public void TrySelectAudioEmitterTreeNode(AudioPlacement emitter) + public void TrySelectAudioAmbientRuleTreeNode(AudioPlacement rule) { - TreeNode tnode = FindAudioEmitterTreeNode(emitter); + TreeNode tnode = FindAudioAmbientRuleTreeNode(rule); + if (tnode == null) + { + tnode = FindAudioRelTreeNode(rule?.RelFile); + } + if (tnode != null) + { + if (ProjectTreeView.SelectedNode == tnode) + { + OnItemSelected?.Invoke(rule); + } + else + { + ProjectTreeView.SelectedNode = tnode; + } + } + } + public void TrySelectAudioAmbientRuleTreeNode(uint hash) + { + //variation for use by the button to select ambient rule from the ambient zone form + var tnode = FindAudioAmbientRuleTreeNode(hash); + if (tnode != null) + { + if (ProjectTreeView.SelectedNode == tnode) + { + OnItemSelected?.Invoke(tnode.Tag); + } + else + { + ProjectTreeView.SelectedNode = tnode; + } + } + } + public void TrySelectAudioStaticEmitterTreeNode(AudioPlacement emitter) + { + TreeNode tnode = FindAudioStaticEmitterTreeNode(emitter); if (tnode == null) { tnode = FindAudioRelTreeNode(emitter?.RelFile); @@ -2024,9 +2112,9 @@ namespace CodeWalker.Project.Panels } } } - public void TrySelectAudioZoneListTreeNode(Dat151AmbientZoneList list) + public void TrySelectAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list) { - TreeNode tnode = FindAudioZoneListTreeNode(list); + TreeNode tnode = FindAudioAmbientZoneListTreeNode(list); if (tnode == null) { tnode = FindAudioRelTreeNode(list?.Rel); @@ -2043,9 +2131,9 @@ namespace CodeWalker.Project.Panels } } } - public void TrySelectAudioEmitterListTreeNode(Dat151StaticEmitterList list) + public void TrySelectAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list) { - TreeNode tnode = FindAudioEmitterListTreeNode(list); + TreeNode tnode = FindAudioStaticEmitterListTreeNode(list); if (tnode == null) { tnode = FindAudioRelTreeNode(list?.Rel); @@ -2062,7 +2150,7 @@ namespace CodeWalker.Project.Panels } } } - public void TrySelectAudioInteriorTreeNode(Dat151Interior interior) + public void TrySelectAudioInteriorTreeNode(Dat151InteriorSettings interior) { TreeNode tnode = FindAudioInteriorTreeNode(interior); if (tnode == null) @@ -2265,39 +2353,47 @@ namespace CodeWalker.Project.Panels tn.Text = node.MedTypeName + ": " + node.StringText; } } - public void UpdateAudioZoneTreeNode(AudioPlacement zone) + public void UpdateAudioAmbientZoneTreeNode(AudioPlacement zone) { - var tn = FindAudioZoneTreeNode(zone); + var tn = FindAudioAmbientZoneTreeNode(zone); if (tn != null) { tn.Text = zone.NameHash.ToString(); } } - public void UpdateAudioEmitterTreeNode(AudioPlacement emitter) + public void UpdateAudioAmbientRuleTreeNode(AudioPlacement rule) { - var tn = FindAudioEmitterTreeNode(emitter); + var tn = FindAudioAmbientRuleTreeNode(rule); + if (tn != null) + { + tn.Text = rule.NameHash.ToString(); + } + } + public void UpdateAudioStaticEmitterTreeNode(AudioPlacement emitter) + { + var tn = FindAudioStaticEmitterTreeNode(emitter); if (tn != null) { tn.Text = emitter.NameHash.ToString(); } } - public void UpdateAudioZoneListTreeNode(Dat151AmbientZoneList list) + public void UpdateAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list) { - var tn = FindAudioZoneListTreeNode(list); + var tn = FindAudioAmbientZoneListTreeNode(list); if (tn != null) { tn.Text = list.NameHash.ToString(); } } - public void UpdateAudioEmitterListTreeNode(Dat151StaticEmitterList list) + public void UpdateAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list) { - var tn = FindAudioEmitterListTreeNode(list); + var tn = FindAudioStaticEmitterListTreeNode(list); if (tn != null) { tn.Text = list.NameHash.ToString(); } } - public void UpdateAudioInteriorTreeNode(Dat151Interior interior) + public void UpdateAudioInteriorTreeNode(Dat151InteriorSettings interior) { var tn = FindAudioInteriorTreeNode(interior); if (tn != null) @@ -2485,9 +2581,9 @@ namespace CodeWalker.Project.Panels tn.Parent.Nodes.Remove(tn); } } - public void RemoveAudioZoneTreeNode(AudioPlacement zone) + public void RemoveAudioAmbientZoneTreeNode(AudioPlacement zone) { - var tn = FindAudioZoneTreeNode(zone); + var tn = FindAudioAmbientZoneTreeNode(zone); if ((tn != null) && (tn.Parent != null)) { var zones = new List(); @@ -2503,27 +2599,45 @@ namespace CodeWalker.Project.Panels tn.Parent.Nodes.Remove(tn); } } - public void RemoveAudioEmitterTreeNode(AudioPlacement emitter) + public void RemoveAudioAmbientRuleTreeNode(AudioPlacement rule) { - var tn = FindAudioEmitterTreeNode(emitter); + var tn = FindAudioAmbientRuleTreeNode(rule); if ((tn != null) && (tn.Parent != null)) { - var emitters = new List(); - foreach (var reldata in emitter.RelFile.RelDatas) + var rules = new List(); + foreach (var reldata in rule.RelFile.RelDatas) { if (reldata is Dat151AmbientRule) { - emitters.Add(reldata as Dat151AmbientRule); + rules.Add(reldata as Dat151AmbientRule); } } - tn.Parent.Text = "Ambient Emitters (" + emitters.Count.ToString() + ")"; + tn.Parent.Text = "Ambient Rules (" + rules.Count.ToString() + ")"; tn.Parent.Nodes.Remove(tn); } } - public void RemoveAudioZoneListTreeNode(Dat151AmbientZoneList list) + public void RemoveAudioStaticEmitterTreeNode(AudioPlacement emitter) { - var tn = FindAudioZoneListTreeNode(list); + var tn = FindAudioStaticEmitterTreeNode(emitter); + if ((tn != null) && (tn.Parent != null)) + { + var emitters = new List(); + foreach (var reldata in emitter.RelFile.RelDatas) + { + if (reldata is Dat151StaticEmitter) + { + emitters.Add(reldata as Dat151StaticEmitter); + } + } + + tn.Parent.Text = "Static Emitters (" + emitters.Count.ToString() + ")"; + tn.Parent.Nodes.Remove(tn); + } + } + public void RemoveAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list) + { + var tn = FindAudioAmbientZoneListTreeNode(list); if ((tn != null) && (tn.Parent != null)) { var zonelists = new List(); @@ -2539,9 +2653,9 @@ namespace CodeWalker.Project.Panels tn.Parent.Nodes.Remove(tn); } } - public void RemoveAudioEmitterListTreeNode(Dat151StaticEmitterList list) + public void RemoveAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list) { - var tn = FindAudioEmitterListTreeNode(list); + var tn = FindAudioStaticEmitterListTreeNode(list); if ((tn != null) && (tn.Parent != null)) { var emitterlists = new List(); @@ -2553,21 +2667,21 @@ namespace CodeWalker.Project.Panels } } - tn.Parent.Text = "Ambient Emitter Lists (" + emitterlists.Count.ToString() + ")"; + tn.Parent.Text = "Static Emitter Lists (" + emitterlists.Count.ToString() + ")"; tn.Parent.Nodes.Remove(tn); } } - public void RemoveAudioInteriorTreeNode(Dat151Interior interior) + public void RemoveAudioInteriorTreeNode(Dat151InteriorSettings interior) { var tn = FindAudioInteriorTreeNode(interior); if ((tn != null) && (tn.Parent != null)) { - var interiors = new List(); + var interiors = new List(); foreach (var reldata in interior.Rel.RelDatas) { - if (reldata is Dat151Interior) + if (reldata is Dat151InteriorSettings) { - interiors.Add(reldata as Dat151Interior); + interiors.Add(reldata as Dat151InteriorSettings); } } diff --git a/CodeWalker/Project/ProjectForm.Designer.cs b/CodeWalker/Project/ProjectForm.Designer.cs index 3882513..9db2266 100644 --- a/CodeWalker/Project/ProjectForm.Designer.cs +++ b/CodeWalker/Project/ProjectForm.Designer.cs @@ -173,8 +173,8 @@ this.AudioMenu = new System.Windows.Forms.ToolStripMenuItem(); this.AudioNameMenu = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator23 = new System.Windows.Forms.ToolStripSeparator(); - this.AudioNewAmbientEmitterMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.AudioNewAmbientEmitterListMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.AudioNewAmbientRuleMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.AudioNewStaticEmitterListMenu = new System.Windows.Forms.ToolStripMenuItem(); this.AudioNewAmbientZoneMenu = new System.Windows.Forms.ToolStripMenuItem(); this.AudioNewAmbientZoneListMenu = new System.Windows.Forms.ToolStripMenuItem(); this.AudioNewInteriorMenu = new System.Windows.Forms.ToolStripMenuItem(); @@ -213,6 +213,7 @@ this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); + this.AudioNewStaticEmitterMenu = new System.Windows.Forms.ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.MainToolbar.SuspendLayout(); this.SuspendLayout(); @@ -1356,8 +1357,9 @@ this.AudioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.AudioNameMenu, this.toolStripSeparator23, - this.AudioNewAmbientEmitterMenu, - this.AudioNewAmbientEmitterListMenu, + this.AudioNewAmbientRuleMenu, + this.AudioNewStaticEmitterMenu, + this.AudioNewStaticEmitterListMenu, this.AudioNewAmbientZoneMenu, this.AudioNewAmbientZoneListMenu, this.AudioNewInteriorMenu, @@ -1382,21 +1384,21 @@ this.toolStripSeparator23.Name = "toolStripSeparator23"; this.toolStripSeparator23.Size = new System.Drawing.Size(213, 6); // - // AudioNewAmbientEmitterMenu + // AudioNewAmbientRuleMenu // - this.AudioNewAmbientEmitterMenu.Enabled = false; - this.AudioNewAmbientEmitterMenu.Name = "AudioNewAmbientEmitterMenu"; - this.AudioNewAmbientEmitterMenu.Size = new System.Drawing.Size(216, 22); - this.AudioNewAmbientEmitterMenu.Text = "New Ambient Emitter"; - this.AudioNewAmbientEmitterMenu.Click += new System.EventHandler(this.AudioNewAmbientEmitterMenu_Click); + this.AudioNewAmbientRuleMenu.Enabled = false; + this.AudioNewAmbientRuleMenu.Name = "AudioNewAmbientRuleMenu"; + this.AudioNewAmbientRuleMenu.Size = new System.Drawing.Size(216, 22); + this.AudioNewAmbientRuleMenu.Text = "New Ambient Rule"; + this.AudioNewAmbientRuleMenu.Click += new System.EventHandler(this.AudioNewAmbientRuleMenu_Click); // - // AudioNewAmbientEmitterListMenu + // AudioNewStaticEmitterListMenu // - this.AudioNewAmbientEmitterListMenu.Enabled = false; - this.AudioNewAmbientEmitterListMenu.Name = "AudioNewAmbientEmitterListMenu"; - this.AudioNewAmbientEmitterListMenu.Size = new System.Drawing.Size(216, 22); - this.AudioNewAmbientEmitterListMenu.Text = "New Ambient Emitter List"; - this.AudioNewAmbientEmitterListMenu.Click += new System.EventHandler(this.AudioNewAmbientEmitterListMenu_Click); + this.AudioNewStaticEmitterListMenu.Enabled = false; + this.AudioNewStaticEmitterListMenu.Name = "AudioNewStaticEmitterListMenu"; + this.AudioNewStaticEmitterListMenu.Size = new System.Drawing.Size(216, 22); + this.AudioNewStaticEmitterListMenu.Text = "New Static Emitter List"; + this.AudioNewStaticEmitterListMenu.Click += new System.EventHandler(this.AudioNewStaticEmitterListMenu_Click); // // AudioNewAmbientZoneMenu // @@ -1698,6 +1700,14 @@ this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); // + // AudioNewStaticEmitterMenu + // + this.AudioNewStaticEmitterMenu.Enabled = false; + this.AudioNewStaticEmitterMenu.Name = "AudioNewStaticEmitterMenu"; + this.AudioNewStaticEmitterMenu.Size = new System.Drawing.Size(216, 22); + this.AudioNewStaticEmitterMenu.Text = "New Static Emitter"; + this.AudioNewStaticEmitterMenu.Click += new System.EventHandler(this.AudioNewStaticEmitterMenu_Click); + // // ProjectForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1840,8 +1850,8 @@ private System.Windows.Forms.ToolStripMenuItem AudioMenu; private System.Windows.Forms.ToolStripMenuItem AudioNameMenu; private System.Windows.Forms.ToolStripSeparator toolStripSeparator23; - private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientEmitterMenu; - private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientEmitterListMenu; + private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientRuleMenu; + private System.Windows.Forms.ToolStripMenuItem AudioNewStaticEmitterListMenu; private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientZoneMenu; private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientZoneListMenu; private System.Windows.Forms.ToolStripSeparator toolStripSeparator24; @@ -1907,5 +1917,6 @@ private System.Windows.Forms.ToolStripMenuItem YtdRemoveFromProjectMenu; private System.Windows.Forms.ToolStripSeparator toolStripSeparator31; private System.Windows.Forms.ToolStripMenuItem deleteGrassToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem AudioNewStaticEmitterMenu; } } \ No newline at end of file diff --git a/CodeWalker/Project/ProjectForm.cs b/CodeWalker/Project/ProjectForm.cs index 77dd5cf..ef35346 100644 --- a/CodeWalker/Project/ProjectForm.cs +++ b/CodeWalker/Project/ProjectForm.cs @@ -72,11 +72,12 @@ namespace CodeWalker.Project private MCScenarioChainingEdge CurrentScenarioChainEdge; private RelFile CurrentAudioFile; - private AudioPlacement CurrentAudioZone; - private AudioPlacement CurrentAudioEmitter; - private Dat151AmbientZoneList CurrentAudioZoneList; - private Dat151StaticEmitterList CurrentAudioEmitterList; - private Dat151Interior CurrentAudioInterior; + private AudioPlacement CurrentAudioAmbientZone; + private AudioPlacement CurrentAudioAmbientRule; + private AudioPlacement CurrentAudioStaticEmitter; + private Dat151AmbientZoneList CurrentAudioAmbientZoneList; + private Dat151StaticEmitterList CurrentAudioStaticEmitterList; + private Dat151InteriorSettings CurrentAudioInterior; private Dat151InteriorRoom CurrentAudioInteriorRoom; private YbnFile CurrentYbnFile; @@ -581,33 +582,40 @@ namespace CodeWalker.Project (panel) => { panel.SetFile(CurrentAudioFile); }, //updateFunc (panel) => { return panel.CurrentFile == CurrentAudioFile; }); //findFunc } - public void ShowEditAudioZonePanel(bool promote) + public void ShowEditAudioAmbientZonePanel(bool promote) { ShowPanel(promote, - () => { return new EditAudioZonePanel(this); }, //createFunc - (panel) => { panel.SetZone(CurrentAudioZone); }, //updateFunc - (panel) => { return panel.CurrentZone?.AudioZone == CurrentAudioZone?.AudioZone; }); //findFunc + () => { return new EditAudioAmbientZonePanel(this); }, //createFunc + (panel) => { panel.SetZone(CurrentAudioAmbientZone); }, //updateFunc + (panel) => { return panel.CurrentZone?.AmbientZone == CurrentAudioAmbientZone?.AmbientZone; }); //findFunc } - public void ShowEditAudioEmitterPanel(bool promote) + public void ShowEditAudioAmbientRulePanel(bool promote) { ShowPanel(promote, - () => { return new EditAudioEmitterPanel(this); }, //createFunc - (panel) => { panel.SetEmitter(CurrentAudioEmitter); }, //updateFunc - (panel) => { return panel.CurrentEmitter?.AudioEmitter == CurrentAudioEmitter?.AudioEmitter; }); //findFunc + () => { return new EditAudioAmbientRulePanel(this); }, //createFunc + (panel) => { panel.SetRule(CurrentAudioAmbientRule); }, //updateFunc + (panel) => { return panel.CurrentRule?.AmbientRule == CurrentAudioAmbientRule?.AmbientRule; }); //findFunc } - public void ShowEditAudioZoneListPanel(bool promote) + public void ShowEditAudioStaticEmitterPanel(bool promote) { ShowPanel(promote, - () => { return new EditAudioZoneListPanel(this); }, //createFunc - (panel) => { panel.SetZoneList(CurrentAudioZoneList); }, //updateFunc - (panel) => { return panel.CurrentZoneList == CurrentAudioZoneList; }); //findFunc + () => { return new EditAudioStaticEmitterPanel(this); }, //createFunc + (panel) => { panel.SetEmitter(CurrentAudioStaticEmitter); }, //updateFunc + (panel) => { return panel.CurrentEmitter?.StaticEmitter == CurrentAudioStaticEmitter?.StaticEmitter; }); //findFunc } - public void ShowEditAudioEmitterListPanel(bool promote) + public void ShowEditAudioAmbientZoneListPanel(bool promote) { ShowPanel(promote, - () => { return new EditAudioEmitterListPanel(this); }, //createFunc - (panel) => { panel.SetEmitterList(CurrentAudioEmitterList); }, //updateFunc - (panel) => { return panel.CurrentEmitterList == CurrentAudioEmitterList; }); //findFunc + () => { return new EditAudioAmbientZoneListPanel(this); }, //createFunc + (panel) => { panel.SetZoneList(CurrentAudioAmbientZoneList); }, //updateFunc + (panel) => { return panel.CurrentZoneList == CurrentAudioAmbientZoneList; }); //findFunc + } + public void ShowEditAudioStaticEmitterListPanel(bool promote) + { + ShowPanel(promote, + () => { return new EditAudioStaticEmitterListPanel(this); }, //createFunc + (panel) => { panel.SetEmitterList(CurrentAudioStaticEmitterList); }, //updateFunc + (panel) => { return panel.CurrentEmitterList == CurrentAudioStaticEmitterList; }); //findFunc } public void ShowEditAudioInteriorPanel(bool promote) { @@ -745,21 +753,25 @@ namespace CodeWalker.Project { ShowEditScenarioYmtPanel(promote); } - if (CurrentAudioZone != null) + if (CurrentAudioAmbientZone != null) { - ShowEditAudioZonePanel(promote); + ShowEditAudioAmbientZonePanel(promote); } - else if (CurrentAudioEmitter != null) + else if (CurrentAudioAmbientRule != null) { - ShowEditAudioEmitterPanel(promote); + ShowEditAudioAmbientRulePanel(promote); } - else if (CurrentAudioZoneList != null) + else if (CurrentAudioStaticEmitter != null) { - ShowEditAudioZoneListPanel(promote); + ShowEditAudioStaticEmitterPanel(promote); } - else if (CurrentAudioEmitterList != null) + else if (CurrentAudioAmbientZoneList != null) { - ShowEditAudioEmitterListPanel(promote); + ShowEditAudioAmbientZoneListPanel(promote); + } + else if (CurrentAudioStaticEmitterList != null) + { + ShowEditAudioStaticEmitterListPanel(promote); } else if (CurrentAudioInterior != null) { @@ -855,11 +867,12 @@ namespace CodeWalker.Project CurrentScenarioNode = item as ScenarioNode; CurrentScenarioChainEdge = item as MCScenarioChainingEdge; CurrentAudioFile = item as RelFile; - CurrentAudioZone = item as AudioPlacement; - CurrentAudioEmitter = item as AudioPlacement; - CurrentAudioZoneList = item as Dat151AmbientZoneList; - CurrentAudioEmitterList = item as Dat151StaticEmitterList; - CurrentAudioInterior = item as Dat151Interior; + CurrentAudioAmbientZone = item as AudioPlacement; + CurrentAudioAmbientRule = item as AudioPlacement; + CurrentAudioStaticEmitter = item as AudioPlacement; + CurrentAudioAmbientZoneList = item as Dat151AmbientZoneList; + CurrentAudioStaticEmitterList = item as Dat151StaticEmitterList; + CurrentAudioInterior = item as Dat151InteriorSettings; CurrentAudioInteriorRoom = item as Dat151InteriorRoom; CurrentMloRoom = item as MCMloRoomDef; CurrentMloPortal = item as MCMloPortalDef; @@ -869,14 +882,17 @@ namespace CodeWalker.Project CurrentYftFile = item as YftFile; CurrentYtdFile = item as YtdFile; - if (CurrentAudioZone?.AudioZone == null) CurrentAudioZone = null; - if (CurrentAudioEmitter?.AudioEmitter == null) CurrentAudioEmitter = null; + if (CurrentAudioAmbientZone?.AmbientZone == null) CurrentAudioAmbientZone = null; + if (CurrentAudioAmbientRule?.AmbientRule == null) CurrentAudioAmbientRule = null; + if (CurrentAudioStaticEmitter?.StaticEmitter == null) CurrentAudioStaticEmitter = null; //need to create a temporary AudioPlacement wrapper for these, since AudioPlacements usually come from WorldForm var daz = item as Dat151AmbientZone; var dae = item as Dat151AmbientRule; - if (daz != null) CurrentAudioZone = new AudioPlacement(daz.Rel, daz); - if (dae != null) CurrentAudioEmitter = new AudioPlacement(dae.Rel, dae); + var dse = item as Dat151StaticEmitter; + if (daz != null) CurrentAudioAmbientZone = new AudioPlacement(daz.Rel, daz); + if (dae != null) CurrentAudioAmbientRule = new AudioPlacement(dae.Rel, dae); + if (dse != null) CurrentAudioStaticEmitter = new AudioPlacement(dse.Rel, dse); @@ -988,21 +1004,25 @@ namespace CodeWalker.Project { CurrentScenario = CurrentScenarioChainEdge.Region?.Ymt; } - if (CurrentAudioZone != null) + if (CurrentAudioAmbientZone != null) { - CurrentAudioFile = CurrentAudioZone.RelFile; + CurrentAudioFile = CurrentAudioAmbientZone.RelFile; } - if (CurrentAudioEmitter != null) + if (CurrentAudioAmbientRule != null) { - CurrentAudioFile = CurrentAudioEmitter.RelFile; + CurrentAudioFile = CurrentAudioAmbientRule.RelFile; } - if (CurrentAudioZoneList != null) + if (CurrentAudioStaticEmitter != null) { - CurrentAudioFile = CurrentAudioZoneList.Rel; + CurrentAudioFile = CurrentAudioStaticEmitter.RelFile; } - if (CurrentAudioEmitterList != null) + if (CurrentAudioAmbientZoneList != null) { - CurrentAudioFile = CurrentAudioEmitterList.Rel; + CurrentAudioFile = CurrentAudioAmbientZoneList.Rel; + } + if (CurrentAudioStaticEmitterList != null) + { + CurrentAudioFile = CurrentAudioStaticEmitterList.Rel; } if (CurrentAudioInterior != null) { @@ -1845,8 +1865,9 @@ namespace CodeWalker.Project else if (sel.NavPortal != null) return NewNavPortal(sel.NavPortal, copyPosition, selectNew); else if (sel.TrainTrackNode != null) return NewTrainNode(sel.TrainTrackNode, copyPosition, selectNew); else if (sel.ScenarioNode != null) return NewScenarioNode(sel.ScenarioNode, copyPosition, selectNew); - else if (sel.Audio?.AudioZone != null) return NewAudioZone(sel.Audio, copyPosition, selectNew); - else if (sel.Audio?.AudioEmitter != null) return NewAudioEmitter(sel.Audio, copyPosition, selectNew); + else if (sel.Audio?.AmbientZone != null) return NewAudioAmbientZone(sel.Audio, copyPosition, selectNew); + else if (sel.Audio?.AmbientRule != null) return NewAudioAmbientRule(sel.Audio, copyPosition, selectNew); + else if (sel.Audio?.StaticEmitter != null) return NewAudioStaticEmitter(sel.Audio, copyPosition, selectNew); return null; } public void DeleteObject(MapSelection sel) @@ -1873,8 +1894,9 @@ namespace CodeWalker.Project else if (sel.NavPortal != null) DeleteNavPortal(); else if (sel.TrainTrackNode != null) DeleteTrainNode(); else if (sel.ScenarioNode != null) DeleteScenarioNode(); - else if (sel.Audio?.AudioZone != null) DeleteAudioZone(); - else if (sel.Audio?.AudioEmitter != null) DeleteAudioEmitter(); + else if (sel.Audio?.AmbientZone != null) DeleteAudioAmbientZone(); + else if (sel.Audio?.AmbientRule != null) DeleteAudioAmbientRule(); + else if (sel.Audio?.StaticEmitter != null) DeleteAudioStaticEmitter(); } private void SetObject(ref MapSelection sel) { @@ -1893,8 +1915,9 @@ namespace CodeWalker.Project else if (sel.NavPortal != null) SetProjectItem(sel.NavPortal, false); else if (sel.TrainTrackNode != null) SetProjectItem(sel.TrainTrackNode, false); else if (sel.ScenarioNode != null) SetProjectItem(sel.ScenarioNode, false); - else if (sel.Audio?.AudioZone != null) SetProjectItem(sel.Audio, false); - else if (sel.Audio?.AudioEmitter != null) SetProjectItem(sel.Audio, false); + else if (sel.Audio?.AmbientZone != null) SetProjectItem(sel.Audio, false); + else if (sel.Audio?.AmbientRule != null) SetProjectItem(sel.Audio, false); + else if (sel.Audio?.StaticEmitter != null) SetProjectItem(sel.Audio, false); } @@ -6382,13 +6405,17 @@ namespace CodeWalker.Project } CurrentAudioFile = rel; RefreshUI(); - if (CurrentAudioZone != null) + if (CurrentAudioAmbientZone != null) { - ProjectExplorer?.TrySelectAudioZoneTreeNode(CurrentAudioZone); + ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(CurrentAudioAmbientZone); } - else if (CurrentAudioEmitter != null) + else if (CurrentAudioAmbientRule != null) { - ProjectExplorer?.TrySelectAudioEmitterTreeNode(CurrentAudioEmitter); + ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(CurrentAudioAmbientRule); + } + else if (CurrentAudioStaticEmitter != null) + { + ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(CurrentAudioStaticEmitter); } } public void RemoveAudioFileFromProject() @@ -6407,13 +6434,13 @@ namespace CodeWalker.Project return CurrentProjectFile.ContainsAudioRel(rel); } - public AudioPlacement NewAudioZone(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true) + public AudioPlacement NewAudioAmbientZone(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true) { if (CurrentAudioFile == null) return null; if (copy == null) { - copy = CurrentAudioZone; + copy = CurrentAudioAmbientZone; } bool cp = copyPosition && (copy != null); @@ -6422,33 +6449,36 @@ namespace CodeWalker.Project //AA800424 box, line //AA800420 sphere - zone.Flags0 = cp ? copy.AudioZone.Flags0.Value : 0xAA800424; - zone.Flags1 = cp ? copy.AudioZone.Flags1 : 0; - zone.Shape = cp ? copy.AudioZone.Shape : Dat151ZoneShape.Box; - zone.PlaybackZoneSize = cp ? copy.AudioZone.PlaybackZoneSize : Vector3.One * 10.0f; - zone.PlaybackZoneAngle = cp ? copy.AudioZone.PlaybackZoneAngle : 0; - zone.PlaybackZoneVec1 = cp ? copy.AudioZone.PlaybackZoneVec1 : Vector4.Zero; - zone.PlaybackZoneVec2 = cp ? copy.AudioZone.PlaybackZoneVec2 : new Vector4(1, 1, 1, 0); - zone.PlaybackZoneVec3 = cp ? copy.AudioZone.PlaybackZoneVec3 : Vector3.Zero; - zone.ActivationZoneSize = cp ? copy.AudioZone.ActivationZoneSize : Vector3.One * 15.0f; - zone.ActivationZoneAngle = cp ? copy.AudioZone.ActivationZoneAngle : 0; - zone.ActivationZoneVec1 = cp ? copy.AudioZone.ActivationZoneVec1 : Vector4.Zero; - zone.ActivationZoneVec2 = cp ? copy.AudioZone.ActivationZoneVec2 : new Vector4(1, 1, 1, 0); - zone.ActivationZoneVec3 = cp ? copy.AudioZone.ActivationZoneVec3 : Vector3.Zero; - zone.UnkVec1 = cp ? copy.AudioZone.UnkVec1 : new Vector4(0, 0, 1, 0); - zone.UnkVec2 = cp ? copy.AudioZone.UnkVec2 : new Vector4(1, -1, -1, 0); - zone.UnkHash0 = cp ? copy.AudioZone.UnkHash0 : 0; - zone.Scene = cp ? copy.AudioZone.Scene : 0; - zone.UnkVec3 = cp ? copy.AudioZone.UnkVec3 : new Vector2(-1, 0); - zone.Unk13 = cp ? copy.AudioZone.Unk13 : 0; - zone.Unk14 = cp ? copy.AudioZone.Unk14 : (byte)4; - zone.Unk15 = cp ? copy.AudioZone.Unk15 : (byte)1; - zone.Unk16 = cp ? copy.AudioZone.Unk16 : (byte)0; - zone.RulesCount = cp ? copy.AudioZone.RulesCount : (byte)0; - zone.Rules = cp ? copy.AudioZone.Rules : null; - zone.DependentAmbiencesCount = cp ? copy.AudioZone.DependentAmbiencesCount : 0; - zone.DependentAmbiences = cp ? copy.AudioZone.DependentAmbiences : null; - zone.Name = "zone1"; + zone.Flags = cp ? copy.AmbientZone.Flags.Value : 0xAA800424; + zone.Shape = cp ? copy.AmbientZone.Shape : Dat151ZoneShape.Box; + zone.PositioningZoneSize = cp ? copy.AmbientZone.PositioningZoneSize : Vector3.One * 10.0f; + zone.PositioningZoneRotationAngle = (ushort)(cp ? copy.AmbientZone.PositioningZoneRotationAngle : 0); + zone.PositioningZonePostRotationOffset = cp ? copy.AmbientZone.PositioningZonePostRotationOffset : Vector3.Zero; + zone.PositioningZoneSizeScale = cp ? copy.AmbientZone.PositioningZoneSizeScale : new Vector3(1, 1, 1); + zone.ActivationZoneSize = cp ? copy.AmbientZone.ActivationZoneSize : Vector3.One * 15.0f; + zone.ActivationZoneRotationAngle = (ushort)(cp ? copy.AmbientZone.ActivationZoneRotationAngle : 0); + zone.ActivationZonePostRotationOffset = cp ? copy.AmbientZone.ActivationZonePostRotationOffset : Vector3.Zero; + zone.ActivationZoneSizeScale = cp ? copy.AmbientZone.ActivationZoneSizeScale : new Vector3(1, 1, 1); + zone.BuiltUpFactor = cp ? copy.AmbientZone.BuiltUpFactor : 0; + zone.MinPedDensity = cp ? copy.AmbientZone.MinPedDensity : 0; + zone.MaxPedDensity = cp ? copy.AmbientZone.MaxPedDensity : 0; + zone.PedDensityTOD = cp ? copy.AmbientZone.PedDensityTOD : 0; + zone.PedDensityScalar = cp ? copy.AmbientZone.PedDensityScalar : 0; + zone.MaxWindInfluence = cp ? copy.AmbientZone.MaxWindInfluence : 0; + zone.MinWindInfluence = cp ? copy.AmbientZone.MinWindInfluence : 0; + zone.WindElevationSounds = cp ? copy.AmbientZone.WindElevationSounds : 0; + zone.EnvironmentRule = cp ? copy.AmbientZone.EnvironmentRule : 0; + zone.AudioScene = cp ? copy.AmbientZone.AudioScene : 0; + zone.UnderwaterCreakFactor = cp ? copy.AmbientZone.UnderwaterCreakFactor : 0; + zone.PedWallaSettings = cp ? copy.AmbientZone.PedWallaSettings : 0; + zone.RandomisedRadioSettings = cp ? copy.AmbientZone.RandomisedRadioSettings : 0; + zone.NumRulesToPlay = cp ? copy.AmbientZone.NumRulesToPlay : (byte)4; + zone.ZoneWaterCalculation = cp ? copy.AmbientZone.ZoneWaterCalculation : (byte)1; + zone.NumDirAmbiences = cp ? copy.AmbientZone.NumDirAmbiences : (byte)0; + zone.NumRules = cp ? copy.AmbientZone.NumRules : (byte)0; + zone.Rules = cp ? copy.AmbientZone.Rules : null; + zone.DirAmbiences = cp ? copy.AmbientZone.DirAmbiences : null; + zone.Name = "ambientzone1"; zone.NameHash = JenkHash.GenHash(zone.Name); var ap = new AudioPlacement(CurrentAudioFile, zone); @@ -6467,10 +6497,10 @@ namespace CodeWalker.Project { LoadProjectTree(); - ProjectExplorer?.TrySelectAudioZoneTreeNode(ap); - CurrentAudioZone = ap; + ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(ap); + CurrentAudioAmbientZone = ap; - ShowEditAudioZonePanel(false); + ShowEditAudioAmbientZonePanel(false); } if (WorldForm != null) @@ -6480,12 +6510,12 @@ namespace CodeWalker.Project return ap; } - public bool DeleteAudioZone() + public bool DeleteAudioAmbientZone() { - if (CurrentAudioZone?.RelFile != CurrentAudioFile) return false; + if (CurrentAudioAmbientZone?.RelFile != CurrentAudioFile) return false; if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. - if (CurrentAudioZone?.AudioZone == null) return false; + if (CurrentAudioAmbientZone?.AmbientZone == null) return false; //if (MessageBox.Show("Are you sure you want to delete this audio zone?\n" + CurrentAudioZone.GetNameString() + "\n" + CurrentAudioZone.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) @@ -6498,29 +6528,29 @@ namespace CodeWalker.Project { lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... { - res = CurrentAudioFile.RemoveRelData(CurrentAudioZone.AudioZone); + res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZone.AmbientZone); WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile); } } else { - res = CurrentAudioFile.RemoveRelData(CurrentAudioZone.AudioZone); + res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZone.AmbientZone); } if (!res) { MessageBox.Show("Unspecified error occurred when removing the audio zone from the file!"); } - var delzone = CurrentAudioZone; + var delzone = CurrentAudioAmbientZone; var delrel = CurrentAudioFile; - ProjectExplorer?.RemoveAudioZoneTreeNode(delzone); + ProjectExplorer?.RemoveAudioAmbientZoneTreeNode(delzone); ProjectExplorer?.SetAudioRelHasChanged(delrel, true); - ClosePanel((EditAudioZonePanel p) => { return p.CurrentZone.AudioZone == delzone.AudioZone; }); + ClosePanel((EditAudioAmbientZonePanel p) => { return p.CurrentZone.AmbientZone == delzone.AmbientZone; }); - CurrentAudioZone = null; + CurrentAudioAmbientZone = null; if (WorldForm != null) { @@ -6529,42 +6559,159 @@ namespace CodeWalker.Project return true; } - public bool IsCurrentAudioZone(AudioPlacement zone) - { - return zone == CurrentAudioZone; - } - public AudioPlacement NewAudioEmitter(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true) + public AudioPlacement NewAudioAmbientRule(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true) { if (CurrentAudioFile == null) return null; if (copy == null) { - copy = CurrentAudioEmitter; + copy = CurrentAudioAmbientRule; } bool cp = copyPosition && (copy != null); - var emitter = new Dat151AmbientRule(CurrentAudioFile); + var rule = new Dat151AmbientRule(CurrentAudioFile); - emitter.Flags0 = cp ? copy.AudioEmitter.Flags0.Value : 0xAA001100; - emitter.Flags5 = cp ? copy.AudioEmitter.Flags5.Value : 0xFFFFFFFF; - emitter.InnerRadius = cp ? copy.AudioEmitter.InnerRadius : 0.0f; - emitter.OuterRadius = cp ? copy.AudioEmitter.OuterRadius : 20.0f; - emitter.Unk01 = cp ? copy.AudioEmitter.Unk01 : 1.0f; - emitter.StartTime = cp ? copy.AudioEmitter.StartTime : (ushort)0; - emitter.EndTime = cp ? copy.AudioEmitter.EndTime : (ushort)1440; - emitter.Frequency = cp ? copy.AudioEmitter.Frequency.Value : (ushort)0; - emitter.Unk07 = cp ? copy.AudioEmitter.Unk07.Value : (ushort)0; - emitter.Unk08 = cp ? copy.AudioEmitter.Unk08.Value : (byte)0; - emitter.Unk09 = cp ? copy.AudioEmitter.Unk09.Value : (byte)1; - emitter.Unk10 = cp ? copy.AudioEmitter.Unk10.Value : (byte)1; - emitter.Unk11 = cp ? copy.AudioEmitter.Unk11.Value : (byte)1; - emitter.Unk12 = cp ? copy.AudioEmitter.Unk12.Value : (byte)100; - emitter.Unk13 = cp ? copy.AudioEmitter.Unk13.Value : (byte)3; + rule.DynamicBankID = cp ? copy.AmbientRule.DynamicBankID : 0; + rule.MinDist = cp ? copy.AmbientRule.MinDist : 0.0f; + rule.MaxDist = cp ? copy.AmbientRule.MaxDist : 20.0f; + rule.Weight = cp ? copy.AmbientRule.Weight : 1.0f; + rule.MinTimeMinutes = cp ? copy.AmbientRule.MinTimeMinutes : (ushort)0; + rule.MaxTimeMinutes = cp ? copy.AmbientRule.MaxTimeMinutes : (ushort)1440; + rule.MinRepeatTime = cp ? copy.AmbientRule.MinRepeatTime : (ushort)0; + rule.MinRepeatTimeVariance = cp ? copy.AmbientRule.MinRepeatTimeVariance : (ushort)0; + rule.SpawnHeight = cp ? copy.AmbientRule.SpawnHeight : (byte)0; + rule.ExplicitSpawn = cp ? copy.AmbientRule.ExplicitSpawn : Dat151AmbientRule.ExplicitSpawnType.WorldRelative; + rule.MaxLocalInstances = cp ? copy.AmbientRule.MaxLocalInstances : (byte)1; + rule.MaxGlobalInstances = cp ? copy.AmbientRule.MaxGlobalInstances : (byte)1; + rule.BlockabilityFactor = cp ? copy.AmbientRule.BlockabilityFactor : (byte)100; + rule.MaxPathDepth = cp ? copy.AmbientRule.MaxPathDepth : (byte)3; - emitter.Name = "emitter1"; + rule.Name = "ambientrule1"; + rule.NameHash = JenkHash.GenHash(rule.Name); + + var ap = new AudioPlacement(CurrentAudioFile, rule); + ap.Name = rule.Name; + ap.NameHash = rule.NameHash; + + Vector3 pos = cp ? copy.Position : GetSpawnPos(20.0f); + Quaternion ori = cp ? copy.Orientation : Quaternion.Identity; + ap.SetPosition(pos); + ap.SetOrientation(ori); + + + CurrentAudioFile.AddRelData(rule); + + if (selectNew) + { + LoadProjectTree(); + + ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(ap); + CurrentAudioAmbientRule = ap; + + ShowEditAudioAmbientRulePanel(false); + } + + if (WorldForm != null) + { + WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile); + } + + return ap; + } + public bool DeleteAudioAmbientRule() + { + if (CurrentAudioAmbientRule?.RelFile != CurrentAudioFile) return false; + if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. + if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. + if (CurrentAudioAmbientRule?.AmbientRule == null) return false; + + + //if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioEmitter.GetNameString() + "\n" + CurrentAudioEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) + //{ + // return true; + //} + + bool res = false; + if (WorldForm != null) + { + lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + { + res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientRule.AmbientRule); + + WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile); + } + } + else + { + res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientRule.AmbientRule); + } + if (!res) + { + MessageBox.Show("Unspecified error occurred when removing the audio rule from the file!"); + } + + var delem = CurrentAudioAmbientRule; + var delrel = CurrentAudioFile; + + ProjectExplorer?.RemoveAudioAmbientRuleTreeNode(delem); + ProjectExplorer?.SetAudioRelHasChanged(delrel, true); + + CurrentAudioAmbientRule = null; + + ClosePanel((EditAudioAmbientRulePanel p) => { return p.CurrentRule.AmbientRule == delem.AmbientRule; }); + + + if (WorldForm != null) + { + WorldForm.SelectItem(null); + } + + return true; + } + + public AudioPlacement NewAudioStaticEmitter(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true) + { + if (CurrentAudioFile == null) return null; + + if (copy == null) + { + copy = CurrentAudioStaticEmitter; + } + + bool cp = copyPosition && (copy != null); + + var emitter = new Dat151StaticEmitter(CurrentAudioFile); + + emitter.Flags = cp ? copy.StaticEmitter.Flags : 0; + emitter.ChildSound = cp ? copy.StaticEmitter.ChildSound : 0; + emitter.RadioStation = cp ? copy.StaticEmitter.RadioStation : 0; + emitter.MinDistance = cp ? copy.StaticEmitter.MinDistance : 0.0f; + emitter.MaxDistance = cp ? copy.StaticEmitter.MaxDistance : 20.0f; + emitter.EmittedVolume = cp ? copy.StaticEmitter.EmittedVolume : 0; + emitter.LPFCutoff = cp ? copy.StaticEmitter.LPFCutoff : (ushort)0; + emitter.HPFCutoff = cp ? copy.StaticEmitter.HPFCutoff : (ushort)0; + emitter.RolloffFactor = cp ? copy.StaticEmitter.RolloffFactor : (ushort)0; + emitter.Interior = cp ? copy.StaticEmitter.Interior : 0; + emitter.Room = cp ? copy.StaticEmitter.Room : 0; + emitter.RadioStationForScore = cp ? copy.StaticEmitter.RadioStationForScore : 0; + emitter.MaxLeakage = cp ? copy.StaticEmitter.MaxLeakage : 1.0f; + emitter.MinLeakageDistance = cp ? copy.StaticEmitter.MinLeakageDistance : (ushort)0; + emitter.MaxLeakageDistance = cp ? copy.StaticEmitter.MaxLeakageDistance : (ushort)0; + emitter.Alarm = cp ? copy.StaticEmitter.Alarm : 0; + emitter.OnBreakOneShot = cp ? copy.StaticEmitter.OnBreakOneShot : 0; + emitter.MaxPathDepth = cp ? copy.StaticEmitter.MaxPathDepth : (byte)3; + emitter.SmallReverbSend = cp ? copy.StaticEmitter.SmallReverbSend : (byte)0; + emitter.MediumReverbSend = cp ? copy.StaticEmitter.MediumReverbSend : (byte)0; + emitter.LargeReverbSend = cp ? copy.StaticEmitter.LargeReverbSend : (byte)0; + emitter.MinTimeMinutes = cp ? copy.StaticEmitter.MinTimeMinutes : (ushort)0; + emitter.MaxTimeMinutes = cp ? copy.StaticEmitter.MaxTimeMinutes : (ushort)1440; + emitter.BrokenHealth = cp ? copy.StaticEmitter.BrokenHealth : 0.0f; + emitter.UndamagedHealth = cp ? copy.StaticEmitter.UndamagedHealth : 0.0f; + + emitter.Name = "staticemitter1"; emitter.NameHash = JenkHash.GenHash(emitter.Name); var ap = new AudioPlacement(CurrentAudioFile, emitter); @@ -6583,10 +6730,10 @@ namespace CodeWalker.Project { LoadProjectTree(); - ProjectExplorer?.TrySelectAudioEmitterTreeNode(ap); - CurrentAudioEmitter = ap; + ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(ap); + CurrentAudioStaticEmitter = ap; - ShowEditAudioEmitterPanel(false); + ShowEditAudioStaticEmitterPanel(false); } if (WorldForm != null) @@ -6596,15 +6743,15 @@ namespace CodeWalker.Project return ap; } - public bool DeleteAudioEmitter() + public bool DeleteAudioStaticEmitter() { - if (CurrentAudioEmitter?.RelFile != CurrentAudioFile) return false; + if (CurrentAudioStaticEmitter?.RelFile != CurrentAudioFile) return false; if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. - if (CurrentAudioEmitter?.AudioEmitter == null) return false; + if (CurrentAudioStaticEmitter?.StaticEmitter == null) return false; - //if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioEmitter.GetNameString() + "\n" + CurrentAudioEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) + //if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioStaticEmitter.GetNameString() + "\n" + CurrentAudioStaticEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) //{ // return true; //} @@ -6614,29 +6761,29 @@ namespace CodeWalker.Project { lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... { - res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitter.AudioEmitter); + res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitter.StaticEmitter); WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile); } } else { - res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitter.AudioEmitter); + res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitter.StaticEmitter); } if (!res) { - MessageBox.Show("Unspecified error occurred when removing the audio emitter from the file!"); + MessageBox.Show("Unspecified error occurred when removing the static emitter from the file!"); } - var delem = CurrentAudioEmitter; + var delem = CurrentAudioStaticEmitter; var delrel = CurrentAudioFile; - ProjectExplorer?.RemoveAudioEmitterTreeNode(delem); + ProjectExplorer?.RemoveAudioStaticEmitterTreeNode(delem); ProjectExplorer?.SetAudioRelHasChanged(delrel, true); - CurrentAudioEmitter = null; + CurrentAudioStaticEmitter = null; - ClosePanel((EditAudioEmitterPanel p) => { return p.CurrentEmitter.AudioEmitter == delem.AudioEmitter; }); + ClosePanel((EditAudioStaticEmitterPanel p) => { return p.CurrentEmitter.StaticEmitter == delem.StaticEmitter; }); if (WorldForm != null) @@ -6646,12 +6793,8 @@ namespace CodeWalker.Project return true; } - public bool IsCurrentAudioEmitter(AudioPlacement emitter) - { - return emitter == CurrentAudioEmitter; - } - public void NewAudioZoneList() + public void NewAudioAmbientZoneList() { if (CurrentAudioFile == null) return; @@ -6665,14 +6808,14 @@ namespace CodeWalker.Project LoadProjectTree(); - ProjectExplorer?.TrySelectAudioZoneListTreeNode(zonelist); - CurrentAudioZoneList = zonelist; + ProjectExplorer?.TrySelectAudioAmbientZoneListTreeNode(zonelist); + CurrentAudioAmbientZoneList = zonelist; - ShowEditAudioZoneListPanel(false); + ShowEditAudioAmbientZoneListPanel(false); } - public bool DeleteAudioZoneList() + public bool DeleteAudioAmbientZoneList() { - if (CurrentAudioZoneList?.Rel != CurrentAudioFile) return false; + if (CurrentAudioAmbientZoneList?.Rel != CurrentAudioFile) return false; if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. @@ -6687,37 +6830,33 @@ namespace CodeWalker.Project { lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... { - res = CurrentAudioFile.RemoveRelData(CurrentAudioZoneList); + res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZoneList); //WorldForm.SelectItem(null, null, null); } } else { - res = CurrentAudioFile.RemoveRelData(CurrentAudioZoneList); + res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZoneList); } if (!res) { MessageBox.Show("Unspecified error occurred when removing the audio zone list from the file!"); } - var delzl = CurrentAudioZoneList; + var delzl = CurrentAudioAmbientZoneList; var delrel = CurrentAudioFile; - ProjectExplorer?.RemoveAudioZoneListTreeNode(delzl); + ProjectExplorer?.RemoveAudioAmbientZoneListTreeNode(delzl); ProjectExplorer?.SetAudioRelHasChanged(delrel, true); - ClosePanel((EditAudioZoneListPanel p) => { return p.Tag == delzl; }); + ClosePanel((EditAudioAmbientZoneListPanel p) => { return p.Tag == delzl; }); - CurrentAudioZoneList = null; + CurrentAudioAmbientZoneList = null; return true; } - public bool IsCurrentAudioZoneList(Dat151AmbientZoneList list) - { - return list == CurrentAudioZoneList; - } - public void NewAudioEmitterList() + public void NewAudioStaticEmitterList() { if (CurrentAudioFile == null) return; @@ -6732,14 +6871,14 @@ namespace CodeWalker.Project LoadProjectTree(); - ProjectExplorer?.TrySelectAudioEmitterListTreeNode(emlist); - CurrentAudioEmitterList = emlist; + ProjectExplorer?.TrySelectAudioStaticEmitterListTreeNode(emlist); + CurrentAudioStaticEmitterList = emlist; - ShowEditAudioEmitterListPanel(false); + ShowEditAudioStaticEmitterListPanel(false); } - public bool DeleteAudioEmitterList() + public bool DeleteAudioStaticEmitterList() { - if (CurrentAudioEmitterList?.Rel != CurrentAudioFile) return false; + if (CurrentAudioStaticEmitterList?.Rel != CurrentAudioFile) return false; if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete.. if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete.. @@ -6754,48 +6893,44 @@ namespace CodeWalker.Project { lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... { - res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitterList); + res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitterList); //WorldForm.SelectItem(null, null, null); } } else { - res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitterList); + res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitterList); } if (!res) { MessageBox.Show("Unspecified error occurred when removing the audio emitter list from the file!"); } - var delel = CurrentAudioEmitterList; + var delel = CurrentAudioStaticEmitterList; var delrel = CurrentAudioFile; - ProjectExplorer?.RemoveAudioEmitterListTreeNode(delel); + ProjectExplorer?.RemoveAudioStaticEmitterListTreeNode(delel); ProjectExplorer?.SetAudioRelHasChanged(delrel, true); - ClosePanel((EditAudioEmitterListPanel p) => { return p.Tag == delel; }); + ClosePanel((EditAudioStaticEmitterListPanel p) => { return p.Tag == delel; }); - CurrentAudioEmitterList = null; + CurrentAudioStaticEmitterList = null; return true; } - public bool IsCurrentAudioEmitterList(Dat151StaticEmitterList list) - { - return list == CurrentAudioEmitterList; - } public void NewAudioInterior() { if (CurrentAudioFile == null) return; - var interior = new Dat151Interior(CurrentAudioFile); + var interior = new Dat151InteriorSettings(CurrentAudioFile); interior.Name = "interior1"; interior.NameHash = JenkHash.GenHash(interior.Name); interior.Flags = 0xAAAAA844; - interior.Walla = 3565506855; - interior.Tunnel = (uint)MetaName.null_sound; + interior.InteriorWallaSoundSet = 3565506855; + interior.InteriorReflections = (uint)MetaName.null_sound; CurrentAudioFile.AddRelData(interior); @@ -6848,10 +6983,6 @@ namespace CodeWalker.Project return true; } - public bool IsCurrentAudioInterior(Dat151Interior interior) - { - return interior == CurrentAudioInterior; - } public void NewAudioInteriorRoom() { @@ -6863,9 +6994,9 @@ namespace CodeWalker.Project room.Name = "room1"; room.NameHash = JenkHash.GenHash(room.Name); - room.Flags0 = 0xAAAAAAAA; - room.Sound = (uint)MetaName.null_sound; - room.SoundSet = 3565506855;//? + room.Flags = 0xAAAAAAAA; + room.RoomToneSound = (uint)MetaName.null_sound; + room.InteriorWallaSoundSet = 3565506855;//? CurrentAudioFile.AddRelData(room); @@ -6919,10 +7050,6 @@ namespace CodeWalker.Project return true; } - public bool IsCurrentAudioInteriorRoom(Dat151InteriorRoom room) - { - return room == CurrentAudioInteriorRoom; - } @@ -7639,13 +7766,17 @@ namespace CodeWalker.Project } else if (AudioFileExistsInProject(audiofile)) { - if ((audiopl?.AudioZone != null) && (wasmult || (audiopl != CurrentAudioZone))) + if ((audiopl?.AmbientZone != null) && (wasmult || (audiopl != CurrentAudioAmbientZone))) { - ProjectExplorer?.TrySelectAudioZoneTreeNode(audiopl); + ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(audiopl); } - if ((audiopl?.AudioEmitter != null) && (wasmult || (audiopl != CurrentAudioEmitter))) + if ((audiopl?.AmbientRule != null) && (wasmult || (audiopl != CurrentAudioAmbientRule))) { - ProjectExplorer?.TrySelectAudioEmitterTreeNode(audiopl); + ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(audiopl); + } + if ((audiopl?.StaticEmitter != null) && (wasmult || (audiopl != CurrentAudioStaticEmitter))) + { + ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(audiopl); } } else @@ -7685,10 +7816,11 @@ namespace CodeWalker.Project CurrentScenarioNode = scenariond; CurrentScenarioChainEdge = scenarioedge; CurrentAudioFile = audiofile; - CurrentAudioZone = (audiopl?.AudioZone != null) ? audiopl : null; - CurrentAudioEmitter = (audiopl?.AudioEmitter != null) ? audiopl : null; - CurrentAudioZoneList = null; - CurrentAudioEmitterList = null; + CurrentAudioAmbientZone = (audiopl?.AmbientZone != null) ? audiopl : null; + CurrentAudioAmbientRule = (audiopl?.AmbientRule != null) ? audiopl : null; + CurrentAudioStaticEmitter = (audiopl?.StaticEmitter != null) ? audiopl : null; + CurrentAudioAmbientZoneList = null; + CurrentAudioStaticEmitterList = null; CurrentYdrFile = null; CurrentYddFile = null; CurrentYftFile = null; @@ -8348,37 +8480,54 @@ namespace CodeWalker.Project { audio.RelFile.HasChanged = true; AddAudioFileToProject(audio.RelFile); - if (audio.AudioZone != null) + if (audio.AmbientZone != null) { - ProjectExplorer?.TrySelectAudioZoneTreeNode(audio); + ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(audio); } - if (audio.AudioEmitter != null) + if (audio.AmbientRule != null) { - ProjectExplorer?.TrySelectAudioEmitterTreeNode(audio); + ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(audio); + } + if (audio.StaticEmitter != null) + { + ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(audio); } } - if ((audio.AudioZone != null) && (audio != CurrentAudioZone)) + if ((audio.AmbientZone != null) && (audio != CurrentAudioAmbientZone)) { - CurrentAudioZone = audio; - ProjectExplorer?.TrySelectAudioZoneTreeNode(audio); + CurrentAudioAmbientZone = audio; + ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(audio); } - if ((audio.AudioEmitter != null) && (audio != CurrentAudioEmitter)) + if ((audio.AmbientRule != null) && (audio != CurrentAudioAmbientRule)) { - CurrentAudioEmitter = audio; - ProjectExplorer?.TrySelectAudioEmitterTreeNode(audio); + CurrentAudioAmbientRule = audio; + ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(audio); } - if (audio == CurrentAudioZone) + if ((audio.StaticEmitter != null) && (audio != CurrentAudioStaticEmitter)) { - ShowEditAudioZonePanel(false); + CurrentAudioStaticEmitter = audio; + ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(audio); + } + if (audio == CurrentAudioAmbientZone) + { + ShowEditAudioAmbientZonePanel(false); if (audio.RelFile != null) { SetAudioFileHasChanged(true); } } - else if (audio == CurrentAudioEmitter) + else if (audio == CurrentAudioAmbientRule) { - ShowEditAudioEmitterPanel(false); + ShowEditAudioAmbientRulePanel(false); + if (audio.RelFile != null) + { + SetAudioFileHasChanged(true); + } + } + else if (audio == CurrentAudioStaticEmitter) + { + ShowEditAudioStaticEmitterPanel(false); if (audio.RelFile != null) { SetAudioFileHasChanged(true); @@ -9030,8 +9179,9 @@ namespace CodeWalker.Project bool enable = (CurrentAudioFile != null); bool inproj = AudioFileExistsInProject(CurrentAudioFile); - AudioNewAmbientEmitterMenu.Enabled = enable && inproj; - AudioNewAmbientEmitterListMenu.Enabled = enable && inproj; + AudioNewAmbientRuleMenu.Enabled = enable && inproj; + AudioNewStaticEmitterMenu.Enabled = enable && inproj; + AudioNewStaticEmitterListMenu.Enabled = enable && inproj; AudioNewAmbientZoneMenu.Enabled = enable && inproj; AudioNewAmbientZoneListMenu.Enabled = enable && inproj; AudioNewInteriorMenu.Enabled = enable && inproj; @@ -9596,21 +9746,25 @@ namespace CodeWalker.Project RemoveScenarioFromProject(); } - private void AudioNewAmbientEmitterMenu_Click(object sender, EventArgs e) + private void AudioNewAmbientRuleMenu_Click(object sender, EventArgs e) { - NewAudioEmitter(); + NewAudioAmbientRule(); } - private void AudioNewAmbientEmitterListMenu_Click(object sender, EventArgs e) + private void AudioNewStaticEmitterMenu_Click(object sender, EventArgs e) { - NewAudioEmitterList(); + NewAudioStaticEmitter(); + } + private void AudioNewStaticEmitterListMenu_Click(object sender, EventArgs e) + { + NewAudioStaticEmitterList(); } private void AudioNewAmbientZoneMenu_Click(object sender, EventArgs e) { - NewAudioZone(); + NewAudioAmbientZone(); } private void AudioNewAmbientZoneListMenu_Click(object sender, EventArgs e) { - NewAudioZoneList(); + NewAudioAmbientZoneList(); } private void AudioNewInteriorMenu_Click(object sender, EventArgs e) { diff --git a/CodeWalker/World/MapSelection.cs b/CodeWalker/World/MapSelection.cs index d80f2a1..2f48711 100644 --- a/CodeWalker/World/MapSelection.cs +++ b/CodeWalker/World/MapSelection.cs @@ -938,8 +938,9 @@ namespace CodeWalker else if (NavPortal != null) return true; else if (TrainTrackNode != null) return true; else if (ScenarioNode != null) return true; - else if (Audio?.AudioZone != null) return true; - else if (Audio?.AudioEmitter != null) return true; + else if (Audio?.AmbientZone != null) return true; + else if (Audio?.AmbientRule != null) return true; + else if (Audio?.StaticEmitter != null) return true; return false; } } @@ -1491,8 +1492,9 @@ namespace CodeWalker else if (NavPortal != null) return NavPortal; else if (TrainTrackNode != null) return TrainTrackNode; else if (ScenarioNode != null) return ScenarioNode; - else if (Audio?.AudioZone != null) return Audio; - else if (Audio?.AudioEmitter != null) return Audio; + else if (Audio?.AmbientZone != null) return Audio; + else if (Audio?.AmbientRule != null) return Audio; + else if (Audio?.StaticEmitter != null) return Audio; return null; } diff --git a/CodeWalker/WorldForm.cs b/CodeWalker/WorldForm.cs index daea2bf..5378da4 100644 --- a/CodeWalker/WorldForm.cs +++ b/CodeWalker/WorldForm.cs @@ -5216,7 +5216,7 @@ namespace CodeWalker case MapSelectionMode.NavMesh: ProjectForm.NewNavPoly(); break; //.NewNavPoint/.NewNavPortal//how to add points/portals? project window case MapSelectionMode.TrainTrack: ProjectForm.NewTrainNode(); break; case MapSelectionMode.Scenario: ProjectForm.NewScenarioNode(); break; //how to add different node types? project window - case MapSelectionMode.Audio: ProjectForm.NewAudioZone(); break; //.NewAudioEmitter // how to add emitters as well? project window + case MapSelectionMode.Audio: ProjectForm.NewAudioAmbientZone(); break; //.NewAudioEmitter // how to add emitters as well? project window } } private void CopyItem() @@ -5274,8 +5274,9 @@ namespace CodeWalker else if (item.NavPortal != null) DeleteNavPortal(item.NavPortal); else if (item.TrainTrackNode != null) DeleteTrainNode(item.TrainTrackNode); else if (item.ScenarioNode != null) DeleteScenarioNode(item.ScenarioNode); - else if (item.Audio?.AudioZone != null) DeleteAudioZone(item.Audio); - else if (item.Audio?.AudioEmitter != null) DeleteAudioEmitter(item.Audio); + else if (item.Audio?.AmbientZone != null) DeleteAudioAmbientZone(item.Audio); + else if (item.Audio?.AmbientRule != null) DeleteAudioAmbientRule(item.Audio); + else if (item.Audio?.StaticEmitter != null) DeleteAudioStaticEmitter(item.Audio); } private void DeleteEntity(YmapEntityDef ent) { @@ -5478,30 +5479,45 @@ namespace CodeWalker SelectItem(null); } } - private void DeleteAudioZone(AudioPlacement audio) + private void DeleteAudioAmbientZone(AudioPlacement audio) { if (audio == null) return; //project not open, or zone not selected there, just remove the zone from the rel... var rel = audio.RelFile; - if (!rel.RemoveRelData(audio.AudioZone)) + if (!rel.RemoveRelData(audio.AmbientZone)) { - MessageBox.Show("Unable to remove audio zone. Audio zone editing TODO!"); + MessageBox.Show("Unable to remove audio ambient zone."); } else { SelectItem(null); } } - private void DeleteAudioEmitter(AudioPlacement audio) + private void DeleteAudioAmbientRule(AudioPlacement audio) { if (audio == null) return; - //project not open, or zone not selected there, just remove the zone from the rel... + //project not open, or rule not selected there, just remove the rule from the rel... var rel = audio.RelFile; - if (!rel.RemoveRelData(audio.AudioEmitter)) + if (!rel.RemoveRelData(audio.AmbientRule)) { - MessageBox.Show("Unable to remove audio emitter. Audio zone editing TODO!"); + MessageBox.Show("Unable to remove audio ambient rule."); + } + else + { + SelectItem(null); + } + } + private void DeleteAudioStaticEmitter(AudioPlacement audio) + { + if (audio == null) return; + + //project not open, or emitter not selected there, just remove the emitter from the rel... + var rel = audio.RelFile; + if (!rel.RemoveRelData(audio.StaticEmitter)) + { + MessageBox.Show("Unable to remove audio static emitter."); } else {