Language…
21 users online: AGRMaster,  Anorakun,  bebn legg, deported, DimeR, edgar, FieryGuardian, figuiDOS, Gasterus155, HammerBrother, isaix, KaidenThelens, mason, RenkoV2, RitaXBianka90, TCgamerboy2002,  Telinc1, tOaO,  YouFailMe, Zatara, Zavok - Guests: 144 - Bots: 84
Users: 70,155 (2,559 active)
Latest user: Count_Crackula

UberASM Retry System (+ Multiple Checkpoints) v0.8.1

PatchUberASM

[DOWNLOAD]

For info & help --> [DOCUMENTATION]
(you can also check the repository here)

tl;dr this is a rewrite of worldpeace's Retry patch in (mostly) UberASM form, which aims at making the patch more compatible with other resources as well as adding additional features.
I've released this during C3, but I'll put it here as well so people can find it more easily (at least until I submit it). I'll also post changes and whatnot. Feel free to use this thread to report feedback, bugs, etc.

Here's the copy-paste of the C3 thread, with a more detailed explanation (thanks FPzero for sending the source to me :))


Small update (v0.2.2): added an option to replace "Mario" with "DEATHS" in the status bar. Made sense to add since the standalone Death Counter patch does this too. I didn't add it to the OW too since it's easy enough to edit the border with Lunar Magic's layer 3 editor.
Small update (v0.2.3): fixed a rare issue that could happen when using Lunar Magic 3.0+, in case the routine at $03BCDC wasn't installed yet. Changed settings.asm file formatting to be a bit easier to navigate through. Added some speed optimizations to the code.
Additionally I tested it with lx5's Dynamic Spriteset System and both instant respawn and the prompt work fine with it. If using the prompt, you just need to change the tile numbers used by the letters in settings.asm to some empty spots in SP1/SP2 (DSS frees up a lot of tiles there so it should be an easy process).
Update v0.2.4: fixed a couple minor bugs regarding game over and VWF dialogues (thanks simon.caio for reporting them!) and optimized the NMI routine a bit.
Update v0.2.5: finally added full support for ObjecTool! Now, if you want to use both Retry's custom midway bars and other custom objects from ObjecTool, you can, just make sure to follow the instructions in the "objectool_info.txt" file. Additionally, differently from the original Retry, only Custom Normal Object numbers 00-51 will be reserved for the custom midways, meaning that you can still use 52-FF with ObjecTool (+ all the extended objects, of course).
Update v0.2.6: fixed a bug that could happen in layer 2 levels, where sometimes Mario would interact in weird ways (and often die) with the layer 2 on the first frame after respawning. Also, changed the infinite lives option to a sublevel-specific table, so you can have both levels with finite and infinite lives, which could be useful for hacks or collabs that feature levels of varying style/difficulty.
Update v0.2.7: this small update just fixes an issue where the Retry prompt would cause sprites to disappear, in case the end of the OAM table was filled. Thanks to  LouisDoucet for reporting it!
Update v0.3: this update fixes some bugs related to Yoshi (having !initial_facing_fix = 1 could cause Yoshi to run away in the wrong direction sometimes; dying on the same frame as Baby Yoshi hatching would cause sprites to continue moving while the prompt was shown; dying on the same frame as Yoshi eating a berry would hardlock the game), rewritten the prompt GFX routine to use as few OAM slots as possible depending on the "no box"/"no exit" settings (from 6 to 15 instead of always 11/15), freed up custom normal object slots $42-$4F that can now be used in ObjecTool, and added new prompt cursor settings (static, blinking, oscillating) ().
Update v0.3.1: this small update makes the new moving cursor option also work when the prompt black box is enabled, adds an optional button (by default select) that can be pressed while the prompt is shown to trigger the "Exit" option, even if "Exit" is not shown on the screen (thanks to Mega for suggesting this) and fixes the green star block coin counter not resetting when respawning (thanks to  Koopster for reporting this).
Update v0.3.2:
- Fixed the issue where sometimes the room checkpoint SFX wouldn't play.
- Made the death counter cap at 99999 instead of overflowing back to 0.
- Moved "retry.asm" inside a "library" folder for consistency.
- Added "level_end_frame.asm" to run sublevel-specific code at the end of each frame (basically the "main" level UberASM label, but it runs at the end of the frame instead of the beginning).
Update v0.3.3:
- Fixed issue with the "Time Up Fix" patch where dying after a timeout would make the timer not tick down after respawning (thanks to worldpeace for finding and fixing this).
- Fixed issue where sprites would freeze or not freeze inconsistently at the start of a level, when using a pipe entrance in the level's main sublevel: now they will never freeze like in vanilla (thanks to BabaYegha for reporting this).
- Fixed issue where the music wouldn't restart playing after respawning when getting a goal tape, going to a sublevel during the goal walk, getting a midway and dying (thanks to  LouisDoucet for reporting this).
- Fixed issue with Revival Blocks (or any kind of resource that removes Mario's death state) where Mario would be stuck in his death pose afterwards (thanks to SJandCharlieTheCat for reporting this).
- Fixed issue where saved data wouldn't get reloaded after getting a Game Over, which could cause for example unsaved level checkpoints to retain after it (thanks to simon.caio for finding this).
- Added new option to make some SRAM data not get reloaded after a Game Over, and to save the game after it. This can be used to not lose some stuff even after getting a Game Over without having saved the game prior (for example, the death counter). Also added a Game Over routine in extra.asm.
- Made a slight space optimization (4 bytes) in the Death Prelude SFX.
Update v0.3.4:
- Fixed bug where dying and respawning in the intro level would send you to level 0 (thanks to  Selicre for reporting this).
- Restored obscure feature from the Retry patch where pressing A/B during the death animation makes the prompt appear immediately (when not using !fast_prompt = 1, otherwise you don't need to press the button).
- Added !prompt_freeze setting to allow to not freeze sprites and animations while the prompt is shown.
- Added !exit_animation setting to allow to skip the death animation when using "Exit" on the prompt.
Update v0.3.5:
- Fixed insertion issue in case another UberASM code uses nested namespaces, for example Dynamic Z (thanks to  Alex for reporting this).
- Added label definition for each Retry freeram define so that they can be referenced by other UberASM codes without having to copy-paste the defines in the other files.
- Added option to reset vanilla Boo Ring's angles on death and/or level load for consistency. By default it's turned on just for deaths.
- Added fix (optional, enabled by default) for some animations still running when the Retry prompt is shown (like Magikoopa's Magic flashing), with the !prompt_freeze = 2 setting.
- Fixed timer still ticking down while the Retry prompt is shown when using !prompt_freeze = 0.
- Added fix (optional, enabled by default) for being able to drop the reserve item while Mario is dying or the Retry prompt is shown.
- Added compatibility with MarioFanGamer's "Inline Layer 3 Messages" patch (no need to use !retry = 1 in the patch). Now the game won't crash when using the Retry prompt with it.
- Added !prompt_wave and !prompt_wave_speed options to make the letters in the currently selected prompt option wave up and down. It looks kinda dumb but maybe someone will like it:
Update v0.3.6:
- Fixed Retry prompt showing up after a delay when falling in a pit and not using !fast_prompt = 1.
- Fixed cursor and letters GFX when not using the prompt box, so that they match the vanilla graphics (before they had a few extra outline pixels).
- Fixed being sometimes possible to use Start+Select in the intro level.
- Added !disable_hurry_up option to disable the tempo hike effect when reaching 100 seconds in a level.
- Added !pipe_entrance_freeze option to force lock/unlock sprites during pipe entrances and avoid possible inconsistencies of the vanilla method (default is vanilla for consistency with previous versions).
- Inspired by Sure Shot, added a way to prevent midways from spawning and/or room checkpoints to activate by setting the !ram_midways_override address.
- Added "door_animation" extra routine that will be called every frame during the fadeout when entering a door. It could be useful to run some code when entering a door, since it's not possible to do in level UberASM.
Update v0.3.7:
- Fixed collected invisible 1-UPs not resetting on death, which would allow to skip some of them after respawning (when not collecting them all).
- Fixed scroll sprites speeds not resetting on death, which could cause issues in some rare cases with layer 2 scroll sprites (thanks to  LouisDoucet for reporting this).
- Added fix (optional, enabled by default) for the bug where Mario's lives don't cap at 99 when the status bar is nuked (this usually causes the Overworld to display a glitched amount and makes Mario have a halo).
- Fixed issue where if a level is placed on the very left edge of the Overworld (beneath where the vanilla border is), then Retry would respawn you in level 0 when dying in that level (thanks to  LouisDoucet for reporting this).
- Added compatibility with the Level Depending on Event and Level Depending on Ram Address patches: now Retry respawning and checkpoints will work correctly when in the "new" levels!
- Fixed mosaic not appearing when respawning in the intro level.
Update v0.3.8:
- Now you can use tiles in SP3/SP4 for the Retry prompt (just add $100 to the tile number).
- Fixed an issue from og Retry where sometimes entering a level from the Overworld and respawning in the level would result in different camera positions (thanks to schema_tuna for finding the fix!).
Update v0.3.9:
- Added fix (optional, enabled by default) for the weird vanilla behavior where levels 12E-13B are always forced to use the "No Yoshi Sign 2" intro regardless of their tileset (which can also mess up custom "No Yoshi Intro" patches). This was added since the hex edit fix conflicted with the initial facing fix hijack (thanks to  Koopster for noticing this).
- Fixed !exit_animation = 0 or 1 behaving seemingly randomly, sometimes exiting immediately, sometimes after the prompt closed - now it will always exit after the prompt is closed (thanks to SJandCharlieTheCat for reporting this).
- Fixed death animation with !exit_animation = 2 having incosistent timing when using different !prompt_freeze settings.
- Fixed vanilla "high and low" tides timer not resetting when respawning, which would cause inconsistent tide behavior between retries.
- Fixed vanilla layer 3 tides not stopping scrolling left when the Retry prompt is shown (only when using !prompt_freeze = 2).
- Fixed Shell-less Koopas being able to move (fall) while the Retry prompt is shown (only when using !prompt_freeze = 2).
Update v0.3.10: small update to fix a bad issue where levels with "No Yoshi" intros respawn you in the Bonus Game, which was introduced back in v0.3.7.
Update v0.4.0:
  • Changed default !pipe_entrance_freeze setting to 1 to avoid inconsistencies.
  • Fixed earthquake effect (e.g. Thwomps) still going while the Retry prompt is shown (only when using !prompt_freeze = 2).
  • Fixed bug where if using the Time Up Fix patch together with a patch that skips status bar initialization code (e.g. RAM Toggled Status Bar), the timer wouldn't tick down after dying due to a timeout in a level without Retry (similar fix as v0.3.3 but for a much more specific case).
  • Fixed issue where the Enable SFX echo feature wouldn't work during a level transition that changes song, if the song had a high echo buffer (note: it can still happen if using !fast_transitions = 1 with songs with echo delay $0C or higher - in this case the SFX echo will be enabled after a room transition/respawn).
  • Added !enter_level_sfx setting (disabled by default) to play a SFX when entering a level from the Overworld, similarly to SMB3.
  • Added !retry_death_animation setting (disabled by default) to allow to play the full death animation before showing the Retry prompt and/or before instantly respawning.
  • Added !death_camera_lock setting (enabled by default) to stop the camera from scrolling while dying (including the "Exit" animation or the death animation enabled by !retry_death_animation).
  • Added !time_up_fix setting (enabled by default) to prevent the TIME UP! message from appearing after dying in a level with timer set to 0 (similar fix as Alcaro's, but handled with UberASM). Note that a new gamemode file was added (retry_gm15.asm) to make it work.
  • Rewritten fix for glitched layer 2 interaction on level load:
    • Now Mario won't appear in his "falling" pose for 1 frame if respawning on layer 2 ground.
    • Now sprites won't act as being in the air for 1 frame if placed on layer 2 ground while respawning (this fixes, for example, Mushrooms starting moving after a level reload when they're not supposed to).
    • Now !retry_ram_l2_backup is unused (might be repurposed for something else in future versions).

PatchUberASM