Language…
15 users online: CalHal, Daniel30sp, Green, Green Jerry, h.carrell, Hamilton64, HammerBrother, Hooded Edge, Hot Sauce, LindseyFelony, Lumy, Natsuz2, RoadKill85, signature_steve, TheMorganah - Guests: 90 - Bots: 190
Users: 69,706 (2,535 active)
Latest user: Daniel30sp

Stop losing lives once you reach one remaining life

Hey there!

After some consideration on how to use lives in my hack, I've decided to use them more as a currency/collectable to let you pass certain areas. I've also decided that game overs are not something I'm interested in having.

I want to be able to earn/lose lives in my hack. In addition, I want the life counter to never drop below "1" (no "game over"). So, how would I set the minimum life limit to "1"?

(I did see plenty of options for infinite lives & raising the maximum lives, but nothing for setting a minimum)
That's an interesting idea. If you knew ASM you could probably make a code to prevent the player's lives from going any lower than 1.

An easier but less elegant solution would be to change $009E25 to 1, which allows the player to start with one life instead of five. (See here.)

In other words, save this as an .ASM file and patch it with Asar:
Code
org $009E25
db $01


Don't think that really does waht they want to have happen (which is never drop below 1, not start at 1).

Instead, you probably want a patch like this:

Code
org $00D0D8
	LDA $0DBE
	BEQ NotGameOver
	DEC $0DBE
	BRA NotGameOver

org $00D0E6:
  NotGameOver:


Professional frame-by-frame time wizard. YouTube - Bluesky - SMW Glitch List - SMW Randomizer
Originally posted by Thomas
Don't think that really does waht they want to have happen (which is never drop below 1, not start at 1).

Instead, you probably want a patch like this:

Code
org $00D0D8
	LDA $0DBE
	BEQ NotGameOver
	DEC $0DBE
	BRA NotGameOver

org $00D0E6:
  NotGameOver:


Precisely. I just want lives to never go below 1 + no game overs ever.

Unfortunately, this patch didn't work for me, Thomas. I tried it again on squeaky clean rom too. I end up getting this error in asar:

error: (E5050): Unknown operator. [org $00D0E6:]
Originally posted by SmashNcrab
Originally posted by Thomas
Don't think that really does waht they want to have happen (which is never drop below 1, not start at 1).

Instead, you probably want a patch like this:

Code
org $00D0D8
	LDA $0DBE
	BEQ NotGameOver
	DEC $0DBE
	BRA NotGameOver

org $00D0E6:
  NotGameOver:


Precisely. I just want lives to never go below 1 + no game overs ever.

Unfortunately, this patch didn't work for me, Thomas. I tried it again on squeaky clean rom too. I end up getting this error in asar:

error: (E5050): Unknown operator. [org $00D0E6:]


Remove the : after "org $00D0E6". That fixes it.
Originally posted by smwln
Originally posted by SmashNcrab
Originally posted by Thomas
Don't think that really does waht they want to have happen (which is never drop below 1, not start at 1).

Instead, you probably want a patch like this:

Code
org $00D0D8
	LDA $0DBE
	BEQ NotGameOver
	DEC $0DBE
	BRA NotGameOver

org $00D0E6:
  NotGameOver:


Precisely. I just want lives to never go below 1 + no game overs ever.

Unfortunately, this patch didn't work for me, Thomas. I tried it again on squeaky clean rom too. I end up getting this error in asar:

error: (E5050): Unknown operator. [org $00D0E6:]


Remove the : after "org $00D0E6". That fixes it.

Oh, I didn't even notice that. Awesome! It works! I appreciate the help from you both! My systems are coming together nicely now