Language…
15 users online: Children's Playmate Magazine, Dark Prince, DasFueller, EvilAdmiralKivi, fanfan21, Gordon JamCast, Knight of Time,  KungFuFurby, MaxtonChao, MegaSonic1999, NewPointless, Nyumi_996, pnaha, Stivi, SuperMarioDs64 - Guests: 158 - Bots: 85
Users: 69,224 (2,356 active)
Latest user: MaxtonChao

UberASM Retry System (+ Multiple Checkpoints) v0.8.0

PatchUberASM

Update v0.6.0:
  • Fixed compilation errors when using !fast_prompt = 0 (thanks to  Koopster for reporting this).
  • Changed default values for !fast_transitions, !fast_prompt and !death_camera_lock in settings.asm to 0.
  • Fixed sfx echo not working sometimes when changing music in the middle of a level (for example with P-Switch or Starman).
  • Don't immediately respawn if falling in a pit with instant Retry if !retry_death_animation is 2 or 3.
  • Don't show prompt immediately if falling in a pit with Retry prompt if !retry_death_animation is 1 or 3.
  • Added !no_score_sprites_on_death option (disabled by default) to removed score sprites on death, to allow to use their graphic slots in SP1 for the Retry prompt tiles.
  • Fixed Yoshi swallow timer decrementing while the Retry prompt is displayed when the frame counter has specific values (only when !prompt_freeze is not 0).
  • Added api routine to save the game.
  • Added api routine to respawn in the level.
  • Now the Retry checkpoints also work for midway and secondary entrances that use the vanilla method of setting the player's position (instead of just "Method 2"), as it was in the original Retry patch (thanks to  LouisDoucet for showing me that someone actually uses the vanilla method for entrances).
I'm not sure if this is happening due to a bad setting on my end, but when you enter in a vanilla reznor fight, the sprite status bar tiles get garbled.
Here's some examples:



(I initially thought it was a Mario DMA-er patch conflict but then I tried this in a rom with only the uberasm retry and nothing else and this is still happening).
When I use this new UberASM Retry System,Please.
Hello. I would like to let the player carry power-ups between levels, but setting counterbreak_powerup to 0 consequently does not reset the player's power-up on death, ie when dying to a pit or lava. I am using prompt type 2 (instant retry). Is there a way to retain the vanilla behaviour without turning off retries?
I just noticed that if the checkpoint setting is set to $01 for the main level, the LM 'Redirect Midway Entrance to other level' option doesn't work. Personally, I managed to deal with it by setting the checkpoint option to $02, but this won't always be feasible for others...

Edit: Also noticed an oversight with the option to erase score sprites. If the player dies during the goal march (like in a goal trap) while the score sprites show up, they won't disappear and potentially get glitched up by the retry's graphics.
My Mode 0 guide.

My Discord server. It has a lot of archived ASM stuff, so check that out!

Originally posted by WONIU
When I use this new UberASM Retry System,Please.

I don't get it.

Originally posted by palrumia
Hello. I would like to let the player carry power-ups between levels, but setting counterbreak_powerup to 0 consequently does not reset the player's power-up on death, ie when dying to a pit or lava. I am using prompt type 2 (instant retry). Is there a way to retain the vanilla behaviour without turning off retries?

You can keep counterbreak to 0 and add this line in the "extra.asm" file under "death:":
Code
STZ $0DC2|!addr

This way the reserve item will reset on death but not on using start+select or beating levels.

Originally posted by Anas
I just noticed that if the checkpoint setting is set to $01 for the main level, the LM 'Redirect Midway Entrance to other level' option doesn't work. Personally, I managed to deal with it by setting the checkpoint option to $02, but this won't always be feasible for others...

Yeah that setting is incompatible with whatever teleports you to that location with code, but you can have the same effect with Retry's custom midway objects.

Originally posted by Alex
I'm not sure if this is happening due to a bad setting on my end, but when you enter in a vanilla reznor fight, the sprite status bar tiles get garbled.
Here's some examples:



(I initially thought it was a Mario DMA-er patch conflict but then I tried this in a rom with only the uberasm retry and nothing else and this is still happening).

Originally posted by Anas

Edit: Also noticed an oversight with the option to erase score sprites. If the player dies during the goal march (like in a goal trap) while the score sprites show up, they won't disappear and potentially get glitched up by the retry's graphics.

I'll look into these problems when I get the chance.
Originally posted by Kevin

You can keep counterbreak to 0 and add this line in the "extra.asm" file under "death:":
Code
STZ $0DC2|!addr

This way the reserve item will reset on death but not on using start+select or beating levels.


Thanks for the input! It was actually Mario's current powerup state I wanted to reset on death, but I extrapolated that replacing $0DC2 with the address I needed ($0019) did the trick. #smw{:TUP:}
Originally posted by palrumia

Thanks for the input! It was actually Mario's current powerup state I wanted to reset on death, but I extrapolated that replacing $0DC2 with the address I needed ($0019) did the trick. #smw{:TUP:}

Oh ok cool! (although not sure how you can die but keep the powerup anyway?...) This made me realize that I could easily add options for the countrbreaks to only reset on level death or on Overworld independently, maybe it could be useful for some.
Originally posted by Anas
Edit: Also noticed an oversight with the option to erase score sprites. If the player dies during the goal march (like in a goal trap) while the score sprites show up, they won't disappear and potentially get glitched up by the retry's graphics.

Just got around to testing this and I couldn't reproduce the problem, for me the score sprites always erase even if during the goal march... Can you provide a gif?
Update v0.6.1:
  • Added an option for the counterbreak settings to only apply on level reload or on Overworld loading, instead of being forced for both (use values 2 and 3 for the !counterbreak_xxx settings).
  • Fixed the !title_death_behavior setting not working when using UberASMTool 2.0 (thanks to MiracleWater for reporting this).
  • Fixed the sprite status bar being glitched (and possibly other undiscovered issues...) in vanilla mode 7 boss rooms (thanks to  Alex for reporting this).
Update v0.6.2:
  • Avoid using Mario's pipe entrance state to reload a level. This can fix potential issues with custom code that checks for Mario's animation state (thanks to  LouisDoucet for reporting this).
  • Moved misc.asm and rom.asm out of the retry_config folder, since these are not supposed to be edited by the user in 99.9% of cases.
  • Added !no_prompt_draw option to not have the prompt drawn on screen for a minimalistic result. This achieves the same effect as making the included GFX files blank, but saves ROM space and avoids having to reserve sprite GFX tiles for it.
  • Removed math pri, math round and rep X commands, since they're deprecated since Asar 1.90 and they weren't needed anyway.
Update v0.7.0:
  • Fixed the !no_score_sprites_on_death option so it doesn't erase score sprites if the prompt is not enabled in the level.
  • Changed sprite status bar configuration to use ram addresses instead of tables, and removed the sprite_status_bar_tables.asm file. You can now enable and configure the status bar items using the retry_api_configure_sprite_status_bar API function. See docs/api.html for more information.
  • Expanded the ram size by 11 bytes to account for the new sprite status bar variables and possible future features. As a result of this, the ram variables !retry_ram_death_counter, !retry_ram_checkpoint and !retry_ram_cust_obj_data have been shifted compared to previous versions. See docs/ram.html for more information.
  • Added api routine to get the current Retry type.
  • Added api routine to get SRAM address of any variable saved by Retry.
  • Added !draw_retry_indicator setting to draw an indicator in the sprite status bar when the level has Retry enabled (thanks to MiracleWater for the indicator gfx).
  • Fixed potential issue when drawing Dragon Coins in the sprite status bar.
  • Fixed lives decrementing twice when infinite lives is disabled and Retry is enabled in a level (issue introduced in v0.6.2).
  • Renamed settings.asm to settings_global.asm.
  • Removed tables.asm and replaced it with the new settings_local.asm. This now uses a macro-based approach to enable level-specific options, while the old table-based file can still be found under legacy/tables.asm for those that prefer it. Check out docs/settings_local.html for details.
Update v0.7.1:
  • Removed level_end_frame.asm and the gm14_end routine in extra.asm, as they're now obsoleted by the UberASM Tool 2.0 end label (2.0 is required to insert Retry from this version onwards).
  • Fixed issue from the previous version where the sprite status bar coin tile could be glitched.

NOTE: if upgrading a rom from 0.7.0 or older to 0.7.1 or newer, you need to patch the included retry_unpatch.asm file with Asar BEFORE running UberASM Tool with the new Retry version, or the game will crash. Otherwise, just ignore this.
Update v0.7.2:
  • Updated library/retry.asm and gamemode/retry_gm14.asm files, which I forgot to update in 0.7.1 so that version gave compilation errors :(

NOTE: if upgrading from 0.7.0 or older to 0.7.1 or newer, you need to patch the included retry_unpatch.asm file with Asar BEFORE running UberASM Tool with the new Retry version, or the game will crash.
Update v0.7.3:
  • Added !8x8_item_box_tile option to have an 8x8 tile instead of a 16x16 tile for the sprite status bar item box (thanks to  AmperSam for the gfx).
  • Fixed game crash if patching the infinite lives hex edit after inserting Retry.
Update v0.7.4:
  • Fixed get_sram_variable_address api routine giving wrong result if it was called from a different bank.
  • Fixed Mario's walking pose being glitched sometimes after a level reload, which was introduced in v0.6.2 (thanks to mmBeefStew for reporting this).
Item box, timer and other things from the sprite status bar included aren't drawing in my rom. It only has sa1 patch applied, expanded to 4 MB. Pixi, GPS and Addmusic applied.

Spoilers from QLDC3



Am I missing something? Like a table to edit, for example?
Originally posted by Anorakun
Item box, timer and other things from the sprite status bar included aren't drawing in my rom. It only has sa1 patch applied, expanded to 4 MB. Pixi, GPS and Addmusic applied.

Spoilers from QLDC3



Am I missing something? Like a table to edit, for example?

I recently changed the sprite status bar management so it's not table based but ram based, so you can configure it by using a specific routine in Retry, although I didn't include a default option to make it drawn conveniently so right now you need to add a UberASM (in level init if you just want it for a level, or gamemode 10 if you want it for every level). The code in question is this:
Code
init:
	REP #$30
	LDA #$3080 ; Item box: palette B, tile 0x80
	LDX #$0088 ; Timer: palette 8, tile 0x88
	LDY #$00C2 ; Coin counter: palette 8, tile 0xC2
	JSL retry_api_configure_sprite_status_bar
	SEP #$30
	RTL

The three numbers there set which sprite tile are used and which palette. For example $3080 means tile $80, sprite palette 3 (which is palette row B). If you want to hide some of the elements use $0000 there.
In the next version I'll add some defines for this so it should be simpler.
Update v0.8.0:
  • Fixed !title_death_behavior setting not working anymore (issue introduced in v0.7.1).
  • Changed gamemode 3 file to gamemode 0 so that Retry still works even if the title screen is skipped with a patch.
  • Removed load_title extra routine which was basically useless and not consistent anymore after the gamemode 03->00 change.
  • Added defines to configure the sprite status bar elements globally. Now the api routine only needs to be called to overwrite the default settings.
  • Changed configure_sprite_status_bar api routine palette format so it's easier to use (palette value to pass is [8-F] instead of [0-7]).
  • Fixed Retry indicator being drawn on the title screen.
  • Added retry_install.bat script to automate copying the Retry files in the UberASM Tool folders.
  • Fixed switch palace message sprites getting glitched or disappearing if the sprite status bar is enabled (issue introduced in v0.7.1).
  • Fixed sprite status bar not being drawn in the intro level by default.
  • Added lives and bonus stars counters to the sprite status bar, which are disabled by default, but you can enable them in settings_global.asm or with the configure_sprite_status_bar API routine (thanks to  AmperSam for the lives counter gfx).
  • Changed configure_sprite_status_bar API routine format to account for the new sprite status bar items.
  • Removed !lives_overflow_fix setting: it is now always enabled.
  • Changed %disable_room_cp_sfx to %no_room_cp_sfx in settings_local.asm to keep the name consistent with other options.
  • Finalized documentation (thanks to  AmperSam for the huge help).

Also, since this version the documentation is entirely made in html to make it easier to browse and read, you can view it by double clicking on Readme.html file in the main folder. You can also browse it online at the following link: https://kkevinm.github.io/retry-system/.
A couple years back, you mentioned you needed to finish up the docs before submitting it to the section. Now, the documentation is ready, and their are no current issues or PRs in the GitHub repo.

Perhaps you'll be submitting it as a C3 release?

PatchUberASM