diff --git a/src/open_samus_returns_rando/files/custom/sprites_texturehud.lua b/src/open_samus_returns_rando/files/custom/sprites_texturehud.lua index 23b817d2..26dbe0dc 100644 --- a/src/open_samus_returns_rando/files/custom/sprites_texturehud.lua +++ b/src/open_samus_returns_rando/files/custom/sprites_texturehud.lua @@ -27,3 +27,111 @@ GUI.AddSpriteSheetItem("dooricecenter", "gui/textures/texturehud.bctex", { VPixelScale = "8", AngleOffset = "0" }) +GUI.AddSpriteSheetItem("doorgrappleleft", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "128", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorgrappleright", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "132", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorgrapplecenter", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "128", + VPixelOffset = "40", + UPixelScale = "8", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorbombleft", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "136", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorbombright", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "140", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorbombcenter", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "136", + VPixelOffset = "40", + UPixelScale = "8", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorbeamburstleft", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "144", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorbeamburstright", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "148", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorbeamburstcenter", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "144", + VPixelOffset = "40", + UPixelScale = "8", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorlockedleft", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "152", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorlockedright", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "156", + VPixelOffset = "40", + UPixelScale = "4", + VPixelScale = "8", + AngleOffset = "0" +}) +GUI.AddSpriteSheetItem("doorlockedcenter", "gui/textures/texturehud.bctex", { + TextureWidth = "512", + TextureHeight = "256", + UPixelOffset = "152", + VPixelOffset = "40", + UPixelScale = "8", + VPixelScale = "8", + AngleOffset = "0" +}) diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbeamburst/models/doorshieldbeamburst.bcmdl b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbeamburst/models/doorshieldbeamburst.bcmdl new file mode 100644 index 00000000..928f122c Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbeamburst/models/doorshieldbeamburst.bcmdl differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbeamburst/models/textures/doorshieldbeamburst_d.bctex b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbeamburst/models/textures/doorshieldbeamburst_d.bctex new file mode 100644 index 00000000..460db020 Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbeamburst/models/textures/doorshieldbeamburst_d.bctex differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbomb/models/doorshieldbomb.bcmdl b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbomb/models/doorshieldbomb.bcmdl new file mode 100644 index 00000000..43fa61d3 Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbomb/models/doorshieldbomb.bcmdl differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbomb/models/textures/doorshieldbomb_d.bctex b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbomb/models/textures/doorshieldbomb_d.bctex new file mode 100644 index 00000000..de3ad921 Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldbomb/models/textures/doorshieldbomb_d.bctex differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldgrapplebeam/models/doorshield.bcmdl b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldgrapplebeam/models/doorshield.bcmdl new file mode 100644 index 00000000..0276df3e Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldgrapplebeam/models/doorshield.bcmdl differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldgrapplebeam/models/textures/doorgrapple_d.bctex b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldgrapplebeam/models/textures/doorgrapple_d.bctex new file mode 100644 index 00000000..cc55bd2e Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldgrapplebeam/models/textures/doorgrapple_d.bctex differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldlocked/models/doorshieldlocked.bcmdl b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldlocked/models/doorshieldlocked.bcmdl new file mode 100644 index 00000000..00553544 Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldlocked/models/doorshieldlocked.bcmdl differ diff --git a/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldlocked/models/textures/doorshieldlocked_d.bctex b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldlocked/models/textures/doorshieldlocked_d.bctex new file mode 100644 index 00000000..c7a2685a Binary files /dev/null and b/src/open_samus_returns_rando/files/romfs/actors/props/doorshieldlocked/models/textures/doorshieldlocked_d.bctex differ diff --git a/src/open_samus_returns_rando/files/romfs/gui/textures/texturehud.bctex b/src/open_samus_returns_rando/files/romfs/gui/textures/texturehud.bctex index ed155663..58c2b992 100644 Binary files a/src/open_samus_returns_rando/files/romfs/gui/textures/texturehud.bctex and b/src/open_samus_returns_rando/files/romfs/gui/textures/texturehud.bctex differ diff --git a/src/open_samus_returns_rando/files/schema.json b/src/open_samus_returns_rando/files/schema.json index b0f14eaa..034a1a47 100644 --- a/src/open_samus_returns_rando/files/schema.json +++ b/src/open_samus_returns_rando/files/schema.json @@ -163,7 +163,11 @@ "missile", "super_missile", "power_bomb", - "ice_beam" + "ice_beam", + "grapple_beam", + "bomb", + "beam_burst", + "locked" ] } }, diff --git a/src/open_samus_returns_rando/specific_patches/door_patches.py b/src/open_samus_returns_rando/specific_patches/door_patches.py index 99cbe512..0fe40397 100644 --- a/src/open_samus_returns_rando/specific_patches/door_patches.py +++ b/src/open_samus_returns_rando/specific_patches/door_patches.py @@ -213,6 +213,10 @@ class ActorData(Enum): SHIELD_SUPER_MISSILE = (["doorshieldsupermissile"]) SHIELD_POWER_BOMB = (["doorshieldpowerbomb"]) SHIELD_ICE_BEAM = (["doorshieldicebeam"]) + SHIELD_GRAPPLE_BEAM = (["doorshieldgrapplebeam"]) + SHIELD_BEAM_BURST = (["doorshieldbeamburst"]) + SHIELD_BOMB = (["doorshieldbomb"]) + SHIELD_LOCKED = (["doorshieldlocked"]) class DoorType(Enum): """ @@ -251,6 +255,18 @@ class DoorType(Enum): ICE_BEAM = ("ice_beam", ActorData.DOOR_POWER, "doorice", True, ActorData.SHIELD_ICE_BEAM, [ "actors/props/doorshield", "actors/props/doorshieldicebeam" ]) + GRAPPLE_BEAM = ("grapple_beam", ActorData.DOOR_POWER, "doorgrapple", True, ActorData.SHIELD_GRAPPLE_BEAM, [ + "actors/props/doorshield", "actors/props/doorshieldgrapplebeam" + ]) + BOMB = ("bomb", ActorData.DOOR_POWER, "doorbomb", True, ActorData.SHIELD_BOMB, [ + "actors/props/doorshield", "actors/props/doorshieldsupermissile", "actors/props/doorshieldbomb" + ]) + BEAM_BURST = ("beam_burst", ActorData.DOOR_POWER, "doorbeamburst", True, ActorData.SHIELD_BEAM_BURST, [ + "actors/props/doorshield", "actors/props/doorshieldpowerbomb", "actors/props/doorshieldbeamburst" + ]) + LOCKED = ("locked", ActorData.DOOR_POWER, "doorlocked", True, ActorData.SHIELD_LOCKED, [ + "actors/props/doorshield", "actors/props/doorshieldpowerbomb","actors/props/doorshieldlocked" + ]) def __init__(self, rdv_door_type: str, door_data: ActorData, minimap_name: str, need_shield: bool = False, shield_data: ActorData | None = None, @@ -440,20 +456,31 @@ def patch_actor( class NewShield(typing.NamedTuple): shield_name: str weakness: str + base_shield: str new_shields = [ - NewShield("icebeam", "ICE_BEAM"), + NewShield("icebeam", "ICE_BEAM", "doorcreature"), + NewShield("grapplebeam", "GRAPPLE_BEAM", "doorshield"), + NewShield("bomb", "BOMB", "doorshieldsupermissile"), + NewShield("beamburst", "WEAPON_BOOST", "doorshieldpowerbomb"), + NewShield("locked", "", "doorshieldpowerbomb"), ] def add_custom_shields(editor: PatcherEditor, new_shield: NewShield) -> None: - plasma_bmsad = "actors/props/doorcreature/charclasses/doorcreature.bmsad" + # Missile shields are split across doorshield and doorshieldmissile + if new_shield.base_shield == "doorshield": + template_bmsad = "actors/props/doorshieldmissile/charclasses/doorshieldmissile.bmsad" + new_model = f"actors/props/doorshield{new_shield.shield_name}/models/doorshield.bcmdl" + else: + template_bmsad = f"actors/props/{new_shield.base_shield}/charclasses/{new_shield.base_shield}.bmsad" + new_model = f"actors/props/doorshield{new_shield.shield_name}/models/doorshield{new_shield.shield_name}.bcmdl" + new_bmsad = f"actors/props/doorshield{new_shield.shield_name}/charclasses/doorshield{new_shield.shield_name}.bmsad" - new_model = f"actors/props/doorshield{new_shield.shield_name}/models/doorshield{new_shield.shield_name}.bcmdl" # Create a copy of the bmsad - template_shield = editor.get_file(plasma_bmsad, Bmsad) + template_shield = editor.get_file(template_bmsad, Bmsad) editor.add_new_asset(new_bmsad, template_shield, []) # Modify the new bmsad @@ -466,18 +493,23 @@ def add_custom_shields(editor: PatcherEditor, new_shield: NewShield) -> None: life_component = custom_shield.raw["components"]["LIFE"]["functions"] life_component[0]["params"]["Param1"]["value"] = new_shield.weakness - # Remove the second weakness container - life_component.pop(1) - - # Set shield health to 1 - life_component[2]["params"]["Param2"]["value"] = 1.0 - life_component[3]["params"]["Param2"]["value"] = 1.0 - - # Remove the drops from breaking the shield - custom_shield.raw["components"].pop("DROP") - - # Remove the particle animation that occurs after the shield breaks (color mismatch) - custom_shield.raw["action_sets"][0]["animations"][0]["events0"][1]["args"][729149823]["value"] = 0 + if new_shield.base_shield == "doorshield": + # Remove the second weakness container + life_component.pop(1) + elif new_shield.base_shield == "doorcreature": + # Remove the second weakness container + life_component.pop(1) + # Set shield health to 1 + life_component[2]["params"]["Param2"]["value"] = 1.0 + life_component[3]["params"]["Param2"]["value"] = 1.0 + # Remove the drops from breaking the shield + custom_shield.raw["components"].pop("DROP") + # Remove the particle animation that occurs after the shield breaks (color mismatch) + custom_shield.raw["action_sets"][0]["animations"][0]["events0"][1]["args"][729149823]["value"] = 0 + else: + # Some shaders do not use dissolve fx, so force fx to be used + custom_shield.raw["components"]["LIFE"]["fields"]["bDisolveByMaterial"]["value"] = False + custom_shield.raw["components"]["LIFE"]["fields"]["fTimeToStartDisolve"]["value"] = 0.2 def patch_doors(editor: PatcherEditor, door_patches: list[dict]) -> None: