Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added patches/ips/disable_major_glitches.ips
Binary file not shown.
Binary file modified patches/ips/vanilla_bugfixes.ips
Binary file not shown.
20 changes: 20 additions & 0 deletions patches/src/disable_major_glitches.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
arch snes.cpu
lorom

; This patch is a consolidation of the major glitches that were previously included in the vanilla_bugfixes.asm file.
; They are relocated here to make it easier to disable them while still keeping the other quality of life features.


;;; disable GT code
;org $aac91c
; bra $3f

; the original patch only changed the conditional branch to a forced branch.
; we can skip loading the joypad input and meaningless comparission entirely.

org $aac917
rtl

;;; disable spacetime beam select in pause menu
org $82b174
ldx #$0001
8 changes: 0 additions & 8 deletions patches/src/vanilla_bugfixes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@ assert pc() <= $84871B ; just to make sure the next instruction isn't overwritte
org $91b629
db $01

;;; disable GT code
org $aac91c
bra $3f

;;; Pause menu fixes :

;;; disable spacetime beam select in pause menu
org $82b174
ldx #$0001
;;; fix screw attack select in pause menu
org $82b4c4
cpx #$000c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4578,6 +4578,7 @@
"ultra_low_qol": false,
"disable_spikesuit": false,
"disable_bluesuit": false,
"enable_major_glitches": false,
"race_mode": true,
"random_seed": null
},
Expand Down
1 change: 1 addition & 0 deletions rust/data/presets/full-settings/Default.json
Original file line number Diff line number Diff line change
Expand Up @@ -4578,6 +4578,7 @@
"energy_free_shinesparks": false,
"disable_spikesuit": false,
"disable_bluesuit": false,
"enable_major_glitches": false,
"ultra_low_qol": false,
"race_mode": false,
"random_seed": null
Expand Down
30 changes: 21 additions & 9 deletions rust/maprando-web/templates/generate/game_variations.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/walljump.html" %}
<label for="wall_jump">Wall jump</label>
Expand All @@ -10,7 +10,7 @@
<label class="btn btn-outline-primary" for="wallJumpCollectible">Collectible</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/area_assignment.html" %}
<label for="area_assignment">Area assignment</label>
Expand All @@ -30,7 +30,7 @@
</button>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/door_locks_size.html" %}
<label for="door_locks_size">Door locks size on map</label>
Expand All @@ -42,7 +42,7 @@
<label class="btn btn-outline-primary" for="doorLocksSizeLarge">Large</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/map_station_reveal.html" %}
<label for="map_station_reveal">Map station activation reveal</label>
Expand All @@ -54,7 +54,7 @@
<label class="btn btn-outline-primary" for="mapStationRevealFull">Full</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/energy_free_shinesparks.html" %}
<label for="energy_free_shinesparks">Energy-free shinesparks</label>
Expand All @@ -67,7 +67,7 @@
<label class="btn btn-outline-primary" for="energyFreeShinesparksYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/disable_spikesuit.html" %}
<label for="disable_spike_suit">Disable spikesuits</label>
Expand All @@ -79,7 +79,7 @@
<label class="btn btn-outline-primary" for="disableSpikesuitYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/disable_bluesuit.html" %}
<label for="disable_blue_suit">Disable blue suits</label>
Expand All @@ -91,7 +91,19 @@
<label class="btn btn-outline-primary" for="disableBlueSuitYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/enable_glitches.html" %}
<label for="enable_major_glitches">Enable major glitches</label>
</div>
<div id="enableMajorGlitches" class="col-2 btn-group my-2" role="group">
<input type="radio" class="btn-check" name="enable_major_glitches" id="enableMajorGlitchesNo" value="false" checked>
<label class="btn btn-outline-primary" for="enableMajorGlitchesNo">No</label>
<input type="radio" class="btn-check" name="enable_major_glitches" id="enableMajorGlitchesYes" value="true">
<label class="btn btn-outline-primary" for="enableMajorGlitchesYes">Yes</label>
</div>
</div>
<div class="form-group row" onchange="ultraLowQoLChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/ultra_low_qol.html" %}
<label for="ultra_low_qol">Ultra-low quality of life</label>
Expand All @@ -103,7 +115,7 @@
<label class="btn btn-outline-primary" for="ultraLowQoLYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="form-group row" onchange="gameVariationChanged()">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/race.html" %}
<label for="race_mode">Race mode</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- Button trigger modal -->
<button type="button" class="btn mr-1 px-2 py-1" data-bs-toggle="modal" data-bs-target="#enableMajorGlitchesModal">
<i class="bi bi-question-circle"></i>
</button>
<!-- Modal -->
<div class="modal" id="enableMajorGlitchesModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5">Enable major glitches</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>When this option is enabled, the game no longer patches out major glitches:
<ul>
<li>"GT Code": holding A, B, X, and Y when entering Golden Torizo's Room grants the player
700 Energy, 300 Reserve Energy, 100 Missiles, 20 Supers, 20 Power Bombs, and every unique
item in the game except for Screw Attack and X-Ray.
<li>Glitched beams: The player may equip Spazer and Plasma simultaneously, resulting in glitched effects when firing.
<li>Out of bounds: Samus may move outside the rectangular bounds of the room without triggering death.</li>
</ul></p>

<p>Use this setting with caution, as major glitches may crash the game, corrupt the save file, or cause the game
to become unbeatable. There is no guarantee that major glitches will behave the same as they do in the vanilla game.</p

<p>This option is always enabled when using "Ultra-low quality of life".</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion rust/maprando-web/templates/generate/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h2 class="accordion-header">
Other options
</button>
</h2>
<div id="collapseGameVariations" class="accordion-collapse collapse m-2" onchange="gameVariationChanged()">
<div id="collapseGameVariations" class="accordion-collapse collapse m-2">
{% include "game_variations.html" %}
</div>
</div>
Expand Down
18 changes: 15 additions & 3 deletions rust/maprando-web/templates/generate/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
"random_seed": tryParseInt(formData.get("random_seed")),
"disable_spikesuit": formData.get("disable_spike_suit") == "true",
"disable_bluesuit": formData.get("disable_blue_suit") == "true",
"enable_major_glitches": formData.get("enable_major_glitches") == "true",
}
};
return settings;
Expand Down Expand Up @@ -549,6 +550,7 @@
applyRadioValue("ultraLowQoL", other.ultra_low_qol);
applyRadioValue("disableSpikesuit", other.disable_spikesuit);
applyRadioValue("disableBluesuit", other.disable_bluesuit);
applyRadioValue("enableMajorGlitches", other.enable_major_glitches);
applyRadioValue("raceMode", other.race_mode);
document.getElementById("randomSeed").value = other.random_seed;
}
Expand Down Expand Up @@ -1095,12 +1097,22 @@
}

function gameVariationChanged() {
if (document.getElementById("ultraLowQoLYes").checked) {
document.getElementById("qualityOfLifeOff").checked = true;
qualityOfLifePresetChanged();
if (!document.getElementById("enableMajorGlitchesYes").checked)
{
document.getElementById("ultraLowQoLNo").checked = true;
}
fullSettingsChanged();
}

function ultraLowQoLChanged() {
if (!document.getElementById("ultraLowQoLYes").checked) {
return;
}
document.getElementById("qualityOfLifeOff").checked = true;
document.getElementById("enableMajorGlitchesYes").checked = true;
qualityOfLifePresetChanged();
}

function initializeSpoilerToken() {
if (localStorage["spoilerToken"] === undefined) {
let result = '';
Expand Down
12 changes: 9 additions & 3 deletions rust/maprando/src/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ impl Patcher<'_> {
"fix_kraid_hud",
"escape_autosave",
"boss_exit",
"oob_death",
"load_plms_early",
"spin_lock",
"fix_transition_bad_tiles",
Expand Down Expand Up @@ -578,11 +577,18 @@ impl Patcher<'_> {
}

if self.settings.other_settings.disable_spikesuit {
patches.push("remove_spikesuit")
patches.push("remove_spikesuit");
}

if self.settings.other_settings.disable_bluesuit {
patches.push("remove_bluesuit")
patches.push("remove_bluesuit");
}

if !self.settings.other_settings.enable_major_glitches
&& !self.settings.other_settings.ultra_low_qol
{
patches.push("disable_major_glitches");
patches.push("oob_death");
}

if self.settings.quality_of_life_settings.respin {
Expand Down
5 changes: 5 additions & 0 deletions rust/maprando/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ pub struct OtherSettings {
pub ultra_low_qol: bool,
pub disable_spikesuit: bool,
pub disable_bluesuit: bool,
pub enable_major_glitches: bool,
pub race_mode: bool,
pub random_seed: Option<usize>,
}
Expand Down Expand Up @@ -919,6 +920,10 @@ fn upgrade_other_settings(settings: &mut serde_json::Value) -> Result<()> {
other_settings.insert("disable_bluesuit".to_string(), false.into());
}

if other_settings.get("enable_major_glitches").is_none() {
other_settings.insert("enable_major_glitches".to_string(), false.into());
}

Ok(())
}

Expand Down
1 change: 1 addition & 0 deletions rust/maprando/tests/logic_scenarios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ fn get_settings(scenario: &Scenario) -> Result<RandomizerSettings> {
energy_free_shinesparks: false,
disable_bluesuit: false,
disable_spikesuit: false,
enable_major_glitches: false,
ultra_low_qol: false,
race_mode: false,
random_seed: None,
Expand Down