Language…
17 users online: Adriel_Isaque, ASSATAKKU, autisticsceptile1993,  Ayami, Bonobi, Children's Digest 1950-2009, Dustyized, edgar, FELIPECOSTA10, HammerBrother, MDBattleFrog, MoxieCat, NyariMoN, Power_Boii, RedROM, Saela,  Teyla - Guests: 101 - Bots: 333
Users: 56,259 (2,267 active)
Latest user: Lobitt0

UberASM Retry System (+ Multiple Checkpoints) v0.3.9

[DOWNLOAD]
(you can also check the GitHub 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.

Changelog:
  • v0.3.9: even more fixes.
  • v0.3.8: couple of small fixes.
  • v0.3.7: additional fixes and added compatibility with "Level Depending on ..." patches.
  • v0.3.6: minor fixes and a couple extra features.
  • v0.3.5: some misc fixes.
  • v0.3.4: couple of bug fixes and couple new settings.
  • v0.3.3: some bug fixes and better handling of save data on Game Over.
  • v0.3.2: made some small fixes and added an easy way to run level-specific code at the end of every frame.
  • v0.3.1: improved the moving cursor option to also work while the prompt's black box is enabled, added an optional button (by default select) to trigger the prompt "Exit" option (even if the exit option is not shown on the screen) and fixed the green star block coin counter not resetting when respawning.
  • v0.3: fixed a few bugs related to Yoshi, improved the Retry Prompt GFX routine and added a couple new options for the cursor.
  • v0.2.7: fixed a bug that could cause some sprites on screen to disappear on rare occasions while the prompt was active.
  • v0.2.6: fixed a bug in layer 2 levels and made infinite lives a sublevel-dependent setting.
  • v0.2.5: added support for ObjecTool's Custom Normal Objects alongside Retry's custom midway bars.
  • v0.2.4: Fixed bug that would prevent the Game Over music from playing, fixed a compatibility issue with the VWF Dialogues patch and optimized the NMI routine a bit.
  • v0.2.3: Fixed a rare issue that could happen with LM v3.0+ and implemented some speed optimizations to the code.
  • v0.2.2: Added an option to replace "Mario" with "DEATHS" in the status bar, like the standalone Death Counter patch. Also fixed an issue that caused the level's music to restart when custom codes called $00F606 in consecutive frames.
  • v0.2.1: Fixed a bug that caused the prompt's sound effects to not play.
  • v0.2: C3 release.

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).