diff --git a/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetEditing.cs b/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetEditing.cs index 481f4fe8..c6861d01 100644 --- a/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetEditing.cs +++ b/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetEditing.cs @@ -752,15 +752,15 @@ public void ApplyScale(Vector3 factor) if (a is AssetMVPT MVPT) { - if (MVPT.MovementRadius != -1) - MVPT.MovementRadius *= singleFactor; - if (MVPT.DistanceICanSeeYou != -1) - MVPT.DistanceICanSeeYou *= singleFactor; + if (MVPT.ZoneRadius != -1) + MVPT.ZoneRadius *= singleFactor; + if (MVPT.ArenaRadius != -1) + MVPT.ArenaRadius *= singleFactor; } else if (a is AssetSFX SFX) { - SFX.RadiusMax *= singleFactor; - SFX.RadiusMin *= singleFactor; + SFX.OuterRadius *= singleFactor; + SFX.InnerRadius *= singleFactor; } else if (a is PlaceableAsset placeable && !(a is AssetPLYR || a is AssetPKUP || a is AssetUI || a is AssetUIFT || a is AssetVIL || (a is AssetDYNA DYNA && DYNA.Type == DynaType.game_object__Teleport))) { diff --git a/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetTemplates.cs b/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetTemplates.cs index c612fada..4f5ea7df 100644 --- a/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetTemplates.cs +++ b/IndustrialPark/ArchiveEditor/ArchiveEditorFunctions_AssetTemplates.cs @@ -163,6 +163,9 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re case AssetTemplate.PowerCrystal: newAssetType = AssetType.PKUP; break; + case AssetTemplate.Pendulum_Generic: + newAssetType = AssetType.PEND; + break; case AssetTemplate.Platform_Generic: case AssetTemplate.TexasHitch_PLAT: case AssetTemplate.HoveringPlatform: @@ -224,6 +227,8 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re case AssetTemplate.GLove: case AssetTemplate.Chuck: case AssetTemplate.Monsoon: + case AssetTemplate.Arf: + case AssetTemplate.ArfDog: case AssetTemplate.Sleepytime: case AssetTemplate.Sleepytime_Moving: case AssetTemplate.BombBot: @@ -293,161 +298,161 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re case AssetTemplate.Shiny_Red: ((AssetPKUP)asset).Shape = 0x3E; ((AssetPKUP)asset).PickReferenceID = 0x7C8AC53E; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Shiny_Yellow: ((AssetPKUP)asset).Shape = 0x3B; ((AssetPKUP)asset).PickReferenceID = 0xB3D6283B; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Shiny_Green: ((AssetPKUP)asset).Shape = 0x34; ((AssetPKUP)asset).PickReferenceID = 0x079A0734; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Shiny_Blue: ((AssetPKUP)asset).Shape = 0x81; ((AssetPKUP)asset).PickReferenceID = 0x6D4A4181; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Shiny_Purple: ((AssetPKUP)asset).Shape = 0xCB; ((AssetPKUP)asset).PickReferenceID = 0xFA607BCB; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Underwear: ((AssetPKUP)asset).Shape = 0x13; ((AssetPKUP)asset).PickReferenceID = 0x28F55613; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Spatula: ((AssetPKUP)asset).StateIsPersistent = true; ((AssetPKUP)asset).Shape = 0xDD; ((AssetPKUP)asset).PickReferenceID = 0x8BDFE8DD; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Sock: ((AssetPKUP)asset).StateIsPersistent = true; ((AssetPKUP)asset).Shape = 0x24; ((AssetPKUP)asset).PickReferenceID = 0x74B46F24; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Spongeball: ((AssetPKUP)asset).Shape = 0x15; ((AssetPKUP)asset).PickReferenceID = 0xF09A1415; - ((AssetPKUP)asset).UnknownShort58 = 3; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 3; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Golden_Underwear: ((AssetPKUP)asset).StateIsPersistent = true; ((AssetPKUP)asset).Shape = 0x2E; ((AssetPKUP)asset).PickReferenceID = 0xF650DA2E; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Artwork: ((AssetPKUP)asset).StateIsPersistent = true; ((AssetPKUP)asset).Shape = 0x10; ((AssetPKUP)asset).PickReferenceID = 0x18140B10; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.SteeringWheel: ((AssetPKUP)asset).StateIsPersistent = true; ((AssetPKUP)asset).Shape = 0x32; ((AssetPKUP)asset).PickReferenceID = 0x4C67C832; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.PowerCrystal: ((AssetPKUP)asset).StateIsPersistent = true; ((AssetPKUP)asset).Shape = 0xBB; ((AssetPKUP)asset).PickReferenceID = 0xFE7A89BB; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.Smelly_Sundae: ((AssetPKUP)asset).Shape = 0x54; ((AssetPKUP)asset).PickReferenceID = 0x6A779454; - ((AssetPKUP)asset).UnknownShort58 = 2; - ((AssetPKUP)asset).UnknownShort5A = 4; + ((AssetPKUP)asset).PickupFlags = 2; + ((AssetPKUP)asset).PickupValue = 4; ((AssetPKUP)asset).PositionY += 0.5f; break; case AssetTemplate.WoodenTiki: - ((AssetVIL)asset).ModelAssetID = "tiki_wooden_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tiki_wooden_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tiki_wooden_bind; break; case AssetTemplate.FloatingTiki: - ((AssetVIL)asset).ModelAssetID = "tiki_lovey_dovey_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tiki_lovey_dovey_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tiki_lovey_dovey_bind; break; case AssetTemplate.ThunderTiki: - ((AssetVIL)asset).ModelAssetID = "tiki_thunder_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tiki_thunder_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tiki_thunder_bind; break; case AssetTemplate.ShhhTiki: - ((AssetVIL)asset).ModelAssetID = "tiki_shhhh_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tiki_shhhh_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tiki_shhhh_bind; break; case AssetTemplate.StoneTiki: - ((AssetVIL)asset).ModelAssetID = "tiki_stone_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tiki_stone_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tiki_stone_bind; break; case AssetTemplate.Fodder: - ((AssetVIL)asset).ModelAssetID = "robot_0a_fodder_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_0a_fodder_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_0a_fodder_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Hammer: - ((AssetVIL)asset).ModelAssetID = "ham_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "ham_bind.MINF"; ((AssetVIL)asset).VilType = VilType.ham_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.TarTar: - ((AssetVIL)asset).ModelAssetID = "robot_tar_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_tar_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_tar_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.ChompBot: - ((AssetVIL)asset).ModelAssetID = "robot_0a_chomper_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_0a_chomper_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_0a_chomper_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.GLove: - ((AssetVIL)asset).ModelAssetID = "g_love_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "g_love_bind.MINF"; ((AssetVIL)asset).VilType = VilType.g_love_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Chuck: - ((AssetVIL)asset).ModelAssetID = "robot_chuck_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_chuck_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_chuck_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Chuck_Trigger: - ((AssetVIL)asset).ModelAssetID = "robot_chuck_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_chuck_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_chuck_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); ((AssetVIL)asset).EventsBFBB = new AssetEventBFBB[] { new AssetEventBFBB { @@ -478,14 +483,14 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re break; case AssetTemplate.Monsoon: - ((AssetVIL)asset).ModelAssetID = "robot_4a_monsoon_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_4a_monsoon_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_4a_monsoon_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Monsoon_Trigger: - ((AssetVIL)asset).ModelAssetID = "robot_4a_monsoon_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_4a_monsoon_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_4a_monsoon_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); ((AssetVIL)asset).EventsBFBB = new AssetEventBFBB[] { new AssetEventBFBB { @@ -517,18 +522,18 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re break; case AssetTemplate.Sleepytime_Moving: - ((AssetVIL)asset).ModelAssetID = "robot_sleepy-time_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_sleepy-time_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_sleepytime_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Sleepytime: - ((AssetVIL)asset).ModelAssetID = "robot_sleepy-time_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_sleepy-time_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_sleepytime_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); - ((AssetMVPT)GetFromAssetID(((AssetVIL)asset).AssetID_MVPT)).MovementRadius = -1; + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetMVPT)GetFromAssetID(((AssetVIL)asset).MovePoint_AssetID)).ZoneRadius = -1; break; case AssetTemplate.Arf: - ((AssetVIL)asset).ModelAssetID = "robot_arf_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_arf_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_arf_bind; ((AssetVIL)asset).EventsBFBB = new AssetEventBFBB[] { new AssetEventBFBB @@ -555,18 +560,18 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re }; break; case AssetTemplate.ArfDog: - ((AssetVIL)asset).ModelAssetID = "robot_arf_dog_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_arf_dog_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_arf_dog_bind; break; case AssetTemplate.BombBot: - ((AssetVIL)asset).ModelAssetID = "robot_0a_bomb_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_0a_bomb_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_0a_bomb_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Tubelet: - ((AssetVIL)asset).ModelAssetID = "tubelet_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tubelet_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tubelet_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); ((AssetVIL)asset).EventsBFBB = new AssetEventBFBB[] { new AssetEventBFBB { @@ -585,23 +590,23 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re }; break; case AssetTemplate.TubeletSlave: - ((AssetVIL)asset).ModelAssetID = "tubelet_slave_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "tubelet_slave_bind.MINF"; ((AssetVIL)asset).VilType = VilType.tubelet_slave_bind; break; case AssetTemplate.BzztBot: - ((AssetVIL)asset).ModelAssetID = "robot_0a_bzzt_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_0a_bzzt_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_0a_bzzt_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Slick: - ((AssetVIL)asset).ModelAssetID = "robot_9a_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_9a_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_9a_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Slick_Trigger: - ((AssetVIL)asset).ModelAssetID = "robot_9a_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "robot_9a_bind.MINF"; ((AssetVIL)asset).VilType = VilType.robot_9a_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); ((AssetVIL)asset).EventsBFBB = new AssetEventBFBB[] { new AssetEventBFBB { @@ -633,19 +638,19 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re break; case AssetTemplate.Jellyfish_Pink: - ((AssetVIL)asset).ModelAssetID = "jellyfish_pink_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "jellyfish_pink_bind.MINF"; ((AssetVIL)asset).VilType = VilType.jellyfish_pink_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Jellyfish_Blue: - ((AssetVIL)asset).ModelAssetID = "jellyfish_blue_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "jellyfish_blue_bind.MINF"; ((AssetVIL)asset).VilType = VilType.jellyfish_blue_bind; - ((AssetVIL)asset).AssetID_MVPT = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); + ((AssetVIL)asset).MovePoint_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_MP", AssetTemplate.EnemyAreaMVPT); break; case AssetTemplate.Duplicatotron: - ((AssetVIL)asset).ModelAssetID = "duplicatotron1000_bind.MINF"; + ((AssetVIL)asset).Model_AssetID = "duplicatotron1000_bind.MINF"; ((AssetVIL)asset).VilType = VilType.duplicatotron1000_bind; - ((AssetVIL)asset).AssetID_DYNA_NPCSettings = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_SETTINGS", AssetTemplate.DuplicatotronSettings); + ((AssetVIL)asset).NPCSettings_AssetID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_SETTINGS", AssetTemplate.DuplicatotronSettings); ((AssetVIL)asset).EventsBFBB = new AssetEventBFBB[] { new AssetEventBFBB { @@ -662,19 +667,19 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re ((AssetDYNA)asset).Type = DynaType.game_object__NPCSettings; ((AssetDYNA)asset).DynaBase = new DynaNPCSettings() { - Flags1 = 1, - Flags4 = 1, - Flags5 = 1, - Flags10 = 1, - Flags11 = 1, - Flags12 = 1, - DuploSpawnRate = 1f, - DuploEnemyLimit = -1 + AllowDetect = 1, + ReduceCollide = 1, + UseNavSplines = 1, + AllowAttack = 1, + AssumeLOS = 1, + AssumeFOV = 1, + DuploSpawnDelay = 1f, + DuploSpawnLifeMax = -1 }; break; case AssetTemplate.Button_Red: - ((AssetBUTN)asset).ModelAssetID = "button"; - ((AssetBUTN)asset).PressedModelAssetID = "button_grn"; + ((AssetBUTN)asset).Model_AssetID = "button"; + ((AssetBUTN)asset).PressedModel_AssetID = "button_grn"; ((AssetBUTN)asset).UnknownByte6C = 4; ((AssetBUTN)asset).UnknownByte6F = 4; ((AssetBUTN)asset).UnknownByte70 = 2; @@ -692,9 +697,9 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re ((AssetBUTN)asset).SandyMelee = true; break; case AssetTemplate.PressurePlate: - ((AssetBUTN)asset).ButtonType = AssetBUTN.ButnHitMode.PressurePlate; - ((AssetBUTN)asset).ModelAssetID = "plate_pressure"; - ((AssetBUTN)asset).PressedModelAssetID = 0xCE7F8131; + ((AssetBUTN)asset).ActMethod = AssetBUTN.ButnActMethod.PressurePlate; + ((AssetBUTN)asset).Model_AssetID = "plate_pressure"; + ((AssetBUTN)asset).PressedModel_AssetID = 0xCE7F8131; ((AssetBUTN)asset).UnknownByte6C = 4; ((AssetBUTN)asset).UnknownByte6F = 4; ((AssetBUTN)asset).UnknownByte70 = 2; @@ -710,47 +715,45 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "_BASE", AssetTemplate.PressurePlateBase); break; case AssetTemplate.PressurePlateBase: - ((AssetSIMP)asset).ModelAssetID = "plate_pressure_base"; + ((AssetSIMP)asset).Model_AssetID = "plate_pressure_base"; break; case AssetTemplate.TaxiStand: - ((AssetSIMP)asset).ModelAssetID = "taxi_stand"; + ((AssetSIMP)asset).Model_AssetID = "taxi_stand"; break; case AssetTemplate.TexasHitch: - ((AssetSIMP)asset).ModelAssetID = "trailer_hitch"; + ((AssetSIMP)asset).Model_AssetID = "trailer_hitch"; break; case AssetTemplate.TexasHitch_PLAT: - ((AssetPLAT)asset).ModelAssetID = "trailer_hitch"; + ((AssetPLAT)asset).Model_AssetID = "trailer_hitch"; ((AssetPLAT)asset).UnknownByte_90 = 4; break; case AssetTemplate.EnemyAreaMVPT: ((AssetMVPT)asset).PositionX = position.X; ((AssetMVPT)asset).PositionY = position.Y; ((AssetMVPT)asset).PositionZ = position.Z; - ((AssetMVPT)asset).Flag14 = 0x27; - ((AssetMVPT)asset).Flag15 = 0x10; - ((AssetMVPT)asset).Flag16 = 0x01; - ((AssetMVPT)asset).Flag17 = 0x00; - ((AssetMVPT)asset).MovementAngle = 360; - ((AssetMVPT)asset).MovementRadius = 4; - ((AssetMVPT)asset).DistanceICanSeeYou = 8; + ((AssetMVPT)asset).Wt = 0x2710; + ((AssetMVPT)asset).On = 0x01; + ((AssetMVPT)asset).BezIndex = 0x00; + ((AssetMVPT)asset).Delay = 360; + ((AssetMVPT)asset).ZoneRadius = 4; + ((AssetMVPT)asset).ArenaRadius = 8; break; case AssetTemplate.PointMVPT: ((AssetMVPT)asset).PositionX = position.X; ((AssetMVPT)asset).PositionY = position.Y; ((AssetMVPT)asset).PositionZ = position.Z; - ((AssetMVPT)asset).Flag14 = 0x27; - ((AssetMVPT)asset).Flag15 = 0x10; - ((AssetMVPT)asset).Flag16 = 0x01; - ((AssetMVPT)asset).Flag17 = 0x00; - ((AssetMVPT)asset).MovementAngle = 0; - ((AssetMVPT)asset).MovementRadius = -1; - ((AssetMVPT)asset).DistanceICanSeeYou = -1; + ((AssetMVPT)asset).Wt = 0x2710; + ((AssetMVPT)asset).On = 0x01; + ((AssetMVPT)asset).BezIndex = 0x00; + ((AssetMVPT)asset).Delay = 0; + ((AssetMVPT)asset).ZoneRadius = -1; + ((AssetMVPT)asset).ArenaRadius = -1; break; case AssetTemplate.SphereTrigger: ((AssetTRIG)asset).Position1X_Radius = 10f; break; case AssetTemplate.BusStop: - ((AssetSIMP)asset).ModelAssetID = "bus_stop"; + ((AssetSIMP)asset).Model_AssetID = "bus_stop"; ((AssetSIMP)asset).ScaleX = 2f; ((AssetSIMP)asset).ScaleY = 2f; ((AssetSIMP)asset).ScaleZ = 2f; @@ -759,13 +762,13 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re PlaceTemplate(position, layerIndex, out success, ref assetIDs, template: AssetTemplate.BusStop_DYNA); break; case AssetTemplate.BusStop_Lights: - ((AssetSIMP)asset).ModelAssetID = "bus_stop_lights"; + ((AssetSIMP)asset).Model_AssetID = "bus_stop_lights"; ((AssetSIMP)asset).ScaleX = 2f; ((AssetSIMP)asset).ScaleY = 2f; ((AssetSIMP)asset).ScaleZ = 2f; ((AssetSIMP)asset).SolidityFlag = 0; ((AssetSIMP)asset).VisibilityFlag = 0; - ((AssetSIMP)asset).Unknown_5C = 0; + ((AssetSIMP)asset).CollType = 0; break; case AssetTemplate.BusStop_Trigger: ((AssetTRIG)asset).Position1X_Radius = 2.5f; @@ -797,7 +800,7 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re Player = 0, CAM_ID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper().Replace("DYNA", "CAM"), AssetTemplate.BusStop_Camera), SIMP_ID = PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper().Replace("DYNA", "SIMP"), AssetTemplate.BusStop_BusSimp), - CharacterSwitchTimer = 1.5f + Delay = 1.5f }; break; case AssetTemplate.BusStop_Camera: @@ -812,10 +815,10 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re ((AssetCAM)asset).NormalizedLeftX = 0f; ((AssetCAM)asset).NormalizedLeftY = 0f; ((AssetCAM)asset).NormalizedLeftZ = 1f; - ((AssetCAM)asset).UnknownShort44 = 30; - ((AssetCAM)asset).UnknownShort46 = 45; - ((AssetCAM)asset).CameraSpeed = 60f; - ((AssetCAM)asset).UnknownFloat4C = 0.5f; + ((AssetCAM)asset).OffsetStartFrames = 30; + ((AssetCAM)asset).OffsetEndFrames = 45; + ((AssetCAM)asset).FieldOfView = 60f; + ((AssetCAM)asset).TransitionTime = 0.5f; ((AssetCAM)asset).UnknownFloat64 = -2f; ((AssetCAM)asset).UnknownFloat68 = 1f; ((AssetCAM)asset).UnknownFloat6C = 1f; @@ -828,9 +831,9 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re ((AssetSIMP)asset).PositionX -= 3f; ((AssetSIMP)asset).SolidityFlag = 0; ((AssetSIMP)asset).VisibilityFlag = 0; - ((AssetSIMP)asset).Unknown_5C = 0; - ((AssetSIMP)asset).ModelAssetID = "bus_bind"; - ((AssetSIMP)asset).AnimationAssetID = "BUSSTOP_ANIMLIST_01"; + ((AssetSIMP)asset).CollType = 0; + ((AssetSIMP)asset).Model_AssetID = "bus_bind"; + ((AssetSIMP)asset).Animation_AssetID = "BUSSTOP_ANIMLIST_01"; break; case AssetTemplate.TeleportBox: ((AssetDYNA)asset).Flags = 0x1D; @@ -842,16 +845,16 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re }; break; case AssetTemplate.ThrowFruit: - ((AssetSIMP)asset).ModelAssetID = "fruit_throw.MINF"; + ((AssetSIMP)asset).Model_AssetID = "fruit_throw.MINF"; PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "BASE", AssetTemplate.ThrowFruitBase); break; case AssetTemplate.FreezyFruit: - ((AssetSIMP)asset).ModelAssetID = "fruit_freezy_bind.MINF"; + ((AssetSIMP)asset).Model_AssetID = "fruit_freezy_bind.MINF"; PlaceTemplate(position, layerIndex, out success, ref assetIDs, template.ToString().ToUpper() + "BASE", AssetTemplate.ThrowFruitBase); break; case AssetTemplate.ThrowFruitBase: - ((AssetSIMP)asset).ModelAssetID = "fruit_throw_base"; - ((AssetSIMP)asset).Unknown_5C = 0; + ((AssetSIMP)asset).Model_AssetID = "fruit_throw_base"; + ((AssetSIMP)asset).CollType = 0; break; case AssetTemplate.Checkpoint: case AssetTemplate.Checkpoint_Invisible: @@ -927,8 +930,8 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re ((AssetSIMP)asset).ScaleX = 0.75f; ((AssetSIMP)asset).ScaleY = 0.75f; ((AssetSIMP)asset).ScaleZ = 0.75f; - ((AssetSIMP)asset).ModelAssetID = "checkpoint_bind"; - ((AssetSIMP)asset).AnimationAssetID = "CHECKPOINT_ANIMLIST_01"; + ((AssetSIMP)asset).Model_AssetID = "checkpoint_bind"; + ((AssetSIMP)asset).Animation_AssetID = "CHECKPOINT_ANIMLIST_01"; break; case AssetTemplate.Checkpoint_Talkbox: ((AssetDYNA)asset).Flags = 0x1D; @@ -942,8 +945,8 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re }; break; case AssetTemplate.Springboard: - ((AssetPLAT)asset).ModelAssetID = 0x55E9EAB5; - ((AssetPLAT)asset).AnimationAssetID = 0x7AAA99BB; + ((AssetPLAT)asset).Model_AssetID = 0x55E9EAB5; + ((AssetPLAT)asset).Animation_AssetID = 0x7AAA99BB; ((AssetPLAT)asset).PlatformType = PlatType.Springboard; ((AssetPLAT)asset).PlatformSubtype = PlatTypeSpecific.Springboard; ((AssetPLAT)asset).CollisionType = 4; @@ -954,8 +957,8 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re ((AssetPLAT)asset).UnknownByte_90 = 6; break; case AssetTemplate.HoveringPlatform: - ((AssetPLAT)asset).ModelAssetID = 0x335EE0C8; - ((AssetPLAT)asset).AnimationAssetID = 0x730847B6; + ((AssetPLAT)asset).Model_AssetID = 0x335EE0C8; + ((AssetPLAT)asset).Animation_AssetID = 0x730847B6; ((AssetPLAT)asset).PlatformType = PlatType.Mechanism; ((AssetPLAT)asset).PlatformSubtype = PlatTypeSpecific.Mechanism; ((AssetPLAT)asset).CollisionType = 4; @@ -1001,8 +1004,8 @@ public uint PlaceTemplate(Vector3 position, int layerIndex, out bool success, re }; break; case AssetTemplate.BungeeHook_SIMP: - ((AssetSIMP)asset).ModelAssetID = "bungee_hook"; - ((AssetSIMP)asset).Unknown_5C = 0; + ((AssetSIMP)asset).Model_AssetID = "bungee_hook"; + ((AssetSIMP)asset).CollType = 0; break; case AssetTemplate.BungeeDrop: ((AssetDYNA)asset).Flags = 0x1D; diff --git a/IndustrialPark/ArchiveEditor/Other/AssetTemplate.cs b/IndustrialPark/ArchiveEditor/Other/AssetTemplate.cs index f5384072..be3ac53c 100644 --- a/IndustrialPark/ArchiveEditor/Other/AssetTemplate.cs +++ b/IndustrialPark/ArchiveEditor/Other/AssetTemplate.cs @@ -102,6 +102,7 @@ public enum AssetTemplate Camera, Destructible_Generic, ElectricArc_Generic, + Pendulum_Generic, Platform_Generic, Player_Generic, SIMP_Generic, diff --git a/IndustrialPark/Assets/ObjectAssets/AssetCNTR.cs b/IndustrialPark/Assets/ObjectAssets/AssetCNTR.cs index a9ea4d27..9b49acd2 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetCNTR.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetCNTR.cs @@ -17,7 +17,7 @@ public short Count } [Category("Counter")] - public short Unknown + public short Padding { get => ReadShort(0xA); set => Write(0xA, value); diff --git a/IndustrialPark/Assets/ObjectAssets/AssetCSNM.cs b/IndustrialPark/Assets/ObjectAssets/AssetCSNM.cs index 8d2c7214..60eb2786 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetCSNM.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetCSNM.cs @@ -25,14 +25,14 @@ public AssetID CSN_AssetID } [Category("Cutscene Manager")] - public int UnknownInt0C + public int CsnmFlags { get => ReadInt(0xC); set => Write(0xC, value); } [Category("Cutscene Manager")] - public int UnknownInt10 + public int InterpSpeed { get => ReadInt(0x10); set => Write(0x10, value); diff --git a/IndustrialPark/Assets/ObjectAssets/AssetENV.cs b/IndustrialPark/Assets/ObjectAssets/AssetENV.cs index 3a94d617..fb2b2582 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetENV.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetENV.cs @@ -12,120 +12,130 @@ public AssetENV(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (JSP_AssetID == assetID) + if (BSP_AssetID == assetID) return true; - if (CAM_AssetID == assetID) + if (StartCameraAssetID == assetID) return true; - if (LKIT_AssetID_0 == assetID) + if (BSP_LKIT_AssetID == assetID) return true; - if (LKIT_AssetID_1 == assetID) + if (Object_LKIT_AssetID == assetID) return true; - if (MAPR_AssetID == assetID) + if (BSP_Collision_AssetID == assetID) + return true; + if (BSP_FX_AssetID == assetID) + return true; + if (BSP_Camera_AssetID == assetID) + return true; + if (BSP_MAPR_AssetID == assetID) + return true; + if (BSP_MAPR_Collision_AssetID == assetID) + return true; + if (BSP_MAPR_FX_AssetID == assetID) return true; return base.HasReference(assetID); } [Category("Environment")] - public AssetID JSP_AssetID + public AssetID BSP_AssetID { get => ReadUInt(0x8); set => Write(0x8, value); } [Category("Environment")] - public AssetID CAM_AssetID + public AssetID StartCameraAssetID { get => ReadUInt(0xC); set => Write(0xC, value); } [Category("Environment")] - public int UnknownInt10 + public int ClimateFlags { get => ReadInt(0x10); set => Write(0x10, value); } [Category("Environment"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat14 + public float ClimateStrengthMin { get => ReadFloat(0x14); set => Write(0x14, value); } [Category("Environment"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat18 + public float ClimateStrengthMax { get => ReadFloat(0x18); set => Write(0x18, value); } [Category("Environment")] - public AssetID LKIT_AssetID_0 + public AssetID BSP_LKIT_AssetID { get => ReadUInt(0x1C); set => Write(0x1C, value); } [Category("Environment")] - public AssetID LKIT_AssetID_1 + public AssetID Object_LKIT_AssetID { get => ReadUInt(0x20); set => Write(0x20, value); } [Category("Environment")] - public int UnknownInt24 + public int Padding24 { get => ReadInt(0x24); set => Write(0x24, value); } [Category("Environment")] - public int UnknownInt28 + public AssetID BSP_Collision_AssetID { - get => ReadInt(0x28); + get => ReadUInt(0x28); set => Write(0x28, value); - } - + } + [Category("Environment")] - public int UnknownInt2C + public AssetID BSP_FX_AssetID { - get => ReadInt(0x2C); + get => ReadUInt(0x2C); set => Write(0x2C, value); } [Category("Environment")] - public int UnknownInt30 + public AssetID BSP_Camera_AssetID { - get => ReadInt(0x30); + get => ReadUInt(0x30); set => Write(0x30, value); } [Category("Environment")] - public AssetID MAPR_AssetID + public AssetID BSP_MAPR_AssetID { get => ReadUInt(0x34); set => Write(0x34, value); } [Category("Environment")] - public int UnknownInt38 + public AssetID BSP_MAPR_Collision_AssetID { - get => ReadInt(0x38); + get => ReadUInt(0x38); set => Write(0x38, value); } [Category("Environment")] - public int UnknownInt3C + public AssetID BSP_MAPR_FX_AssetID { - get => ReadInt(0x3C); + get => ReadUInt(0x3C); set => Write(0x3C, value); } [Category("Environment"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat40 + public float LoldHeight { get => BitConverter.ToSingle(AHDR.data, 0x40); set diff --git a/IndustrialPark/Assets/ObjectAssets/AssetFOG.cs b/IndustrialPark/Assets/ObjectAssets/AssetFOG.cs index 486f07e4..ac850394 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetFOG.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetFOG.cs @@ -14,7 +14,7 @@ public AssetFOG(Section_AHDR AHDR) : base(AHDR) { } protected override int EventStartOffset => 0x24; [Category("Fog"), Editor(typeof(MyColorEditor), typeof(UITypeEditor)), DisplayName("End Color (R, G, B)")] - public MyColor Color1 + public MyColor BackgroundColor { get { @@ -22,11 +22,11 @@ public MyColor Color1 return new MyColor(abgr[3], abgr[2], abgr[1], abgr[0]); } - set => Write(0x8, BitConverter.ToInt32(new byte[] { Color1Alpha, value.B, value.G, value.R }, 0)); + set => Write(0x8, BitConverter.ToInt32(new byte[] { BackgroundColorAlpha, value.B, value.G, value.R }, 0)); } [Category("Fog"), DisplayName("End Color Alpha (0 - 255)")] - public byte Color1Alpha + public byte BackgroundColorAlpha { get { @@ -34,11 +34,11 @@ public byte Color1Alpha return abgr[0]; } - set => Write(0x8, BitConverter.ToInt32(new byte[] { value, Color1.B, Color1.G, Color1.R }, 0)); + set => Write(0x8, BitConverter.ToInt32(new byte[] { value, BackgroundColor.B, BackgroundColor.G, BackgroundColor.R }, 0)); } [Category("Fog"), Editor(typeof(MyColorEditor), typeof(UITypeEditor)), DisplayName("Start Color (R, G, B)")] - public MyColor Color2 + public MyColor FogColor { get { @@ -46,11 +46,11 @@ public MyColor Color2 return new MyColor(abgr[3], abgr[2], abgr[1], abgr[0]); } - set => Write(0xC, BitConverter.ToInt32(new byte[] { Color2Alpha, value.B, value.G, value.R }, 0)); + set => Write(0xC, BitConverter.ToInt32(new byte[] { FogColorAlpha, value.B, value.G, value.R }, 0)); } [Category("Fog"), DisplayName("Start Color Alpha (0 - 255)")] - public byte Color2Alpha + public byte FogColorAlpha { get { @@ -58,11 +58,11 @@ public byte Color2Alpha return abgr[0]; } - set => Write(0xC, BitConverter.ToInt32(new byte[] { value, Color2.B, Color2.G, Color2.R }, 0)); + set => Write(0xC, BitConverter.ToInt32(new byte[] { value, FogColor.B, FogColor.G, FogColor.R }, 0)); } [Category("Fog"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat10 + public float FogDensity { get => ReadFloat(0x10); set => Write(0x10, value); @@ -90,10 +90,31 @@ public float TransitionTime } [Category("Fog")] - public int UnknownInt20 + public byte FogType { - get => ReadInt(0x20); + get => ReadByte(0x20); set => Write(0x20, value); } + + [Category("Fog")] + public byte Padding21 + { + get => ReadByte(0x21); + set => Write(0x21, value); + } + + [Category("Fog")] + public byte Padding22 + { + get => ReadByte(0x22); + set => Write(0x22, value); + } + + [Category("Fog")] + public byte Padding23 + { + get => ReadByte(0x23); + set => Write(0x23, value); + } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/AssetPARE.cs b/IndustrialPark/Assets/ObjectAssets/AssetPARE.cs index 3f918d85..01c39880 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetPARE.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetPARE.cs @@ -20,28 +20,28 @@ public override bool HasReference(uint assetID) } [Category("Particle Emitter")] - public byte UnknownByte08 + public byte EmitterFlags { get => ReadByte(0x8); set => Write(0x8, value); } [Category("Particle Emitter")] - public byte UnknownByte09 + public byte EmitterType { get => ReadByte(0x9); set => Write(0x9, value); } [Category("Particle Emitter")] - public byte UnknownByte0A + public byte Padding0A { get => ReadByte(0xA); set => Write(0xA, value); } [Category("Particle Emitter")] - public byte UnknownByte0B + public byte Padding0B { get => ReadByte(0xB); set => Write(0xB, value); @@ -55,49 +55,49 @@ public AssetID PARP_AssetID } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat10 + public float E_circle { get => ReadFloat(0x10); set => Write(0x10, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat14 + public float E_sphere { get => ReadFloat(0x14); set => Write(0x14, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat18 + public float E_rectangle { get => ReadFloat(0x18); set => Write(0x18, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat1C + public float E_line { get => ReadFloat(0x1C); set => Write(0x1C, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat20 + public float E_volume { get => ReadFloat(0x20); set => Write(0x20, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat24 + public float E_offsetp { get => ReadFloat(0x24); set => Write(0x24, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat28 + public float E_vcyl { get => ReadFloat(0x28); set => Write(0x28, value); @@ -111,63 +111,63 @@ public AssetID Emitter_AssetID } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat30 + public float Emitter_PosX { get => ReadFloat(0x30); set => Write(0x30, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat34 + public float Emitter_PosY { get => ReadFloat(0x34); set => Write(0x34, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat38 + public float Emitter_PosZ { get => ReadFloat(0x38); set => Write(0x38, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat3C + public float Velocity_X { get => ReadFloat(0x3C); set => Write(0x3C, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat40 + public float Velocity_Y { get => ReadFloat(0x40); set => Write(0x40, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat44 + public float Velocity_Z { get => ReadFloat(0x44); set => Write(0x44, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat48 + public float Velocity_AngleVariation { get => ReadFloat(0x48); set => Write(0x48, value); } [Category("Particle Emitter")] - public int UnknownInt4C + public int CullMode { get => ReadInt(0x4C); set => Write(0x4C, value); } [Category("Particle Emitter"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat50 + public float CullDistanceSqr { get => ReadFloat(0x50); set => Write(0x50, value); diff --git a/IndustrialPark/Assets/ObjectAssets/AssetPARP.cs b/IndustrialPark/Assets/ObjectAssets/AssetPARP.cs index 5fb09b82..f5703f8c 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetPARP.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetPARP.cs @@ -180,14 +180,14 @@ public int UnknownInt12C } [Category("Particle Properties")] - public int UnknownInt130 + public int Emit_Limit { get => ReadInt(0x130); set => Write(0x130, value); } [Category("Particle Properties")] - public int UnknownFloat134 + public int Emit_limit_reset_time { get => ReadInt(0x134); set => Write(0x134, value); diff --git a/IndustrialPark/Assets/ObjectAssets/AssetPARS.cs b/IndustrialPark/Assets/ObjectAssets/AssetPARS.cs index d9d5e38b..9f969b9c 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetPARS.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetPARS.cs @@ -14,21 +14,23 @@ public override bool HasReference(uint assetID) { if (TextureAssetID == assetID) return true; + if (PARS_AssetID == assetID) + return true; return base.HasReference(assetID); } [Category("Particle System")] - public int Unknown08 + public int PARS_Type { get => ReadInt(0x8); set => Write(0x8, value); } [Category("Particle System")] - public int Unknown0C + public AssetID PARS_AssetID { - get => ReadInt(0xC); + get => ReadUInt(0xC); set => Write(0xC, value); } @@ -40,76 +42,69 @@ public AssetID TextureAssetID } [Category("Particle System")] - public byte UnknownByte14 + public byte ParsFlags { get => ReadByte(0x14); set => Write(0x14, value); } [Category("Particle System")] - public byte UnknownByte15 + public byte Priority { get => ReadByte(0x15); set => Write(0x15, value); } [Category("Particle System")] - public byte UnknownByte16 + public short MaxParticles { - get => ReadByte(0x16); + get => ReadShort(0x16); set => Write(0x16, value); } - - [Category("Particle System")] - public byte UnknownByte17 - { - get => ReadByte(0x17); - set => Write(0x17, value); - } - + [Category("Particle System")] - public byte UnknownByte18 + public byte RenderFunction { get => ReadByte(0x18); set => Write(0x18, value); } [Category("Particle System")] - public byte UnknownByte19 + public byte RenderSourceBlendMode { get => ReadByte(0x19); set => Write(0x19, value); } [Category("Particle System")] - public byte UnknownByte1A + public byte RenderDestBlendMode { get => ReadByte(0x1A); set => Write(0x1A, value); } [Category("Particle System")] - public byte UnknownByte1B + public byte CmdCount { get => ReadByte(0x1B); set => Write(0x1B, value); } [Category("Particle System"), ReadOnly(true)] - public int SizeOfStruct + public int CmdSize { get => ReadInt(0x1C); set => Write(0x1C, value); } [Category("Particle System")] - public AssetID[] Struct + public AssetID[] Cmd { get { List list = new List(); - for (int i = 0x20; i < 0x20 + SizeOfStruct; i += 4) + for (int i = 0x20; i < 0x20 + CmdSize; i += 4) list.Add(ReadUInt(i)); return list.ToArray(); @@ -121,10 +116,10 @@ public AssetID[] Struct foreach (AssetID a in value) before.AddRange(BitConverter.GetBytes(ConverterFunctions.Switch(a))); - before.AddRange(Data.Skip(0x20 + SizeOfStruct)); + before.AddRange(Data.Skip(0x20 + CmdSize)); Data = before.ToArray(); - SizeOfStruct = value.Length * 4; + CmdSize = value.Length * 4; } } } diff --git a/IndustrialPark/Assets/ObjectAssets/AssetPORT.cs b/IndustrialPark/Assets/ObjectAssets/AssetPORT.cs index fcb45663..7da56618 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetPORT.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetPORT.cs @@ -11,9 +11,9 @@ public AssetPORT(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (Camera_Unknown == assetID) + if (Camera_AssetID == assetID) return true; - if (Destination_MRKR == assetID) + if (Destination_MRKR_AssetID == assetID) return true; return base.HasReference(assetID); @@ -22,14 +22,14 @@ public override bool HasReference(uint assetID) protected override int EventStartOffset => 0x18; [Category("Portal")] - public AssetID Camera_Unknown + public AssetID Camera_AssetID { get => ReadUInt(0x8); set => Write(0x8, value); } [Category("Portal")] - public AssetID Destination_MRKR + public AssetID Destination_MRKR_AssetID { get => ReadUInt(0xC); set => Write(0xC, value); diff --git a/IndustrialPark/Assets/ObjectAssets/AssetSURF.cs b/IndustrialPark/Assets/ObjectAssets/AssetSURF.cs index 2a08d9cb..05910b8a 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetSURF.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetSURF.cs @@ -19,417 +19,585 @@ public override bool HasReference(uint assetID) return base.HasReference(assetID); } - [Category("Surface")] - public byte UnknownByte08 + [Category("Surface: Base")] + public byte DamageType { get => ReadByte(0x08); set => Write(0x08, value); } - [Category("Surface")] - public byte UnknownByte09 + [Category("Surface: Base")] + public byte Sticky { get => ReadByte(0x09); set => Write(0x09, value); } - [Category("Surface")] - public byte UnknownByte0A + [Category("Surface: Base")] + public byte DamageFlags { get => ReadByte(0x0A); set => Write(0x0A, value); } - [Category("Surface")] - public byte UnknownByte0B + [Category("Surface: Base")] + public byte SurfaceType { get => ReadByte(0x0B); set => Write(0x0B, value); } - [Category("Surface")] - public byte UnknownByte0C + [Category("Surface: Base")] + public byte Phys_Pad { get => ReadByte(0x0C); set => Write(0x0C, value); } - [Category("Surface")] - public byte UnknownByte0D + [Category("Surface: Base")] + public byte SlideStart { get => ReadByte(0x0D); set => Write(0x0D, value); } - [Category("Surface")] - public byte UnknownByte0E + [Category("Surface: Base")] + public byte SlideStop { get => ReadByte(0x0E); set => Write(0x0E, value); } - [Category("Surface")] - public byte UnknownByte0F + [Category("Surface: Base")] + public byte PhysicsFlags { get => ReadByte(0x0F); set => Write(0x0F, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat10 + [Category("Surface: Base"), TypeConverter(typeof(FloatTypeConverter))] + public float Friction { get => ReadFloat(0x10); set => Write(0x10, value); } - [Category("Surface")] + [Category("Surface: Material Effects")] public int UnknownInt14 { get => ReadInt(0x14); set => Write(0x14, value); } - [Category("Surface")] + [Category("Surface: Material Effects")] public int UnknownInt18 { get => ReadInt(0x18); set => Write(0x18, value); } - [Category("Surface")] + [Category("Surface: Material Effects")] public AssetID UnknownAssetID1C { get => ReadUInt(0x1C); set => Write(0x1C, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: Material Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat20 { get => ReadFloat(0x20); set => Write(0x20, value); } - [Category("Surface")] + [Category("Surface: Material Effects")] public int UnknownInt24 { get => ReadInt(0x24); set => Write(0x24, value); } - [Category("Surface")] + [Category("Surface: Material Effects")] public int UnknownInt28 { get => ReadInt(0x28); set => Write(0x28, value); } - [Category("Surface")] + [Category("Surface: Color Effects")] public short UnknownShort2C { get => ReadShort(0x2C); set => Write(0x2C, value); } - [Category("Surface")] + [Category("Surface: Color Effects")] public short UnknownShort2E { get => ReadShort(0x2E); set => Write(0x2E, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: Color Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat30 { get => ReadFloat(0x30); set => Write(0x30, value); } - [Category("Surface")] - public int UnknownInt34 + [Category("Surface: Texture Animation")] + public int TextureAnimFlags { get => ReadInt(0x34); set => Write(0x34, value); } - [Category("Surface")] + [Category("Surface: Texture Animation")] public int UnknownInt38 { get => ReadInt(0x38); set => Write(0x38, value); } - [Category("Surface")] + [Category("Surface: Texture Animation")] public AssetID GroupAssetID { get => ReadUInt(0x3C); set => Write(0x3C, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: Texture Animation"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat40 { get => ReadFloat(0x40); set => Write(0x40, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: Texture Animation"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat44 { get => ReadFloat(0x44); set => Write(0x44, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: Texture Animation"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat48 { get => ReadFloat(0x48); set => Write(0x48, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: Texture Animation"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat4C { get => ReadFloat(0x4C); set => Write(0x4C, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt50 { get => ReadInt(0x50); set => Write(0x50, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt54 { get => ReadInt(0x54); set => Write(0x54, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt58 { get => ReadInt(0x58); set => Write(0x58, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt5C { get => ReadInt(0x5C); set => Write(0x5C, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt60 { get => ReadInt(0x60); set => Write(0x60, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt64 { get => ReadInt(0x64); set => Write(0x64, value); } - [Category("Surface")] + [Category("Surface: UV Effects")] public int UnknownInt68 { get => ReadInt(0x68); set => Write(0x68, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UVAnimation_X { get => ReadFloat(0x6C); set => Write(0x6C, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UVAnimation_Y { get => ReadFloat(0x70); set => Write(0x70, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat74 { get => ReadFloat(0x74); set => Write(0x74, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat78 { get => ReadFloat(0x78); set => Write(0x78, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat7C { get => ReadFloat(0x7C); set => Write(0x7C, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat80 { get => ReadFloat(0x80); set => Write(0x80, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat84 { get => ReadFloat(0x84); set => Write(0x84, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat88 { get => ReadFloat(0x88); set => Write(0x88, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat8C { get => ReadFloat(0x8C); set => Write(0x8C, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat90 { get => ReadFloat(0x90); set => Write(0x90, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat94 { get => ReadFloat(0x94); set => Write(0x94, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat98 { get => ReadFloat(0x98); set => Write(0x98, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloat9C { get => ReadFloat(0x9C); set => Write(0x9C, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatA0 { get => ReadFloat(0xA0); set => Write(0xA0, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatA4 { get => ReadFloat(0xA4); set => Write(0xA4, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatA8 { get => ReadFloat(0xA8); set => Write(0xA8, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatAC { get => ReadFloat(0xAC); set => Write(0xAC, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatB0 { get => ReadFloat(0xB0); set => Write(0xB0, value); } - [Category("Surface")] - public byte UnknownByteB4 + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatB4 { - get => ReadByte(0xB4); + get => ReadFloat(0xB4); set => Write(0xB4, value); } - [Category("Surface")] - public byte UnknownByteB5 - { - get => ReadByte(0xB5); - set => Write(0xB5, value); - } - - [Category("Surface")] - public byte UnknownByteB6 - { - get => ReadByte(0xB6); - set => Write(0xB6, value); - } - - [Category("Surface")] - public byte UnknownByteB7 - { - get => ReadByte(0xB7); - set => Write(0xB7, value); - } - - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatB8 { get => ReadFloat(0xB8); set => Write(0xB8, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatBC { get => ReadFloat(0xBC); set => Write(0xBC, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatC0 { get => ReadFloat(0xC0); set => Write(0xC0, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatC4 { get => ReadFloat(0xC4); set => Write(0xC4, value); } - [Category("Surface"), TypeConverter(typeof(FloatTypeConverter))] + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] public float UnknownFloatC8 { get => ReadFloat(0xC8); set => Write(0xC8, value); } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatCC + { + get => ReadFloat(0xCC); + set => Write(0xCC, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatD0 + { + get => ReadFloat(0xD0); + set => Write(0xD0, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatD4 + { + get => ReadFloat(0xD4); + set => Write(0xD4, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatD8 + { + get => ReadFloat(0xD8); + set => Write(0xD8, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatDC + { + get => ReadFloat(0xDC); + set => Write(0xDC, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatE0 + { + get => ReadFloat(0xE0); + set => Write(0xE0, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatE4 + { + get => ReadFloat(0xE4); + set => Write(0xE4, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatE8 + { + get => ReadFloat(0xE8); + set => Write(0xE8, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatEC + { + get => ReadFloat(0xEC); + set => Write(0xEC, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatF0 + { + get => ReadFloat(0xF0); + set => Write(0xF0, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatF4 + { + get => ReadFloat(0xF4); + set => Write(0xF4, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatF8 + { + get => ReadFloat(0xF8); + set => Write(0xF8, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloatFC + { + get => ReadFloat(0xFC); + set => Write(0xFC, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat100 + { + get => ReadFloat(0x100); + set => Write(0x100, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat104 + { + get => ReadFloat(0x104); + set => Write(0x104, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat108 + { + get => ReadFloat(0x108); + set => Write(0x108, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat10C + { + get => ReadFloat(0x10C); + set => Write(0x10C, value); + } + + [Category("Surface: UV Effects"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat110 + { + get => ReadFloat(0x110); + set => Write(0x110, value); + } + + [Category("Surface: Other")] + public byte On + { + get => ReadByte(0x114); + set => Write(0x114, value); + } + + [Category("Surface: Other")] + public byte Padding115 + { + get => ReadByte(0x115); + set => Write(0x115, value); + } + + [Category("Surface: Other")] + public byte Padding116 + { + get => ReadByte(0x116); + set => Write(0x116, value); + } + + [Category("Surface: Other")] + public byte Padding117 + { + get => ReadByte(0x117); + set => Write(0x117, value); + } + + [Category("Surface: Other"), TypeConverter(typeof(FloatTypeConverter))] + public float OutOfBoundsDelay + { + get => ReadFloat(0x118); + set => Write(0x118, value); + } + + [Category("Surface: Other"), TypeConverter(typeof(FloatTypeConverter))] + public float WalljumpScaleXZ + { + get => ReadFloat(0x11C); + set => Write(0x11C, value); + } + + [Category("Surface: Other"), TypeConverter(typeof(FloatTypeConverter))] + public float WalljumpScaleY + { + get => ReadFloat(0x120); + set => Write(0x120, value); + } + + [Category("Surface: Other"), TypeConverter(typeof(FloatTypeConverter))] + public float DamageTimer + { + get => ReadFloat(0x124); + set => Write(0x124, value); + } + + [Category("Surface: Other"), TypeConverter(typeof(FloatTypeConverter))] + public float DamageBounce + { + get => ReadFloat(0x128); + set => Write(0x128, value); + } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/AssetTIMR.cs b/IndustrialPark/Assets/ObjectAssets/AssetTIMR.cs index b1769e16..108a4161 100644 --- a/IndustrialPark/Assets/ObjectAssets/AssetTIMR.cs +++ b/IndustrialPark/Assets/ObjectAssets/AssetTIMR.cs @@ -18,7 +18,7 @@ public float Time } [Category("Timer"), TypeConverter(typeof(FloatTypeConverter))] - public float Unknown + public float RandomRange { get => BitConverter.ToSingle(AHDR.data, 0xC); set diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetCAM.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetCAM.cs index 90100a29..6d182cd3 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetCAM.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetCAM.cs @@ -197,68 +197,68 @@ public float NormalizedLeftZ get => ReadFloat(0x34); set => Write(0x34, value); } - [Category("Camera")] - public int UnknownInt38 + [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] + public float ViewOffsetX { - get => ReadInt(0x38); + get => ReadFloat(0x38); set => Write(0x38, value); } - [Category("Camera")] - public int UnknownInt3C + [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] + public int ViewOffsetY { get => ReadInt(0x3C); set => Write(0x3C, value); } - [Category("Camera")] - public int UnknownInt40 + [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] + public int ViewOffsetZ { get => ReadInt(0x40); set => Write(0x40, value); } [Category("Camera")] - public short UnknownShort44 + public short OffsetStartFrames { get => ReadShort(0x44); set => Write(0x44, value); } [Category("Camera")] - public short UnknownShort46 + public short OffsetEndFrames { get => ReadShort(0x46); set => Write(0x46, value); } [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] - public float CameraSpeed + public float FieldOfView { get => ReadFloat(0x48); set => Write(0x48, value); } [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat4C + public float TransitionTime { get => ReadFloat(0x4C); set => Write(0x4C, value); } [Category("Camera")] - public int UnknownInt50 + public int TransitionType { get => ReadInt(0x50); set => Write(0x50, value); } - [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat54 + [Category("Camera")] + public uint CamFlags { - get => ReadFloat(0x54); + get => ReadUInt(0x54); set => Write(0x54, value); } [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat58 + public float FadeUp { get => ReadFloat(0x58); set => Write(0x58, value); } [Category("Camera"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat5C + public float FadeDown { get => ReadFloat(0x5C); set => Write(0x5C, value); @@ -323,10 +323,10 @@ public byte Flags4 get => ReadByte(0x7B); set => Write(0x7B, value); } - [Category("Camera"), TypeConverter(typeof(HexIntTypeConverter))] - public int UnknownInt7C + [Category("Camera")] + public AssetID MarkerAssetId { - get => ReadInt(0x7C); + get => ReadUInt(0x7C); set => Write(0x7C, value); } [Category("Camera"), TypeConverter(typeof(HexIntTypeConverter))] @@ -335,12 +335,30 @@ public int UnknownInt80 get => ReadInt(0x80); set => Write(0x80, value); } - [Category("Camera"), TypeConverter(typeof(HexIntTypeConverter))] - public int UnknownInt84 + [Category("Camera")] + public byte CamType { - get => ReadInt(0x84); + get => ReadByte(0x84); set => Write(0x84, value); } + [Category("Camera")] + public byte Padding85 + { + get => ReadByte(0x85); + set => Write(0x85, value); + } + [Category("Camera")] + public byte Padding86 + { + get => ReadByte(0x86); + set => Write(0x86, value); + } + [Category("Camera")] + public byte Padding87 + { + get => ReadByte(0x87); + set => Write(0x87, value); + } public void SetPosition(Vector3 position) { diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetMVPT.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetMVPT.cs index 1f8ff51c..774c7aeb 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetMVPT.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetMVPT.cs @@ -177,54 +177,62 @@ public float PositionZ } [Category("Move Point")] - [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag14 + [TypeConverter(typeof(HexShortTypeConverter))] + public short Wt { - get => ReadByte(0x14); + get => ReadShort(0x14); set => Write(0x14, value); } + + [Category("Move Point")] + [TypeConverter(typeof(HexByteTypeConverter))] + public byte On + { + get => ReadByte(0x16); + set => Write(0x16, value); + } [Category("Move Point")] [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag15 + public byte BezIndex { - get => ReadByte(0x15); - set => Write(0x15, value); + get => ReadByte(0x17); + set => Write(0x17, value); } [Category("Move Point")] [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag16 + public byte Flg_Props { - get => ReadByte(0x16); - set => Write(0x16, value); + get => ReadByte(0x18); + set => Write(0x18, value); } [Category("Move Point")] [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag17 + public byte Padding19 { - get => ReadByte(0x17); - set => Write(0x17, value); + get => ReadByte(0x19); + set => Write(0x19, value); } [Category("Move Point")] [ReadOnly(true)] - public int SiblingAmount + public short SiblingAmount { - get => ReadInt(0x18); + get => ReadShort(0x1A); set => Write(0x18, value); } [Category("Move Point"), TypeConverter(typeof(FloatTypeConverter))] - public float MovementAngle + public float Delay { get => ReadFloat(0x1C); set => Write(0x1C, value); } [Category("Move Point"), TypeConverter(typeof(FloatTypeConverter))] - public float MovementRadius + public float ZoneRadius { get => ReadFloat(0x20); set => Write(0x20, value); @@ -232,7 +240,7 @@ public float MovementRadius private float _distanceICanSeeYou; [Category("Move Point"), TypeConverter(typeof(FloatTypeConverter))] - public float DistanceICanSeeYou + public float ArenaRadius { get => _distanceICanSeeYou; set @@ -278,27 +286,27 @@ public AssetID[] SiblingMVPTs Data = newData.ToArray(); - SiblingAmount = value.Length; + SiblingAmount = (short)value.Length; } } [Browsable(false)] public float ScaleX { - get => DistanceICanSeeYou; - set => DistanceICanSeeYou = value; + get => ArenaRadius; + set => ArenaRadius = value; } [Browsable(false)] public float ScaleY { - get => DistanceICanSeeYou; - set => DistanceICanSeeYou = value; + get => ArenaRadius; + set => ArenaRadius = value; } [Browsable(false)] public float ScaleZ { - get => DistanceICanSeeYou; - set => DistanceICanSeeYou = value; + get => ArenaRadius; + set => ArenaRadius = value; } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetSFX.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetSFX.cs index cb662745..be279276 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetSFX.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/AssetSFX.cs @@ -119,7 +119,7 @@ public float GetDistance(Vector3 cameraPosition) [Category("Sound Effect")] [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag08 + public byte SFXFlag08 { get => ReadByte(0x8); set => Write(0x8, value); @@ -127,30 +127,21 @@ public byte Flag08 [Category("Sound Effect")] [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag09 + public byte SFXFlag09 { get => ReadByte(0x9); set => Write(0x9, value); } [Category("Sound Effect")] - [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag0A + public short Frequency { - get => ReadByte(0xA); - set => Write(0xA, value); - } - - [Category("Sound Effect")] - [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flag0B - { - get => ReadByte(0xB); + get => ReadShort(0xA); set => Write(0xA, value); } [Category("Sound Effect"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat0C + public float MinFrequency { get => ReadFloat(0xC); set => Write(0xC, value); @@ -163,20 +154,41 @@ public AssetID SoundAssetID set => Write(0x10, value); } - [Category("Sound Effect"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat14 + [Category("Sound Effect")] + public AssetID AttachAssetID { - get => ReadFloat(0x14); + get => ReadUInt(0x14); set => Write(0x14, value); } [Category("Sound Effect")] - public int UnknownInt18 + public byte LoopCount { - get => ReadInt(0x18); + get => ReadByte(0x18); set => Write(0x18, value); } + [Category("Sound Effect")] + public byte Priority + { + get => ReadByte(0x19); + set => Write(0x19, value); + } + + [Category("Sound Effect")] + public byte Volume + { + get => ReadByte(0x1A); + set => Write(0x1A, value); + } + + [Category("Sound Effect")] + public byte Padding1B + { + get => ReadByte(0x1B); + set => Write(0x1B, value); + } + private Vector3 _position; [Category("Sound Effect"), TypeConverter(typeof(FloatTypeConverter))] public float PositionX @@ -216,7 +228,7 @@ public float PositionZ private float _radius; [Category("Sound Effect"), TypeConverter(typeof(FloatTypeConverter))] - public float RadiusMin + public float InnerRadius { get => _radius; set @@ -229,7 +241,7 @@ public float RadiusMin private float _radius2; [Category("Sound Effect"), TypeConverter(typeof(FloatTypeConverter))] - public float RadiusMax + public float OuterRadius { get => _radius2; set @@ -243,31 +255,31 @@ public float RadiusMax [Browsable(false)] public float ScaleX { - get => RadiusMin; + get => InnerRadius; set { - RadiusMax += value - RadiusMin; - RadiusMin = value; + OuterRadius += value - InnerRadius; + InnerRadius = value; } } [Browsable(false)] public float ScaleY { - get => RadiusMin; + get => InnerRadius; set { - RadiusMax += value - RadiusMin; - RadiusMin = value; + OuterRadius += value - InnerRadius; + InnerRadius = value; } } [Browsable(false)] public float ScaleZ { - get => RadiusMin; + get => InnerRadius; set { - RadiusMax += value - RadiusMin; - RadiusMin = value; + OuterRadius += value - InnerRadius; + InnerRadius = value; } } } diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBOUL.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBOUL.cs index 7cda2a0c..8ca0a983 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBOUL.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBOUL.cs @@ -16,7 +16,7 @@ public AssetBOUL(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (SoundAssetID == assetID) + if (Sound_AssetID == assetID) return true; return base.HasReference(assetID); @@ -64,7 +64,7 @@ public float Friction } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat64 + public float StartFriction { get => ReadFloat(0x64 + Offset); set => Write(0x64 + Offset, value); @@ -85,14 +85,14 @@ public float MaxAngularVelocity } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float AngularFriction + public float Stickiness { get => ReadFloat(0x70 + Offset); set => Write(0x70 + Offset, value); } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float MinBounceVelocity + public float BounceDamp { get => ReadFloat(0x74); set => Write(0x74, value); @@ -169,7 +169,7 @@ public bool DieOnPlayerAttack } [Category("Boulder Flags")] - public bool DieAfterLifetime + public bool DieAfterKillTimer { get => (BoulderFlags & Mask(9)) != 0; set => BoulderFlags = value ? (BoulderFlags | Mask(9)) : (BoulderFlags & InvMask(9)); @@ -330,56 +330,56 @@ public bool BoulderFlags31 } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float Lifetime + public float KillTimer { get => ReadFloat(0x7C); set => Write(0x7C, value); } [Category("Boulder")] - public int UnknownInt80 + public int Hitpoints { get => ReadInt(0x80 + Offset); set => Write(0x80 + Offset, value); } [Category("Boulder")] - public AssetID SoundAssetID + public AssetID Sound_AssetID { get => ReadUInt(0x84 + Offset); set => Write(0x84 + Offset, value); } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat88 + public float Volume { get => ReadFloat(0x88); set => Write(0x88, value); } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat8C + public float MinSoundVel { get => ReadFloat(0x8C); set => Write(0x8C, value); } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat90 + public float MaxSoundVel { get => ReadFloat(0x90); set => Write(0x90, value); } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat94 + public float InnerRadius { get => ReadFloat(0x94); set => Write(0x94, value); } [Category("Boulder"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat98 + public float OuterRadius { get => ReadFloat(0x98); set => Write(0x98, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBUTN.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBUTN.cs index 3d6bd28e..4cd0a51b 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBUTN.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetBUTN.cs @@ -15,48 +15,48 @@ public AssetBUTN(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (PressedModelAssetID == assetID) + if (PressedModel_AssetID == assetID) return true; return base.HasReference(assetID); } [Category("Button")] - public AssetID PressedModelAssetID + public AssetID PressedModel_AssetID { get => ReadUInt(0x54 + Offset); set => Write(0x54 + Offset, value); } - public enum ButnHitMode + public enum ButnActMethod { Button = 0, PressurePlate = 1 } [Category("Button")] - public ButnHitMode ButtonType + public ButnActMethod ActMethod { - get => (ButnHitMode)ReadInt(0x58 + Offset); + get => (ButnActMethod)ReadInt(0x58 + Offset); set => Write(0x58 + Offset, (int)value); } [Category("Button")] - public int UnknownInt5C + public int InitialButtonState { get => ReadInt(0x5C + Offset); set => Write(0x5C + Offset, value); } [Category("Button")] - public bool HoldEnabled + public bool ResetAfterDelay { get => ReadInt(0x60 + Offset) != 0; set => Write(0x60 + Offset, value ? 1 : 0); } [Category("Button"), TypeConverter(typeof(FloatTypeConverter))] - public float HoldTime + public float ResetDelay { get => ReadFloat(0x64 + Offset); set => Write(0x64 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetDSTR.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetDSTR.cs index e9405d37..73ae132f 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetDSTR.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetDSTR.cs @@ -15,150 +15,129 @@ public AssetDSTR(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (SHRP_AssetID1 == assetID) + if (DestroyShrapnel_AssetID == assetID) return true; - if (SHRP_AssetID2 == assetID) + if (HitShrapnel_AssetID == assetID) return true; - if (SFX_AssetID1 == assetID) + if (DestroySFX_AssetID == assetID) return true; - if (SFX_AssetID2 == assetID) + if (HitSFX_AssetID == assetID) return true; - if (DestroyedModelAssetID1 == assetID) + if (HitModel_AssetID == assetID) return true; - if (DestroyedModelAssetID2 == assetID) + if (DestroyModel_AssetID == assetID) return true; return base.HasReference(assetID); } - - [Browsable(false)] - public override AssetID ReferenceAssetID - { - get { return ReadUInt(0x50 + Offset); } - set { Write(0x50 + Offset, value); } - } - + [Category("Destructable")] - public AssetID AnimationAssetID - { - get { return ReadUInt(0x50 + Offset); } - set { Write(0x50 + Offset, value); } - } - - [Category("Destructable")] - public int UnknownInt54 + public int AnimationSpeed { get => ReadInt(0x54 + Offset); set => Write(0x54 + Offset, value); } [Category("Destructable")] - public int UnknownInt58 + public int InitialAnimationState { get => ReadInt(0x58 + Offset); set => Write(0x58 + Offset, value); } [Category("Destructable")] - public int UnknownInt5C + public int Health { get => ReadInt(0x5C + Offset); set => Write(0x5C + Offset, value); } [Category("Destructable")] - public int UnknownInt60 + public AssetID SpawnItemAssetID { - get => ReadInt(0x60 + Offset); + get => ReadUInt(0x60 + Offset); set => Write(0x60 + Offset, value); } [Category("Destructable")] - public int UnknownInt64_MaybeHitMask + public int MaybeHitMask { get => ReadInt(0x64 + Offset); set => Write(0x64 + Offset, value); } [Category("Destructable")] - public byte UnknownByte68 + public byte CollType { get => ReadByte(0x68 + Offset); set => Write(0x68 + Offset, value); } [Category("Destructable")] - public byte UnknownByte69 + public byte FxType { get => ReadByte(0x69 + Offset); set => Write(0x69 + Offset, value); } [Category("Destructable")] - public byte UnknownByte6A + public short Padding6A { - get => ReadByte(0x6A + Offset); + get => ReadShort(0x6A + Offset); set => Write(0x6A + Offset, value); } - - [Category("Destructable")] - public byte UnknownByte6B - { - get => ReadByte(0x6B + Offset); - set => Write(0x6B + Offset, value); - } - + [Category("Destructable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat6C + public float BlastRadius { get => ReadFloat(0x6C); set => Write(0x6C, value); } [Category("Destructable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat70 + public float BlastStrength { get => ReadFloat(0x70); set => Write(0x70, value); } [Category("Destructable")] - public AssetID SHRP_AssetID1 + public AssetID DestroyShrapnel_AssetID { get => ReadUInt(0x74); set => Write(0x74, value); } [Category("Destructable")] - public AssetID SHRP_AssetID2 + public AssetID HitShrapnel_AssetID { get => ReadUInt(0x78 + Offset); set => Write(0x78 + Offset, value); } [Category("Destructable")] - public AssetID SFX_AssetID1 + public AssetID DestroySFX_AssetID { get => ReadUInt(0x7C + Offset); set => Write(0x7C + Offset, value); } [Category("Destructable")] - public AssetID SFX_AssetID2 + public AssetID HitSFX_AssetID { get => ReadUInt(0x80 + Offset); set => Write(0x80 + Offset, value); } [Category("Destructable")] - public AssetID DestroyedModelAssetID1 + public AssetID HitModel_AssetID { get => ReadUInt(0x84 + Offset); set => Write(0x84 + Offset, value); } [Category("Destructable")] - public AssetID DestroyedModelAssetID2 + public AssetID DestroyModel_AssetID { get => ReadUInt(0x88 + Offset); set => Write(0x88 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetEGEN.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetEGEN.cs index 6caa97a0..488f9d6a 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetEGEN.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetEGEN.cs @@ -15,42 +15,42 @@ public AssetEGEN(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (UnknownAssetID_68 == assetID) + if (OnAnim_AssetID == assetID) return true; return base.HasReference(assetID); } [Category("Electric Arc")] - public int UnknownInt54 + public float Src_dpos_X { - get => ReadInt(0x54 + Offset); + get => ReadFloat(0x54 + Offset); set => Write(0x54 + Offset, value); } [Category("Electric Arc")] - public int UnknownInt58 + public float Src_dpos_Y { - get => ReadInt(0x58 + Offset); + get => ReadFloat(0x58 + Offset); set => Write(0x58 + Offset, value); } [Category("Electric Arc")] - public int UnknownInt5C + public float Src_dpos_Z { - get => ReadInt(0x5C + Offset); + get => ReadFloat(0x5C + Offset); set => Write(0x5C + Offset, value); } [Category("Electric Arc")] - public byte UnknownByte60 + public byte DamageType { get => ReadByte(0x60 + Offset); set => Write(0x60 + Offset, value); } [Category("Electric Arc")] - public byte UnknownByte61 + public byte EgenFlags { get => ReadByte(0x61 + Offset); set => Write(0x61 + Offset, value); @@ -71,14 +71,14 @@ public byte UnknownByte63 } [Category("Electric Arc"), TypeConverter(typeof(FloatTypeConverter))] - public float TimeActiveSeconds + public float ActiveTimeSeconds { get => ReadFloat(0x64 + Offset); set => Write(0x64 + Offset, value); } [Category("Electric Arc")] - public AssetID UnknownAssetID_68 + public AssetID OnAnim_AssetID { get => ReadUInt(0x68 + Offset); set => Write(0x68 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetHANG.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetHANG.cs index 4bd25bf4..7a1f6f7a 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetHANG.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetHANG.cs @@ -14,56 +14,56 @@ public AssetHANG(Section_AHDR AHDR) : base(AHDR) { } protected override int EventStartOffset => 0x74 + Offset; [Category("Hangable")] - public int UnknownInt54 + public int HangFlags { get => ReadInt(0x54 + Offset); set => Write(0x54 + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat58 + public float PivotOffset { get => ReadFloat(0x58 + Offset); set => Write(0x58 + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat5C + public float LeverArm { get => ReadFloat(0x5C + Offset); set => Write(0x5C + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat60 + public float Gravity { get => ReadFloat(0x60 + Offset); set => Write(0x60 + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat64 + public float Acceleration { get => ReadFloat(0x64 + Offset); set => Write(0x64 + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat68 + public float Decay { get => ReadFloat(0x68 + Offset); set => Write(0x68 + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat6C + public float GrabDelay { get => ReadFloat(0x6C + Offset); set => Write(0x6C + Offset, value); } [Category("Hangable"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat70 + public float StopDeceleration { get => ReadFloat(0x70 + Offset); set => Write(0x70 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPEND.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPEND.cs index d42f4d76..8ae52831 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPEND.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPEND.cs @@ -1,4 +1,5 @@ using HipHopFile; +using SharpDX; using System.ComponentModel; namespace IndustrialPark @@ -56,12 +57,19 @@ public float MovementDistance } [Category("Pendulum"), TypeConverter(typeof(FloatTypeConverter))] - public float Steepness + public float SteepnessRad { get => ReadFloat(0x60 + Offset); set => Write(0x60 + Offset, value); } + [Category("Pendulum"), TypeConverter(typeof(FloatTypeConverter))] + public float SteepnessDeg + { + get => MathUtil.RadiansToDegrees(ReadFloat(0x60 + Offset)); + set => Write(0x60 + Offset, MathUtil.DegreesToRadians(value)); + } + [Category("Pendulum"), TypeConverter(typeof(FloatTypeConverter))] public float MovementTime { @@ -69,13 +77,20 @@ public float MovementTime set => Write(0x64 + Offset, value); } - [Category("Pendulum")] - public int UnknownInt68 + [Category("Pendulum"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat68Rad { - get => ReadInt(0x68 + Offset); + get => ReadFloat(0x68 + Offset); set => Write(0x68 + Offset, value); } + [Category("Pendulum"), TypeConverter(typeof(FloatTypeConverter))] + public float UnknownFloat68Deg + { + get => MathUtil.RadiansToDegrees(ReadFloat(0x68 + Offset)); + set => Write(0x68 + Offset, MathUtil.DegreesToRadians(value)); + } + [Category("Pendulum")] public int UnknownInt6C { diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPKUP.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPKUP.cs index a88b3949..4f77ccc4 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPKUP.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPKUP.cs @@ -104,14 +104,14 @@ public AssetID PickReferenceID } [Category("Pickup")] - public short UnknownShort58 + public short PickupFlags { get => ReadShort(0x58 + Offset); set => Write(0x58 + Offset, value); } [Category("Pickup")] - public short UnknownShort5A + public short PickupValue { get => ReadShort(0x5A + Offset); set => Write(0x5A + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLAT.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLAT.cs index 8abb11f4..ee218414 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLAT.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLAT.cs @@ -254,20 +254,6 @@ public override void Draw(SharpRenderer renderer) renderer.DrawCube(LocalWorld(), isSelected); } - [Browsable(false)] - public override AssetID ReferenceAssetID - { - get { return ReadUInt(0x50 + Offset); } - set { Write(0x50 + Offset, value); } - } - - [Category("Platform")] - public AssetID AnimationAssetID - { - get { return ReadUInt(0x50 + Offset); } - set { Write(0x50 + Offset, value); } - } - [Category("Platform")] public PlatType PlatformType { diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs index b03971ea..34d84119 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs @@ -18,7 +18,7 @@ public AssetPLYR(Section_AHDR AHDR) : base(AHDR) { } public override bool HasReference(uint assetID) { - if (LightKitID == assetID) + if (LightKit_AssetID == assetID) return true; return base.HasReference(assetID); @@ -53,7 +53,7 @@ public override void Draw(SharpRenderer renderer) } [Category("Player References")] - public AssetID LightKitID + public AssetID LightKit_AssetID { get => ReadUInt(EventStartOffset + AmountOfEvents * AssetEvent.sizeOfStruct); set => Write(EventStartOffset + AmountOfEvents * AssetEvent.sizeOfStruct, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetSIMP.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetSIMP.cs index fccc39f6..b4e9d8f2 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetSIMP.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetSIMP.cs @@ -12,40 +12,47 @@ public class AssetSIMP : PlaceableAsset protected override int EventStartOffset => 0x60 + Offset; public AssetSIMP(Section_AHDR AHDR) : base(AHDR) { } - - [Browsable(false)] - public override AssetID ReferenceAssetID - { - get { return ReadUInt(0x50 + Offset); } - set { Write(0x50 + Offset, value); } - } - - [Category("Simple Object")] - public AssetID AnimationAssetID - { - get { return ReadUInt(0x50 + Offset); } - set { Write(0x50 + Offset, value); } - } - + [Category("Simple Object"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat_54 + public float AnimSpeed { get => ReadFloat(0x54 + Offset); set => Write(0x54 + Offset, value); } [Category("Simple Object")] - public int Unknown_58 + public int InitialAnimState { get => ReadInt(0x58 + Offset); set => Write(0x58 + Offset, value); } - [Category("Simple Object"), TypeConverter(typeof(HexIntTypeConverter))] - public int Unknown_5C + [Category("Simple Object"), TypeConverter(typeof(HexByteTypeConverter))] + public byte CollType { - get => ReadInt(0x5C + Offset); + get => ReadByte(0x5C + Offset); set => Write(0x5C + Offset, value); } + + [Category("Simple Object"), TypeConverter(typeof(HexByteTypeConverter))] + public byte SimpFlags + { + get => ReadByte(0x5D + Offset); + set => Write(0x5D + Offset, value); + } + + [Category("Simple Object"), TypeConverter(typeof(HexByteTypeConverter))] + public byte Padding5E + { + get => ReadByte(0x5E + Offset); + set => Write(0x5E + Offset, value); + } + + [Category("Simple Object"), TypeConverter(typeof(HexByteTypeConverter))] + public byte Padding5F + { + get => ReadByte(0x5F + Offset); + set => Write(0x5F + Offset, value); + } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetTRIG.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetTRIG.cs index dd204811..63b7424b 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetTRIG.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetTRIG.cs @@ -415,30 +415,30 @@ public float Position3Z } [Category("Trigger"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownTriggerFloat1 + public float DirectionX { get => ReadFloat(0x84 + Offset); set => Write(0x84 + Offset, value); } [Category("Trigger"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownTriggerFloat2 + public float DirectionY { get => ReadFloat(0x88 + Offset); set => Write(0x88 + Offset, value); } [Category("Trigger"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownTriggerFloat3 + public float DirectionZ { get => ReadFloat(0x8C + Offset); set => Write(0x8C + Offset, value); } - [Category("Trigger"), TypeConverter(typeof(FloatTypeConverter))] - public float UnknownTriggerFloat4 + [Category("Trigger")] + public int TriggerFlags { - get => ReadFloat(0x90 + Offset); + get => ReadInt(0x90 + Offset); set => Write(0x90 + Offset, value); } } diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUI.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUI.cs index 50b25fc1..ca85803e 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUI.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUI.cs @@ -111,14 +111,14 @@ public override void Draw(SharpRenderer renderer) } [Browsable(false)] - public override AssetID ReferenceAssetID + public override AssetID Animation_AssetID { get { return ReadUInt(0x50 + Offset); } set { Write(0x50 + Offset, value); } } [Category("UserInterface")] - public AssetID SoundAssetID + public AssetID Sound_AssetID { get { return ReadUInt(0x50 + Offset); } set { Write(0x50 + Offset, value); } @@ -132,7 +132,7 @@ public AssetID AnimListAssetID } [Category("UserInterface")] - public int UnknownInt_54 + public int UIFlags { get => ReadInt(0x54 + Offset); set => Write(0x54 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUIFT.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUIFT.cs index 0037fda0..7fc8c15b 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUIFT.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetUIFT.cs @@ -25,19 +25,26 @@ public override bool HasReference(uint assetID) } [Category("UIFont")] - public short UnknownShort_80 + public short UIFontFlags { get => ReadShort(0x80 + Offset); set => Write(0x80 + Offset, value); } [Category("UIFont")] - public short UnknownShort_82 + public byte UIFontMode { - get => ReadShort(0x82 + Offset); + get => ReadByte(0x82 + Offset); set => Write(0x82 + Offset, value); } + [Category("UIFont")] + public byte FontID + { + get => ReadByte(0x83 + Offset); + set => Write(0x83 + Offset, value); + } + [Category("UIFont")] public AssetID TextAssetID { @@ -94,63 +101,63 @@ public byte FontColorAlpha } [Category("UIFont")] - public short UnknownShort_90 + public short Inset_90 { get => ReadShort(0x90 + Offset); set => Write(0x90 + Offset, value); } [Category("UIFont")] - public short UnknownShort_92 + public short Inset_92 { get => ReadShort(0x92 + Offset); set => Write(0x92 + Offset, value); } [Category("UIFont")] - public short UnknownShort_94 + public short Inset_94 { get => ReadShort(0x94 + Offset); set => Write(0x94 + Offset, value); } [Category("UIFont")] - public short UnknownShort_96 + public short Inset_96 { get => ReadShort(0x96 + Offset); set => Write(0x96 + Offset, value); } [Category("UIFont")] - public short UnknownShort_98 + public short Space_98 { get => ReadShort(0x98 + Offset); set => Write(0x98 + Offset, value); } [Category("UIFont")] - public short UnknownShort_9A + public short Space_9A { get => ReadShort(0x9A + Offset); set => Write(0x9A + Offset, value); } [Category("UIFont")] - public short UnknownShort_9C + public short Cdim_9C { get => ReadShort(0x9C + Offset); set => Write(0x9C + Offset, value); } [Category("UIFont")] - public short UnknownShort_9E + public short Cdim_9E { get => ReadShort(0x9E + Offset); set => Write(0x9E + Offset, value); } [Category("UIFont")] - public int UnknownInt_A0 + public int MaxHeight { get => ReadInt(0xA0 + Offset); set => Write(0xA0 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetVIL.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetVIL.cs index fe12601e..c94ce6c4 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetVIL.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetVIL.cs @@ -20,13 +20,13 @@ public override bool HasReference(uint assetID) { if ((uint)VilType == assetID) return true; - if (AssetID_DYNA_NPCSettings == assetID) + if (NPCSettings_AssetID == assetID) return true; - if (AssetID_MVPT == assetID) + if (MovePoint_AssetID == assetID) return true; - if (AssetID_DYNA_1 == assetID) + if (TaskDYNA1_AssetID == assetID) return true; - if (AssetID_DYNA_2 == assetID) + if (TaskDYNA2_AssetID == assetID) return true; return base.HasReference(assetID); @@ -41,7 +41,7 @@ public void Reset() public override Matrix LocalWorld() { - if (movementPreview && AssetID_MVPT != 0) + if (movementPreview && MovePoint_AssetID != 0) { AssetMVPT driver = FindMVPT(out bool found); @@ -49,7 +49,7 @@ public override Matrix LocalWorld() { return Matrix.Scaling(_scale) * Matrix.Translation(driver.PositionX, driver.PositionY, driver.PositionZ) - * Matrix.Translation((float)(driver.MovementRadius * Math.Cos(localFrameCounter * Math.PI / 180f)), 0f, (float)(driver.MovementRadius * Math.Sin(localFrameCounter * Math.PI / 180f))); + * Matrix.Translation((float)(driver.ZoneRadius * Math.Cos(localFrameCounter * Math.PI / 180f)), 0f, (float)(driver.ZoneRadius * Math.Sin(localFrameCounter * Math.PI / 180f))); } } @@ -59,11 +59,11 @@ public override Matrix LocalWorld() private AssetMVPT FindMVPT(out bool found) { foreach (ArchiveEditor ae in Program.MainForm.archiveEditors) - if (ae.archive.ContainsAsset(AssetID_MVPT)) + if (ae.archive.ContainsAsset(MovePoint_AssetID)) { - Asset asset = ae.archive.GetFromAssetID(AssetID_MVPT); + Asset asset = ae.archive.GetFromAssetID(MovePoint_AssetID); if (asset is AssetMVPT MVPT) - return FindMVPTWithRadius(MVPT, out found, new List() { AssetID_MVPT }); + return FindMVPTWithRadius(MVPT, out found, new List() { MovePoint_AssetID }); } found = false; @@ -74,7 +74,7 @@ private AssetMVPT FindMVPTWithRadius(AssetMVPT MVPT, out bool found, List { if (MVPT != null) { - if (MVPT.MovementRadius != -1f) + if (MVPT.ZoneRadius != -1f) { found = true; return MVPT; @@ -114,7 +114,7 @@ public override void Draw(SharpRenderer renderer) } [Category("VIL")] - public int Unknown54 + public int VilFlags { get => ReadInt(0x54 + Offset); set => Write(0x54 + Offset, value); @@ -128,28 +128,28 @@ public VilType VilType } [Category("VIL")] - public AssetID AssetID_DYNA_NPCSettings + public AssetID NPCSettings_AssetID { get => ReadUInt(0x5C + Offset); set => Write(0x5C + Offset, value); } [Category("VIL")] - public AssetID AssetID_MVPT + public AssetID MovePoint_AssetID { get => ReadUInt(0x60 + Offset); set => Write(0x60 + Offset, value); } [Category("VIL")] - public AssetID AssetID_DYNA_1 + public AssetID TaskDYNA1_AssetID { get => ReadUInt(0x64 + Offset); set => Write(0x64 + Offset, value); } [Category("VIL")] - public AssetID AssetID_DYNA_2 + public AssetID TaskDYNA2_AssetID { get => ReadUInt(0x68 + Offset); set => Write(0x68 + Offset, value); diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/AssetDYNA.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/AssetDYNA.cs index 3f025c35..0eb6eac9 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/AssetDYNA.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/AssetDYNA.cs @@ -128,7 +128,7 @@ public short Version } [Category("Dynamic")] - public short Unknown + public short Handle { get => ReadShort(0xE); set => Write(0xE, value); diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBoulderGen.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBoulderGen.cs index 60940974..4d658d16 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBoulderGen.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBoulderGen.cs @@ -11,12 +11,12 @@ public class DynaBoulderGen : DynaBase public DynaBoulderGen() : base() { - Unknown_ID = 0; + ObjectAssetID = 0; } public override bool HasReference(uint assetID) { - if (Unknown_ID == assetID) + if (ObjectAssetID == assetID) return true; return base.HasReference(assetID); @@ -24,68 +24,68 @@ public override bool HasReference(uint assetID) public DynaBoulderGen(IEnumerable enumerable) : base (enumerable) { - Unknown_ID = Switch(BitConverter.ToUInt32(Data, 0x0)); - Float1 = Switch(BitConverter.ToSingle(Data, 0x04)); - Float2 = Switch(BitConverter.ToSingle(Data, 0x08)); - Float3 = Switch(BitConverter.ToSingle(Data, 0x0C)); - Float4 = Switch(BitConverter.ToSingle(Data, 0x10)); - Float5 = Switch(BitConverter.ToSingle(Data, 0x14)); - Float6 = Switch(BitConverter.ToSingle(Data, 0x18)); - Float7 = Switch(BitConverter.ToSingle(Data, 0x1C)); - Float8 = Switch(BitConverter.ToSingle(Data, 0x20)); - Float9 = Switch(BitConverter.ToSingle(Data, 0x24)); - Float10 = Switch(BitConverter.ToSingle(Data, 0x28)); - Float11 = Switch(BitConverter.ToSingle(Data, 0x2C)); - Float12 = Switch(BitConverter.ToSingle(Data, 0x30)); - Float13 = Switch(BitConverter.ToSingle(Data, 0x34)); + ObjectAssetID = Switch(BitConverter.ToUInt32(Data, 0x0)); + OffsetX = Switch(BitConverter.ToSingle(Data, 0x04)); + OffsetY = Switch(BitConverter.ToSingle(Data, 0x08)); + OffsetZ = Switch(BitConverter.ToSingle(Data, 0x0C)); + OffsetRand = Switch(BitConverter.ToSingle(Data, 0x10)); + InitVelX = Switch(BitConverter.ToSingle(Data, 0x14)); + InitVelY = Switch(BitConverter.ToSingle(Data, 0x18)); + InitVelZ = Switch(BitConverter.ToSingle(Data, 0x1C)); + VelAngleRand = Switch(BitConverter.ToSingle(Data, 0x20)); + VelMagRand = Switch(BitConverter.ToSingle(Data, 0x24)); + InitAxisX = Switch(BitConverter.ToSingle(Data, 0x28)); + InitAxisY = Switch(BitConverter.ToSingle(Data, 0x2C)); + InitAxisZ = Switch(BitConverter.ToSingle(Data, 0x30)); + AngVel = Switch(BitConverter.ToSingle(Data, 0x34)); } public override byte[] ToByteArray() { List list = new List(); - list.AddRange(BitConverter.GetBytes(Switch(Unknown_ID))); - list.AddRange(BitConverter.GetBytes(Switch(Float1))); - list.AddRange(BitConverter.GetBytes(Switch(Float2))); - list.AddRange(BitConverter.GetBytes(Switch(Float3))); - list.AddRange(BitConverter.GetBytes(Switch(Float4))); - list.AddRange(BitConverter.GetBytes(Switch(Float5))); - list.AddRange(BitConverter.GetBytes(Switch(Float6))); - list.AddRange(BitConverter.GetBytes(Switch(Float7))); - list.AddRange(BitConverter.GetBytes(Switch(Float8))); - list.AddRange(BitConverter.GetBytes(Switch(Float9))); - list.AddRange(BitConverter.GetBytes(Switch(Float10))); - list.AddRange(BitConverter.GetBytes(Switch(Float11))); - list.AddRange(BitConverter.GetBytes(Switch(Float12))); - list.AddRange(BitConverter.GetBytes(Switch(Float13))); + list.AddRange(BitConverter.GetBytes(Switch(ObjectAssetID))); + list.AddRange(BitConverter.GetBytes(Switch(OffsetX))); + list.AddRange(BitConverter.GetBytes(Switch(OffsetY))); + list.AddRange(BitConverter.GetBytes(Switch(OffsetZ))); + list.AddRange(BitConverter.GetBytes(Switch(OffsetRand))); + list.AddRange(BitConverter.GetBytes(Switch(InitVelX))); + list.AddRange(BitConverter.GetBytes(Switch(InitVelY))); + list.AddRange(BitConverter.GetBytes(Switch(InitVelZ))); + list.AddRange(BitConverter.GetBytes(Switch(VelAngleRand))); + list.AddRange(BitConverter.GetBytes(Switch(VelMagRand))); + list.AddRange(BitConverter.GetBytes(Switch(InitAxisX))); + list.AddRange(BitConverter.GetBytes(Switch(InitAxisY))); + list.AddRange(BitConverter.GetBytes(Switch(InitAxisZ))); + list.AddRange(BitConverter.GetBytes(Switch(AngVel))); return list.ToArray(); } - public AssetID Unknown_ID { get; set; } + public AssetID ObjectAssetID { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float1 { get; set; } + public float OffsetX { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float2 { get; set; } + public float OffsetY { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float3 { get; set; } + public float OffsetZ { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float4 { get; set; } + public float OffsetRand { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float5 { get; set; } + public float InitVelX { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float6 { get; set; } + public float InitVelY { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float7 { get; set; } + public float InitVelZ { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float8 { get; set; } + public float VelAngleRand { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float9 { get; set; } + public float VelMagRand { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float10 { get; set; } + public float InitAxisX { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float11 { get; set; } + public float InitAxisY { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float12 { get; set; } + public float InitAxisZ { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float Float13 { get; set; } + public float AngVel { get; set; } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBusStop.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBusStop.cs index ebe578ea..55cc1df3 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBusStop.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaBusStop.cs @@ -34,7 +34,7 @@ public DynaBusStop(IEnumerable enumerable) : base (enumerable) Player = Switch(BitConverter.ToInt32(Data, 0x4)); CAM_ID = Switch(BitConverter.ToUInt32(Data, 0x8)); SIMP_ID = Switch(BitConverter.ToUInt32(Data, 0xC)); - CharacterSwitchTimer = Switch(BitConverter.ToSingle(Data, 0x10)); + Delay = Switch(BitConverter.ToSingle(Data, 0x10)); } public override byte[] ToByteArray() @@ -44,7 +44,7 @@ public override byte[] ToByteArray() list.AddRange(BitConverter.GetBytes(Switch(Player))); list.AddRange(BitConverter.GetBytes(Switch(CAM_ID))); list.AddRange(BitConverter.GetBytes(Switch(SIMP_ID))); - list.AddRange(BitConverter.GetBytes(Switch(CharacterSwitchTimer))); + list.AddRange(BitConverter.GetBytes(Switch(Delay))); return list.ToArray(); } @@ -53,6 +53,6 @@ public override byte[] ToByteArray() public AssetID CAM_ID { get; set; } public AssetID SIMP_ID { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float CharacterSwitchTimer { get; set; } + public float Delay { get; set; } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaCamTweak.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaCamTweak.cs index 67aafad0..e51b766e 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaCamTweak.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaCamTweak.cs @@ -13,28 +13,28 @@ public DynaCamTweak() : base() { } public DynaCamTweak(IEnumerable enumerable) : base (enumerable) { - UnknownInt = Switch(BitConverter.ToInt32(Data, 0x0)); - UnknownFloat1 = Switch(BitConverter.ToSingle(Data, 0x04)); - UnknownFloat2 = Switch(BitConverter.ToSingle(Data, 0x08)); - UnknownFloat3 = Switch(BitConverter.ToSingle(Data, 0x0C)); + Priority = Switch(BitConverter.ToInt32(Data, 0x0)); + Time = Switch(BitConverter.ToSingle(Data, 0x04)); + PitchAdjust = Switch(BitConverter.ToSingle(Data, 0x08)); + DistAdjust = Switch(BitConverter.ToSingle(Data, 0x0C)); } public override byte[] ToByteArray() { List list = new List(); - list.AddRange(BitConverter.GetBytes(Switch(UnknownInt))); - list.AddRange(BitConverter.GetBytes(Switch(UnknownFloat1))); - list.AddRange(BitConverter.GetBytes(Switch(UnknownFloat2))); - list.AddRange(BitConverter.GetBytes(Switch(UnknownFloat3))); + list.AddRange(BitConverter.GetBytes(Switch(Priority))); + list.AddRange(BitConverter.GetBytes(Switch(Time))); + list.AddRange(BitConverter.GetBytes(Switch(PitchAdjust))); + list.AddRange(BitConverter.GetBytes(Switch(DistAdjust))); return list.ToArray(); } - public int UnknownInt { get; set; } + public int Priority { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat1 { get; set; } + public float Time { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat2 { get; set; } + public float PitchAdjust { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float UnknownFloat3 { get; set; } + public float DistAdjust { get; set; } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaNPCSettings.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaNPCSettings.cs index 6d47f2fa..e536a251 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaNPCSettings.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaNPCSettings.cs @@ -13,74 +13,74 @@ public DynaNPCSettings() : base() { } public DynaNPCSettings(IEnumerable enumerable) : base (enumerable) { - Unknown1 = Switch(BitConverter.ToInt32(Data, 0x0)); - Flags1 = Data[0x4]; - Flags2 = Data[0x5]; - Flags3 = Data[0x6]; - Flags4 = Data[0x7]; - Flags5 = Data[0x8]; - Flags6 = Data[0x9]; - Flags7 = Data[0xA]; - Flags8 = Data[0xB]; - Flags9 = Data[0xC]; - Flags10 = Data[0xD]; - Flags11 = Data[0xE]; - Flags12 = Data[0xF]; - Unknown2 = Switch(BitConverter.ToInt32(Data, 0x10)); - DuploSpawnRate = Switch(BitConverter.ToSingle(Data, 0x14)); - DuploEnemyLimit = Switch(BitConverter.ToInt32(Data, 0x18)); + BasisType = Switch(BitConverter.ToInt32(Data, 0x0)); + AllowDetect = Data[0x4]; + AllowPatrol = Data[0x5]; + AllowWander = Data[0x6]; + ReduceCollide = Data[0x7]; + UseNavSplines = Data[0x8]; + Padding09 = Data[0x9]; + Padding0A = Data[0xA]; + Padding0B = Data[0xB]; + AllowChase = Data[0xC]; + AllowAttack = Data[0xD]; + AssumeLOS = Data[0xE]; + AssumeFOV = Data[0xF]; + DuploWaveMode = Switch(BitConverter.ToInt32(Data, 0x10)); + DuploSpawnDelay = Switch(BitConverter.ToSingle(Data, 0x14)); + DuploSpawnLifeMax = Switch(BitConverter.ToInt32(Data, 0x18)); } public override byte[] ToByteArray() { List list = new List(); - list.AddRange(BitConverter.GetBytes(Switch(Unknown1))); - list.Add(Flags1); - list.Add(Flags2); - list.Add(Flags3); - list.Add(Flags4); - list.Add(Flags5); - list.Add(Flags6); - list.Add(Flags7); - list.Add(Flags8); - list.Add(Flags9); - list.Add(Flags10); - list.Add(Flags11); - list.Add(Flags12); - list.AddRange(BitConverter.GetBytes(Switch(Unknown2))); - list.AddRange(BitConverter.GetBytes(Switch(DuploSpawnRate))); - list.AddRange(BitConverter.GetBytes(Switch(DuploEnemyLimit))); + list.AddRange(BitConverter.GetBytes(Switch(BasisType))); + list.Add(AllowDetect); + list.Add(AllowPatrol); + list.Add(AllowWander); + list.Add(ReduceCollide); + list.Add(UseNavSplines); + list.Add(Padding09); + list.Add(Padding0A); + list.Add(Padding0B); + list.Add(AllowChase); + list.Add(AllowAttack); + list.Add(AssumeLOS); + list.Add(AssumeFOV); + list.AddRange(BitConverter.GetBytes(Switch(DuploWaveMode))); + list.AddRange(BitConverter.GetBytes(Switch(DuploSpawnDelay))); + list.AddRange(BitConverter.GetBytes(Switch(DuploSpawnLifeMax))); return list.ToArray(); } - public int Unknown1 { get; set; } + public int BasisType { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags1 { get; set; } + public byte AllowDetect { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags2 { get; set; } + public byte AllowPatrol { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags3 { get; set; } + public byte AllowWander { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags4 { get; set; } + public byte ReduceCollide { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags5 { get; set; } + public byte UseNavSplines { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags6 { get; set; } + public byte Padding09 { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags7 { get; set; } + public byte Padding0A { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags8 { get; set; } + public byte Padding0B { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags9 { get; set; } + public byte AllowChase { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags10 { get; set; } + public byte AllowAttack { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags11 { get; set; } + public byte AssumeLOS { get; set; } [TypeConverter(typeof(HexByteTypeConverter))] - public byte Flags12 { get; set; } - public int Unknown2 { get; set; } + public byte AssumeFOV { get; set; } + public int DuploWaveMode { get; set; } [TypeConverter(typeof(FloatTypeConverter))] - public float DuploSpawnRate { get; set; } - public int DuploEnemyLimit { get; set; } + public float DuploSpawnDelay { get; set; } + public int DuploSpawnLifeMax { get; set; } } } \ No newline at end of file diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaTeleport_BFBB.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaTeleport_BFBB.cs index 56994671..b8c9327f 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaTeleport_BFBB.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaTeleport_BFBB.cs @@ -14,7 +14,7 @@ public DynaTeleport_BFBB(int version) : base() { this.version = version; MRKR_ID = 0; - DYNA_Teleport_ID = 0; + TargetDYNATeleportID = 0; } private int version; @@ -23,16 +23,16 @@ public DynaTeleport_BFBB(IEnumerable enumerable, int version) : base(enume { this.version = version; MRKR_ID = Switch(BitConverter.ToUInt32(Data, 0x0)); - UnknownInt = Switch(BitConverter.ToInt32(Data, 0x4)); - Rotation = Switch(BitConverter.ToInt32(Data, 0x8)); + Opened = Switch(BitConverter.ToInt32(Data, 0x4)); + LaunchAngle = Switch(BitConverter.ToInt32(Data, 0x8)); if (version == 2) { - Rotation2 = Switch(BitConverter.ToInt32(Data, 0xC)); - DYNA_Teleport_ID = Switch(BitConverter.ToUInt32(Data, 0x10)); + CameraAngle = Switch(BitConverter.ToInt32(Data, 0xC)); + TargetDYNATeleportID = Switch(BitConverter.ToUInt32(Data, 0x10)); } else { - DYNA_Teleport_ID = Switch(BitConverter.ToUInt32(Data, 0x0C)); + TargetDYNATeleportID = Switch(BitConverter.ToUInt32(Data, 0x0C)); } } @@ -40,7 +40,7 @@ public override bool HasReference(uint assetID) { if (MRKR_ID == assetID) return true; - if (DYNA_Teleport_ID == assetID) + if (TargetDYNATeleportID == assetID) return true; return base.HasReference(assetID); @@ -50,11 +50,11 @@ public override byte[] ToByteArray() { List list = new List(); list.AddRange(BitConverter.GetBytes(Switch(MRKR_ID))); - list.AddRange(BitConverter.GetBytes(Switch(UnknownInt))); - list.AddRange(BitConverter.GetBytes(Switch(Rotation))); + list.AddRange(BitConverter.GetBytes(Switch(Opened))); + list.AddRange(BitConverter.GetBytes(Switch(LaunchAngle))); if (version == 2) - list.AddRange(BitConverter.GetBytes(Switch(Rotation2))); - list.AddRange(BitConverter.GetBytes(Switch(DYNA_Teleport_ID))); + list.AddRange(BitConverter.GetBytes(Switch(CameraAngle))); + list.AddRange(BitConverter.GetBytes(Switch(TargetDYNATeleportID))); return list.ToArray(); } @@ -87,10 +87,10 @@ private void ValidateMRKR() } [Category("Teleport Box")] - public int UnknownInt { get; set; } + public int Opened { get; set; } private int _rotation; [Category("Teleport Box"), Browsable(true)] - public int Rotation + public int LaunchAngle { get => _rotation; set @@ -100,9 +100,9 @@ public int Rotation } } [Category("Teleport Box")] - public int Rotation2 { get; set; } + public int CameraAngle { get; set; } [Category("Teleport Box")] - public AssetID DYNA_Teleport_ID { get; set; } + public AssetID TargetDYNATeleportID { get; set; } [Category("Teleport Box"), Browsable(true), TypeConverter(typeof(FloatTypeConverter))] public override float PositionX @@ -169,7 +169,7 @@ public override float PositionZ public override void CreateTransformMatrix() { ValidateMRKR(); - world = Matrix.RotationY(MathUtil.DegreesToRadians(Rotation)) * Matrix.Translation(PositionX, PositionY, PositionZ); + world = Matrix.RotationY(MathUtil.DegreesToRadians(LaunchAngle)) * Matrix.Translation(PositionX, PositionY, PositionZ); List vertexList = new List(); if (ArchiveEditorFunctions.renderingDictionary.ContainsKey(_modelAssetID) && diff --git a/IndustrialPark/Assets/Shared/PlaceableAsset.cs b/IndustrialPark/Assets/Shared/PlaceableAsset.cs index a915da97..ab16c05b 100644 --- a/IndustrialPark/Assets/Shared/PlaceableAsset.cs +++ b/IndustrialPark/Assets/Shared/PlaceableAsset.cs @@ -151,11 +151,11 @@ public virtual float GetDistance(Vector3 cameraPosition) public override bool HasReference(uint assetID) { - if (SurfaceAssetID == assetID) + if (Surface_AssetID == assetID) return true; - if (ModelAssetID == assetID) + if (Model_AssetID == assetID) return true; - if (ReferenceAssetID == assetID) + if (Animation_AssetID == assetID) return true; return base.HasReference(assetID); @@ -186,21 +186,21 @@ public bool UseGravity public byte TypeFlag { get => ReadByte(0x9); - set { Write(0x9, value); } + set => Write(0x9, value); } [Category("Placement Flags"), TypeConverter(typeof(HexByteTypeConverter))] public byte UnknownFlag0A { get => ReadByte(0xA); - set { Write(0xA, value); } + set => Write(0xA, value); } [Category("Placement Flags"), TypeConverter(typeof(HexByteTypeConverter))] public byte SolidityFlag { get => ReadByte(0xB); - set { Write(0xB, value); } + set => Write(0xB, value); } [Category("Placement Flags")] @@ -211,17 +211,17 @@ public bool PreciseCollision } [Category("Placement")] - public int UnknownIntC + public int PaddingC { get => ReadInt(0xC); - set { Write(0xC, value); } + set => Write(0xC, value); } [Category("Placement References")] - public AssetID SurfaceAssetID + public AssetID Surface_AssetID { get => ReadUInt(0x10 + Offset); - set { Write(0x10 + Offset, value); } + set => Write(0x10 + Offset, value); } public Vector3 _position; @@ -409,7 +409,7 @@ public System.Drawing.Color Color_ARGB } [Category("Placement")] - public float UnknownFloat48 + public float ColorAlphaSpeed { get => ReadFloat(0x48 + Offset); set { Write(0x48 + Offset, value); } @@ -417,7 +417,7 @@ public float UnknownFloat48 protected uint _modelAssetID; [Category("Placement References")] - public AssetID ModelAssetID + public AssetID Model_AssetID { get => _modelAssetID; set @@ -428,7 +428,7 @@ public AssetID ModelAssetID } [Category("Placement References")] - public virtual AssetID ReferenceAssetID + public virtual AssetID Animation_AssetID { get => ReadUInt(0x50 + Offset); set { Write(0x50 + Offset, value); } diff --git a/IndustrialPark/IndustrialPark.csproj b/IndustrialPark/IndustrialPark.csproj index 33eb8dde..31008bbc 100644 --- a/IndustrialPark/IndustrialPark.csproj +++ b/IndustrialPark/IndustrialPark.csproj @@ -400,6 +400,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/IndustrialPark/MainForm/AboutBox.Designer.cs b/IndustrialPark/MainForm/AboutBox.Designer.cs index 8af340b7..35d1a218 100644 --- a/IndustrialPark/MainForm/AboutBox.Designer.cs +++ b/IndustrialPark/MainForm/AboutBox.Designer.cs @@ -103,7 +103,7 @@ private void InitializeComponent() this.labelVersion.Name = "labelVersion"; this.labelVersion.Size = new System.Drawing.Size(271, 17); this.labelVersion.TabIndex = 0; - this.labelVersion.Text = "Preview 30"; + this.labelVersion.Text = "Preview 31"; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // labelCopyright diff --git a/IndustrialPark/MainForm/MainForm.cs b/IndustrialPark/MainForm/MainForm.cs index 7a1c4397..b89e4b29 100644 --- a/IndustrialPark/MainForm/MainForm.cs +++ b/IndustrialPark/MainForm/MainForm.cs @@ -1108,9 +1108,11 @@ public static void PopulateTemplateMenusAt(ToolStripMenuItem menu, EventHandler new ToolStripMenuItem(AssetTemplate.Button_Generic.ToString()), new ToolStripMenuItem(AssetTemplate.Destructible_Generic.ToString()), new ToolStripMenuItem(AssetTemplate.ElectricArc_Generic.ToString()), + new ToolStripMenuItem(AssetTemplate.Pendulum_Generic.ToString()), new ToolStripMenuItem(AssetTemplate.Platform_Generic.ToString()), new ToolStripMenuItem(AssetTemplate.Player_Generic.ToString()), new ToolStripMenuItem(AssetTemplate.SIMP_Generic.ToString()), + new ToolStripMenuItem(AssetTemplate.VIL_Generic.ToString()), }); foreach (ToolStripItem i in placeable.DropDownItems) if (i is ToolStripMenuItem j) diff --git a/IndustrialPark/Resources/Templates/BFBB/PEND b/IndustrialPark/Resources/Templates/BFBB/PEND new file mode 100644 index 00000000..1ee2e782 Binary files /dev/null and b/IndustrialPark/Resources/Templates/BFBB/PEND differ