From 45a92556bdc826e62df0a3026e72b34bc205f13c Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Sat, 25 May 2024 11:24:33 +0100 Subject: [PATCH] Add classic/remastered environment tags (#683) Part of #614. --- TRDataControl/Environment/EMEditorMapping.cs | 14 +- .../Environment/Helpers/EMOptions.cs | 2 +- TRDataControl/Environment/Helpers/EMTag.cs | 2 + .../Environment/Model/BaseEMFunction.cs | 5 +- .../Randomizers/Shared/EnvironmentPicker.cs | 92 ++--- .../TR1/Classic/TR1EnvironmentRandomizer.cs | 10 +- .../Remastered/TR1REnvironmentRandomizer.cs | 18 +- .../TR2/Classic/TR2EnvironmentRandomizer.cs | 9 +- .../Remastered/TR2REnvironmentRandomizer.cs | 17 +- .../TR3/Classic/TR3EnvironmentRandomizer.cs | 9 +- .../Remastered/TR3REnvironmentRandomizer.cs | 17 +- .../Environment/LEVEL10A.PHD-Environment.json | 6 + .../Environment/LEVEL10B.PHD-Environment.json | 16 + .../Environment/LEVEL3B.PHD-Environment.json | 3 + .../Environment/LEVEL5.PHD-Environment.json | 3 + .../Environment/LEVEL7B.PHD-Environment.json | 322 ++++++++++++++++++ .../Environment/LEVEL8B.PHD-Environment.json | 3 + .../Environment/FLOATING.TR2-Environment.json | 9 +- .../Environment/HOUSE.TR2-Environment.json | 33 ++ .../Environment/AREA51.TR2-Environment.json | 9 + .../TR3/Environment/CITY.TR2-Environment.json | 3 +- .../Environment/COMPOUND.TR2-Environment.json | 3 + .../Environment/QUADCHAS.TR2-Environment.json | 3 + 23 files changed, 496 insertions(+), 112 deletions(-) diff --git a/TRDataControl/Environment/EMEditorMapping.cs b/TRDataControl/Environment/EMEditorMapping.cs index 81541c2c5..808168eaa 100644 --- a/TRDataControl/Environment/EMEditorMapping.cs +++ b/TRDataControl/Environment/EMEditorMapping.cs @@ -61,16 +61,10 @@ public void AlternateTextures() } public void SetCommunityPatch(bool isCommunityPatch) - { - All?.SetCommunityPatch(isCommunityPatch); - ConditionalAll?.ForEach(s => s.SetCommunityPatch(isCommunityPatch)); - Any?.ForEach(s => s.SetCommunityPatch(isCommunityPatch)); - AllWithin?.ForEach(a => a.ForEach(s => s.SetCommunityPatch(isCommunityPatch))); - ConditionalAllWithin?.ForEach(s => s.SetCommunityPatch(isCommunityPatch)); - OneOf?.ForEach(s => s.SetCommunityPatch(isCommunityPatch)); - ConditionalOneOf?.ForEach(s => s.SetCommunityPatch(isCommunityPatch)); - Mirrored?.SetCommunityPatch(isCommunityPatch); - } + => Scan(e => e.SetCommunityPatch(isCommunityPatch)); + + public void SetRemastered(bool isRemastered) + => Scan(e => e.SetRemastered(isRemastered)); public List FindAll(Predicate predicate = null) { diff --git a/TRDataControl/Environment/Helpers/EMOptions.cs b/TRDataControl/Environment/Helpers/EMOptions.cs index 801c4650f..49cd4b2f1 100644 --- a/TRDataControl/Environment/Helpers/EMOptions.cs +++ b/TRDataControl/Environment/Helpers/EMOptions.cs @@ -3,6 +3,6 @@ public class EMOptions { public bool EnableHardMode { get; set; } - public IEnumerable ExcludedTags { get; set; } + public List ExcludedTags { get; set; } public EMExclusionMode ExclusionMode { get; set; } } diff --git a/TRDataControl/Environment/Helpers/EMTag.cs b/TRDataControl/Environment/Helpers/EMTag.cs index d65a6e91b..07b29a278 100644 --- a/TRDataControl/Environment/Helpers/EMTag.cs +++ b/TRDataControl/Environment/Helpers/EMTag.cs @@ -15,4 +15,6 @@ public enum EMTag GeneralBugFix, ShortcutFix, KeyItemFix, + RemasteredOnly, + ClassicOnly, } diff --git a/TRDataControl/Environment/Model/BaseEMFunction.cs b/TRDataControl/Environment/Model/BaseEMFunction.cs index fe2f941a0..f7418708c 100644 --- a/TRDataControl/Environment/Model/BaseEMFunction.cs +++ b/TRDataControl/Environment/Model/BaseEMFunction.cs @@ -14,7 +14,7 @@ public abstract class BaseEMFunction public BaseEMFunction HardVariant { get; set; } public List Tags { get; set; } - protected bool _isCommunityPatch; + protected bool _isCommunityPatch, _isRemastered; public abstract void ApplyToLevel(TR1Level level); public abstract void ApplyToLevel(TR2Level level); @@ -23,6 +23,9 @@ public abstract class BaseEMFunction public void SetCommunityPatch(bool isCommunityPatch) => _isCommunityPatch = isCommunityPatch; + public void SetRemastered(bool isRemasterd) + => _isRemastered = isRemasterd; + /// /// Gets the expected vertices for a flat tile. /// asCeiling = true => looking up diff --git a/TRRandomizerCore/Randomizers/Shared/EnvironmentPicker.cs b/TRRandomizerCore/Randomizers/Shared/EnvironmentPicker.cs index 9f4c09727..cecb5470c 100644 --- a/TRRandomizerCore/Randomizers/Shared/EnvironmentPicker.cs +++ b/TRRandomizerCore/Randomizers/Shared/EnvironmentPicker.cs @@ -1,4 +1,5 @@ using TRDataControl.Environment; +using TRGE.Core; using TRRandomizerCore.Editors; using TRRandomizerCore.Helpers; @@ -6,81 +7,82 @@ namespace TRRandomizerCore.Randomizers; public class EnvironmentPicker { + private readonly Random _generator; + private readonly RandomizerSettings _settings; + private readonly TREdition _gfEdition; + public EMOptions Options { get; set; } - public Random Generator { get; set; } - public EnvironmentPicker(bool hardMode) + public EnvironmentPicker(Random generator, RandomizerSettings settings, TREdition gfEdition) { - Options = new EMOptions + Options = new() { - EnableHardMode = hardMode, - ExcludedTags = new List() + EnableHardMode = settings.HardEnvironmentMode, + ExcludedTags = new() }; - } - public void LoadTags(RandomizerSettings settings, bool isCommunityPatch) - { - List excludedTags = new(); - if (!settings.AddReturnPaths) + _generator = generator; + _settings = settings; + _gfEdition = gfEdition; + + ResetTags(); + + if (!_settings.AddReturnPaths) { - excludedTags.Add(EMTag.ReturnPath); + Options.ExcludedTags.Add(EMTag.ReturnPath); } - if (!settings.FixOGBugs) + if (!_settings.FixOGBugs) { - excludedTags.Add(EMTag.GeneralBugFix); + Options.ExcludedTags.Add(EMTag.GeneralBugFix); } - if (!settings.BlockShortcuts) + if (!_settings.BlockShortcuts) { - excludedTags.Add(EMTag.ShortcutFix); + Options.ExcludedTags.Add(EMTag.ShortcutFix); } - if (!settings.RandomizeLadders) + if (!_settings.RandomizeLadders) { - excludedTags.Add(EMTag.LadderChange); + Options.ExcludedTags.Add(EMTag.LadderChange); } - if (!settings.RandomizeWaterLevels) + if (!_settings.RandomizeWaterLevels) { - excludedTags.Add(EMTag.WaterChange); + Options.ExcludedTags.Add(EMTag.WaterChange); } - if (!settings.RandomizeSlotPositions) + if (!_settings.RandomizeSlotPositions) { - excludedTags.Add(EMTag.SlotChange); + Options.ExcludedTags.Add(EMTag.SlotChange); } - if (!settings.RandomizeTraps) + if (!_settings.RandomizeTraps) { - excludedTags.Add(EMTag.TrapChange); + Options.ExcludedTags.Add(EMTag.TrapChange); } - if (!settings.RandomizeChallengeRooms) + if (!_settings.RandomizeChallengeRooms) { - excludedTags.Add(EMTag.PuzzleRoom); + Options.ExcludedTags.Add(EMTag.PuzzleRoom); } - if (!settings.RandomizeItems || !settings.IncludeKeyItems) + if (!_settings.RandomizeItems || !_settings.IncludeKeyItems) { - excludedTags.Add(EMTag.KeyItemFix); + Options.ExcludedTags.Add(EMTag.KeyItemFix); } - - // If we're using a community patch, exclude mods that - // only apply to non-community patch and vice-versa. - excludedTags.Add(isCommunityPatch - ? EMTag.NonCommunityPatchOnly - : EMTag.CommunityPatchOnly); - - Options.ExcludedTags = excludedTags; } - public void ResetTags(bool isCommunityPatch) + public void ResetTags() { - Options.ExcludedTags = new List + // If we're using a community patch, exclude mods that only apply to non-community patch and vice-versa. + // Same idea for classic/remastered only. + Options.ExcludedTags = new() { - isCommunityPatch - ? EMTag.NonCommunityPatchOnly - : EMTag.CommunityPatchOnly + _gfEdition.IsCommunityPatch + ? EMTag.NonCommunityPatchOnly + : EMTag.CommunityPatchOnly, + _gfEdition.Remastered + ? EMTag.ClassicOnly + : EMTag.RemasteredOnly }; } public List GetRandomAny(EMEditorMapping mapping) { - List sets = new(); - + List sets = new(); List pool = Options.EnableHardMode ? mapping.Any : mapping.Any.FindAll(e => !e.IsHard); @@ -88,7 +90,7 @@ public List GetRandomAny(EMEditorMapping mapping) if (pool.Count > 0) { // Pick a random number of packs to apply, but at least 1 - sets = pool.RandomSelection(Generator, Generator.Next(1, pool.Count + 1)); + sets = pool.RandomSelection(_generator, _generator.Next(1, pool.Count + 1)); } return sets; @@ -99,7 +101,7 @@ public EMEditorSet GetModToRun(List modList) if (Options.EnableHardMode) { // Anything goes. - return modList[Generator.Next(0, modList.Count)]; + return modList[_generator.Next(0, modList.Count)]; } if (modList.Any(e => !e.IsHard)) @@ -108,7 +110,7 @@ public EMEditorSet GetModToRun(List modList) EMEditorSet set; do { - set = modList[Generator.Next(0, modList.Count)]; + set = modList[_generator.Next(0, modList.Count)]; } while (set.IsHard); diff --git a/TRRandomizerCore/Randomizers/TR1/Classic/TR1EnvironmentRandomizer.cs b/TRRandomizerCore/Randomizers/TR1/Classic/TR1EnvironmentRandomizer.cs index e7f4c4a86..3f0a17d8e 100644 --- a/TRRandomizerCore/Randomizers/TR1/Classic/TR1EnvironmentRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR1/Classic/TR1EnvironmentRandomizer.cs @@ -119,11 +119,7 @@ private void ApplyMappingToLevel(TR1CombinedLevel level, EMEditorMapping mapping level.Data.SoundEffects[TR1SFX.PendulumBlades] = vilcabamba.SoundEffects[TR1SFX.PendulumBlades]; } - EnvironmentPicker picker = new(Settings.HardEnvironmentMode) - { - Generator = _generator - }; - picker.LoadTags(Settings, true); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; // These are applied whether or not environment randomization is enabled, @@ -224,9 +220,9 @@ private static void UpdateDoppelgangerScript(TR1CombinedLevel level) private void FinalizeEnvironment(TR1CombinedLevel level) { EMEditorMapping mapping = EMEditorMapping.Get(GetResourcePath($@"TR1\Environment\{level.Name}-Environment.json")); - EnvironmentPicker picker = new(Settings.HardEnvironmentMode); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; - picker.ResetTags(true); + picker.ResetTags(); if (mapping != null) { diff --git a/TRRandomizerCore/Randomizers/TR1/Remastered/TR1REnvironmentRandomizer.cs b/TRRandomizerCore/Randomizers/TR1/Remastered/TR1REnvironmentRandomizer.cs index ec99b80f5..ab5d831df 100644 --- a/TRRandomizerCore/Randomizers/TR1/Remastered/TR1REnvironmentRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR1/Remastered/TR1REnvironmentRandomizer.cs @@ -39,7 +39,11 @@ public void FinalizeEnvironment() } private EMEditorMapping GetMapping(TR1RCombinedLevel level) - => EMEditorMapping.Get(GetResourcePath($@"TR1\Environment\{level.Name}-Environment.json")); + { + EMEditorMapping mapping = EMEditorMapping.Get(GetResourcePath($@"TR1\Environment\{level.Name}-Environment.json")); + mapping?.SetRemastered(true); + return mapping; + } private void RandomizeEnvironment(TR1RCombinedLevel level) { @@ -52,24 +56,18 @@ private void RandomizeEnvironment(TR1RCombinedLevel level) private void ApplyMappingToLevel(TR1RCombinedLevel level, EMEditorMapping mapping) { - EnvironmentPicker picker = new(Settings.HardEnvironmentMode) - { - Generator = _generator - }; - picker.LoadTags(Settings, true); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; mapping.All.ApplyToLevel(level.Data, picker.Options); - - // No further mods supported yet } private void FinalizeEnvironment(TR1RCombinedLevel level) { EMEditorMapping mapping = GetMapping(level); - EnvironmentPicker picker = new(Settings.HardEnvironmentMode); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; - picker.ResetTags(true); + picker.ResetTags(); if (mapping != null) { diff --git a/TRRandomizerCore/Randomizers/TR2/Classic/TR2EnvironmentRandomizer.cs b/TRRandomizerCore/Randomizers/TR2/Classic/TR2EnvironmentRandomizer.cs index f5967d96a..31c88241f 100644 --- a/TRRandomizerCore/Randomizers/TR2/Classic/TR2EnvironmentRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR2/Classic/TR2EnvironmentRandomizer.cs @@ -112,11 +112,7 @@ private void RandomizeEnvironment(TR2CombinedLevel level) private void ApplyMappingToLevel(TR2CombinedLevel level, EMEditorMapping mapping) { - EnvironmentPicker picker = new(Settings.HardEnvironmentMode) - { - Generator = _generator - }; - picker.LoadTags(Settings, ScriptEditor.Edition.IsCommunityPatch); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; mapping.All.ApplyToLevel(level.Data, picker.Options); @@ -168,9 +164,8 @@ private void ApplyMappingToLevel(TR2CombinedLevel level, EMEditorMapping mapping private void FinalizeEnvironment(TR2CombinedLevel level) { EMEditorMapping mapping = EMEditorMapping.Get(GetResourcePath($@"TR2\Environment\{level.Name}-Environment.json")); - EnvironmentPicker picker = new(Settings.HardEnvironmentMode); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; - picker.ResetTags(ScriptEditor.Edition.IsCommunityPatch); if (mapping != null) { diff --git a/TRRandomizerCore/Randomizers/TR2/Remastered/TR2REnvironmentRandomizer.cs b/TRRandomizerCore/Randomizers/TR2/Remastered/TR2REnvironmentRandomizer.cs index 67d5f59b4..4491a69fe 100644 --- a/TRRandomizerCore/Randomizers/TR2/Remastered/TR2REnvironmentRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR2/Remastered/TR2REnvironmentRandomizer.cs @@ -39,7 +39,11 @@ public void FinalizeEnvironment() } private EMEditorMapping GetMapping(TR2RCombinedLevel level) - => EMEditorMapping.Get(GetResourcePath($@"TR2\Environment\{level.Name}-Environment.json")); + { + EMEditorMapping mapping = EMEditorMapping.Get(GetResourcePath($@"TR2\Environment\{level.Name}-Environment.json")); + mapping?.SetRemastered(true); + return mapping; + } private void RandomizeEnvironment(TR2RCombinedLevel level) { @@ -52,24 +56,17 @@ private void RandomizeEnvironment(TR2RCombinedLevel level) private void ApplyMappingToLevel(TR2RCombinedLevel level, EMEditorMapping mapping) { - EnvironmentPicker picker = new(Settings.HardEnvironmentMode) - { - Generator = _generator - }; - picker.LoadTags(Settings, true); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; mapping.All.ApplyToLevel(level.Data, picker.Options); - - // No further mods supported yet } private void FinalizeEnvironment(TR2RCombinedLevel level) { EMEditorMapping mapping = GetMapping(level); - EnvironmentPicker picker = new(Settings.HardEnvironmentMode); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; - picker.ResetTags(true); if (mapping != null) { diff --git a/TRRandomizerCore/Randomizers/TR3/Classic/TR3EnvironmentRandomizer.cs b/TRRandomizerCore/Randomizers/TR3/Classic/TR3EnvironmentRandomizer.cs index 35102f750..e9001ec3d 100644 --- a/TRRandomizerCore/Randomizers/TR3/Classic/TR3EnvironmentRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR3/Classic/TR3EnvironmentRandomizer.cs @@ -116,11 +116,7 @@ private void RandomizeEnvironment(TR3CombinedLevel level) private void ApplyMappingToLevel(TR3CombinedLevel level, EMEditorMapping mapping) { - EnvironmentPicker picker = new(Settings.HardEnvironmentMode) - { - Generator = _generator - }; - picker.LoadTags(Settings, ScriptEditor.Edition.IsCommunityPatch); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; mapping.All.ApplyToLevel(level.Data, picker.Options); @@ -172,9 +168,8 @@ private void ApplyMappingToLevel(TR3CombinedLevel level, EMEditorMapping mapping private void FinalizeEnvironment(TR3CombinedLevel level) { EMEditorMapping mapping = EMEditorMapping.Get(GetResourcePath($@"TR3\Environment\{level.Name}-Environment.json")); - EnvironmentPicker picker = new(Settings.HardEnvironmentMode); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; - picker.ResetTags(ScriptEditor.Edition.IsCommunityPatch); if (mapping != null) { diff --git a/TRRandomizerCore/Randomizers/TR3/Remastered/TR3REnvironmentRandomizer.cs b/TRRandomizerCore/Randomizers/TR3/Remastered/TR3REnvironmentRandomizer.cs index cc5e3b758..69c9e93b2 100644 --- a/TRRandomizerCore/Randomizers/TR3/Remastered/TR3REnvironmentRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR3/Remastered/TR3REnvironmentRandomizer.cs @@ -39,7 +39,11 @@ public void FinalizeEnvironment() } private EMEditorMapping GetMapping(TR3RCombinedLevel level) - => EMEditorMapping.Get(GetResourcePath($@"TR3\Environment\{level.Name}-Environment.json")); + { + EMEditorMapping mapping = EMEditorMapping.Get(GetResourcePath($@"TR3\Environment\{level.Name}-Environment.json")); + mapping?.SetRemastered(true); + return mapping; + } private void RandomizeEnvironment(TR3RCombinedLevel level) { @@ -52,24 +56,17 @@ private void RandomizeEnvironment(TR3RCombinedLevel level) private void ApplyMappingToLevel(TR3RCombinedLevel level, EMEditorMapping mapping) { - EnvironmentPicker picker = new(Settings.HardEnvironmentMode) - { - Generator = _generator - }; - picker.LoadTags(Settings, true); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; mapping.All.ApplyToLevel(level.Data, picker.Options); - - // No further mods supported yet } private void FinalizeEnvironment(TR3RCombinedLevel level) { EMEditorMapping mapping = GetMapping(level); - EnvironmentPicker picker = new(Settings.HardEnvironmentMode); + EnvironmentPicker picker = new(_generator, Settings, ScriptEditor.Edition); picker.Options.ExclusionMode = EMExclusionMode.Individual; - picker.ResetTags(true); if (mapping != null) { diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json index 281aa7b4d..19c9b5406 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json @@ -7823,6 +7823,9 @@ { "Comments": "Remove the fuse static mesh from the conveyor belt.", "EMType": 25, + "Tags": [ + 14 + ], "ClearFromRooms": { "227": [ 45 @@ -7832,6 +7835,9 @@ { "Comments": "Add a sprite instead for the ammo.", "EMType": 31, + "Tags": [ + 14 + ], "ID": 89, "Vertex": { "Lighting": 4096 diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL10B.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL10B.PHD-Environment.json index 1a41610a1..aa25732cb 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL10B.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL10B.PHD-Environment.json @@ -7535,6 +7535,9 @@ "OnTrue": [ { "EMType": 67, + "Tags": [ + 14 + ], "BaseLocation": { "X": 57856, "Y": 10240, @@ -7542,6 +7545,19 @@ "Room": 12 }, "EntityLocation": 38 + }, + { + "EMType": 67, + "Tags": [ + 13 + ], + "BaseLocation": { + "X": 57856, + "Y": 10240, + "Z": 11776, + "Room": 12 + }, + "EntityLocation": 38 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json index 9dc77a337..00ff351ec 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json @@ -15,6 +15,9 @@ { "Comments": "Make a slight change to face order in room 37 to make further modifications here easier.", "EMType": 32, + "Tags": [ + 14 + ], "RoomIndex": 37, "Swaps": { "27": 42 diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json index e5fc3bd70..9fbf59806 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json @@ -13,6 +13,9 @@ { "Comments": "Make a slight change to face order in room 8 to make further modifications here easier.", "EMType": 32, + "Tags": [ + 14 + ], "RoomIndex": 8, "Swaps": { "269": 184, diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL7B.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL7B.PHD-Environment.json index d370004e6..32da61051 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL7B.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL7B.PHD-Environment.json @@ -7630,6 +7630,9 @@ { "Comments": "Make a side trap room to house the medis. You get nothing for free.", "EMType": 126, + "Tags": [ + 14 + ], "Location": { "X": 26624, "Y": -6144, @@ -7682,6 +7685,9 @@ { "Comments": "Make visibility portals.", "EMType": 81, + "Tags": [ + 14 + ], "Portals": [ { "BaseRoom": 79, @@ -7745,6 +7751,9 @@ }, { "EMType": 82, + "Tags": [ + 14 + ], "Portals": { "-1": { "79": [ @@ -7766,6 +7775,9 @@ }, { "EMType": 21, + "Tags": [ + 14 + ], "TextureMap": { "5": { "-1": { @@ -7791,6 +7803,9 @@ }, { "EMType": 22, + "Tags": [ + 14 + ], "GeometryMap": { "-1": { "Rectangles": [ @@ -7806,6 +7821,9 @@ }, { "EMType": 128, + "Tags": [ + 14 + ], "RoomIndices": [ -1 ] @@ -7861,6 +7879,9 @@ }, { "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 38, "Intensity": -1, "Location": { @@ -7872,6 +7893,9 @@ }, { "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 42, "Intensity": -1, "Location": { @@ -7884,6 +7908,9 @@ }, { "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 42, "Intensity": -1, "Location": { @@ -7896,6 +7923,9 @@ }, { "EMType": 61, + "Tags": [ + 14 + ], "EntityLocation": -2, "Trigger": { "Mask": 31, @@ -7914,6 +7944,9 @@ }, { "EMType": 61, + "Tags": [ + 14 + ], "Locations": [ { "X": 28160, @@ -7937,6 +7970,9 @@ }, { "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -7948,6 +7984,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 28800, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -7959,6 +8012,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 28800, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -7970,6 +8040,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 28800, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -7981,6 +8068,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 28800, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -7992,6 +8096,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 60544, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8003,6 +8124,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 60544, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8014,6 +8152,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 60544, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8025,6 +8180,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 60544, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 93, "Intensity": 4096, "Location": { @@ -8036,6 +8208,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 93, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8047,6 +8236,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 61312, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8058,6 +8264,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 61312, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8069,6 +8292,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 61312, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8080,6 +8320,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29184, + "Y": -6144, + "Z": 61312, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8091,6 +8348,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29568, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8102,6 +8376,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29568, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8113,6 +8404,23 @@ }, { "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29568, + "Y": -6144, + "Z": 60928, + "Room": 79 + } + }, + { + "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 94, "Intensity": 4096, "Location": { @@ -8121,6 +8429,20 @@ "Z": 55808, "Room": -1 } + }, + { + "EMType": 51, + "Tags": [ + 13 + ], + "TypeID": 94, + "Intensity": 4096, + "Location": { + "X": 29568, + "Y": -6144, + "Z": 60928, + "Room": 79 + } } ] } diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json index 285c0cac2..81aa6432b 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json @@ -35,6 +35,9 @@ { "Comments": "Fix the wrong flipmap trigger type in room 66.", "EMType": 69, + "Tags": [ + 10 + ], "Locations": [ { "X": 43520, diff --git a/TRRandomizerCore/Resources/TR2/Environment/FLOATING.TR2-Environment.json b/TRRandomizerCore/Resources/TR2/Environment/FLOATING.TR2-Environment.json index 8f1dad071..c78ca2b3c 100644 --- a/TRRandomizerCore/Resources/TR2/Environment/FLOATING.TR2-Environment.json +++ b/TRRandomizerCore/Resources/TR2/Environment/FLOATING.TR2-Environment.json @@ -4,7 +4,8 @@ "Comments": "Tweak a slope at the end for easier key item exploration, if enabled.", "EMType": 7, "Tags": [ - 12 + 12, + 14 ], "Location": { "X": 24064, @@ -19,7 +20,8 @@ { "EMType": 23, "Tags": [ - 12 + 12, + 14 ], "Modifications": [ { @@ -61,7 +63,8 @@ { "EMType": 21, "Tags": [ - 12 + 12, + 14 ], "TextureMap": { "1557": { diff --git a/TRRandomizerCore/Resources/TR2/Environment/HOUSE.TR2-Environment.json b/TRRandomizerCore/Resources/TR2/Environment/HOUSE.TR2-Environment.json index 2fe9a9018..5faf2a816 100644 --- a/TRRandomizerCore/Resources/TR2/Environment/HOUSE.TR2-Environment.json +++ b/TRRandomizerCore/Resources/TR2/Environment/HOUSE.TR2-Environment.json @@ -3,6 +3,9 @@ { "Comments": "Reposition the unused maze button to the bedroom.", "EMType": 44, + "Tags": [ + 14 + ], "EntityIndex": 107, "TargetLocation": { "X": 39424, @@ -15,6 +18,9 @@ { "Comments": "Use it to turn off the alarms.", "EMType": 61, + "Tags": [ + 14 + ], "EntityLocation": 107, "Trigger": { "TrigType": 2, @@ -33,6 +39,9 @@ { "Comments": "Make an unreachable room for a boulder trigger.", "EMType": 126, + "Tags": [ + 14 + ], "Location": { "X": 67584, "Y": 2560, @@ -57,6 +66,9 @@ { "Comments": "Import the boulder model.", "EMType": 145, + "Tags": [ + 14 + ], "Data": [ { "ModelID": 60, @@ -68,12 +80,18 @@ { "Comments": "Convert the zipline handle into a boulder (so we can track the index elsewhere).", "EMType": 45, + "Tags": [ + 14 + ], "EntityIndex": 23, "NewEntityType": 60 }, { "Comments": "Move it to the hidden room.", "EMType": 44, + "Tags": [ + 14 + ], "EntityIndex": 23, "TargetLocation": { "X": 69120, @@ -85,6 +103,9 @@ { "Comments": "Put a new zipline handle in its place.", "EMType": 51, + "Tags": [ + 14 + ], "TypeID": 102, "Intensity": -1, "Location": { @@ -97,6 +118,9 @@ { "Comments": "Move the initial trigger under Lara to the boulder.", "EMType": 67, + "Tags": [ + 14 + ], "BaseLocation": { "X": 34304, "Y": 256, @@ -108,6 +132,9 @@ { "Comments": "Make it heavy.", "EMType": 69, + "Tags": [ + 14 + ], "Location": { "X": 69120, "Y": 2560, @@ -119,6 +146,9 @@ { "Comments": "Trigger the boulder from the start position. All in all, this means the alarms won't get turned back on.", "EMType": 61, + "Tags": [ + 14 + ], "Locations": [ { "X": 34304, @@ -138,6 +168,9 @@ }, { "EMType": 23, + "Tags": [ + 14 + ], "Rotations": [ { "RoomNumber": 8, diff --git a/TRRandomizerCore/Resources/TR3/Environment/AREA51.TR2-Environment.json b/TRRandomizerCore/Resources/TR3/Environment/AREA51.TR2-Environment.json index f1c4069ff..c4fa5c235 100644 --- a/TRRandomizerCore/Resources/TR3/Environment/AREA51.TR2-Environment.json +++ b/TRRandomizerCore/Resources/TR3/Environment/AREA51.TR2-Environment.json @@ -143,6 +143,9 @@ { "Comments": "Remove the hand scanner static mesh.", "EMType": 25, + "Tags": [ + 14 + ], "ClearFromRooms": { "417": [ 0 @@ -316,6 +319,9 @@ { "Comments": "Remove the hand scanner static mesh.", "EMType": 25, + "Tags": [ + 14 + ], "ClearFromRooms": { "417": [ 12 @@ -436,6 +442,9 @@ { "Comments": "Remove the hand scanner static mesh.", "EMType": 25, + "Tags": [ + 14 + ], "ClearFromRooms": { "417": [ 120 diff --git a/TRRandomizerCore/Resources/TR3/Environment/CITY.TR2-Environment.json b/TRRandomizerCore/Resources/TR3/Environment/CITY.TR2-Environment.json index af91e59ea..c83dbfbf1 100644 --- a/TRRandomizerCore/Resources/TR3/Environment/CITY.TR2-Environment.json +++ b/TRRandomizerCore/Resources/TR3/Environment/CITY.TR2-Environment.json @@ -1096,7 +1096,8 @@ "Comments": "Replace the wall texture.", "EMType": 21, "Tags": [ - 12 + 12, + 14 ], "TextureMap": { "1889": { diff --git a/TRRandomizerCore/Resources/TR3/Environment/COMPOUND.TR2-Environment.json b/TRRandomizerCore/Resources/TR3/Environment/COMPOUND.TR2-Environment.json index 57a34d2bb..80b8e3af5 100644 --- a/TRRandomizerCore/Resources/TR3/Environment/COMPOUND.TR2-Environment.json +++ b/TRRandomizerCore/Resources/TR3/Environment/COMPOUND.TR2-Environment.json @@ -542,6 +542,9 @@ { "Comments": "Remove the hand scanner static mesh.", "EMType": 25, + "Tags": [ + 14 + ], "ClearFromRooms": { "413": [ 74 diff --git a/TRRandomizerCore/Resources/TR3/Environment/QUADCHAS.TR2-Environment.json b/TRRandomizerCore/Resources/TR3/Environment/QUADCHAS.TR2-Environment.json index a650af3f4..89384d657 100644 --- a/TRRandomizerCore/Resources/TR3/Environment/QUADCHAS.TR2-Environment.json +++ b/TRRandomizerCore/Resources/TR3/Environment/QUADCHAS.TR2-Environment.json @@ -529,6 +529,9 @@ "OnTrue": [ { "EMType": 0, + "Tags": [ + 14 + ], "TextureMap": { "1487": { "167": {