Language…
10 users online: codfish1002, eltiolavara9, Ice Man, koffe190, LazyRuns, RicardoDeMelo, sinseiga, SirGabe, yoshi9429, YuriGamer - Guests: 250 - Bots: 367
Users: 64,795 (2,375 active)
Latest user: mathew

Sprite Health Bar

SMW Patches → Sprite Health Bar

Submission Details

Name: Sprite Health Bar
Author: Koopster
Added:
Tool: Asar
Requires Free Space: Yes
Bug Fix: No
Featured: No
Description: This patch implements a container-based health system in the game. A collectible sprite that increases the amount of containers is also included.
What is different about this patch is that it does not touch the status bar at all, displaying the hearts as sprites instead - in fact, it may be safe to use this along with most of the custom status bar patches available in the site.

There are two ways to use the extra containers:
- It is possible to make them work more akin to SMB2, where they will last for as long as a level (rather than a world in this case), and the original amount of containers will be restored when the player returns to the overworld.
- Like in most games with a health system, the containers can be made to be permanent (this is the default setting). However, you must be careful to assign each of the container sprites an ID via the extra byte, otherwise they will respawn and make it possible to collect infinite containers. The amount of container ID's you can have in total is limited to 16 by default, but this number can be expanded easily with the help of a SRAM/BW-RAM enhancer patch. More information about this can be found in the sprite's .asm file.

Make sure to check the patch's .asm file, as it includes many defines to easily customize, among other things, the graphics and position of the containers. A folder is included with an alternative minimalist design, as well as versions that suit the Mario's 8x8 Tiles DMA-er patch and don't replace occupied SP1-2 tiles.
Tags: health bar lorom sa-1 smb2 smb2 health sprite status bar
Comments: 20 (jump to comments)
Download 22.53 KiB | 643 downloads

Screenshots

View all

Comments (20)

Sacri Pan Link
Originally posted by Koopster
Certainly. I don't think it's a trivial change in the code, though.


I plan in making a hack based on the DKC serie with a health bar system, and I saw a hack with health bar where Mario is always 2 tiles high and I'd like to do that too
Sacri Pan Link
Is it possible to make mario NEVER become small?
 Koopster Author Link
Certainly. I don't think it's a trivial change in the code, though.
WSG The master Link
How do I make Mario only stay in the Fire Flower powerup state, regardless of whether he takes damage or not. Because Mario always needs to shoot projectiles because I'm doing a mega man x style rom hack. Who can help me, I appreciate it because I'm new in the business of making rom hacks.
 MarioFanGamer Link
Moderated with:
  • Lunar Magic 3.30
  • SA-1 Pack v1.40
  • Asar v1.81
  • PIXI v1.32
Fixed a missing SA-1 conversion.

One thing I have found is that you can carry more HP than your total HP count. That bug can be triggered if you disable permanent containers and finish the level with more HP than the initial total health and the extra health doesn't get displayed on the status bar. It's a minor bug and nothing gamebreaking, though.
 Koopster Author Link
Originally posted by 1UPdudes
Is there away to make it so Mario doesn't start in his Super Form?

I've just been messing around with seeing if I can have a Small Mario who can take a hit before dying without them ever been Super.

Unfortunately the patch hasn't been thought out to allow dissociation of the small state and having 1 health. It definitely would require some changes all around, which I sadly don't have the time for lately.

And thanks for your nice words!
 1UPdudes Link
Is there away to make it so Mario doesn't start in his Super Form?

I've just been messing around with seeing if I can have a Small Mario who can take a hit before dying without them ever been Super.
Regardless I think this is one if not the best Health Patch the site has gotten due to how customisable it is.
 Koopster Author Link
Originally posted by Fermín Acosta Jr.
Is it compatible with remove status bar

Yes
El Cuh Fermin Link
Is it compatible with remove status bar
zacmario Link
Very, very excited to see this.
 Koopster Author Link
You're sparing the moderators quite a lot of work :P

I fixed the Lakitu and Magikoopa crash. It was just a misplaced return.

The problems with player 2 arose from a few flaws in the code which I hopefully fixed, but also because the default free RAM address I had in the patch for health was actually not 2 free consecutive bytes, so Luigi's health was getting clobbered by something else. I have no idea how I overlooked that. I changed it to one that actually meets that criteria; make sure to check if that new address is actually free in your hack.

I had to move a hijack, so please apply this restoration patch when updating:

Code
!addr = $0000
if read1($00FFD5) == $23
	sa1rom
	!addr = $6000
endif
org $009E2C : STA $0DBE|!addr : STZ $0DBF|!addr

Thank you so much again, I really appreciate it! You can either comment here or message me privately if you happen to find anything else.
JeanOliveira Link
Hello again Koopster!

I have encountered some other problems in my level edits, and I made sure it is with your patch.

Problem 1: In-game, Mario, when killing certain enemies like Lakitus and Magikoopas in any way, instantly crashes the game.
(tested without sa1, and with sa1 1.40).

Problem 2: In 2-player game, when collecting extra heart containers (custom sprite) with any player, Luigi becomes "semi-invincible". This means, Luigi takes damage from enemies and is stagnated with 1 heart unit, and can only die by falling into holes or lava.

Also, Luigi always starts a new game with 1 heart unit (in small form).
With Mario, everything works perfectly. (tested without and with sa1, and with sram/bwram plus patch).

If I find another error, I can send you a message directly to you, if you like.

Well, I hope I didn't bother you. Thanks for your attention. #tb{:D}
JeanOliveira Link
Thanks for the update. Now it works perfectly!
 Koopster Author Link
Originally posted by JeanOliveira
Mario being "big" riding Yoshi, when picking up a Fire Flower with Yoshi's tongue, gets the power up of the Feather, instead of the Fire Flower.

Thank you for reporting! The bug has been fixed (hopefully), so make sure to redownload.
I have also included an option to activate the feature you asked for.
JeanOliveira Link
Hello Koopster. Your Patch is great, I'm using it in my hack (I went back to using Lunar Magic a little while ago, but whatever). I just came to inform you that I discovered a small error:

Mario being "big" riding Yoshi, when picking up a Fire Flower with Yoshi's tongue, gets the power up of the Feather, instead of the Fire Flower.

Another thing, but optional: I suggest, if possible, to leave an option in the asm file, that when collecting 1-up mushrooms, all the currently empty heart bars become full.

Thanks for the patch, sorry for any inconvenience.
 Koopster Author Link
I updated the patch once again :P
Now features powerdown animations, an extra option for item box auto-drop, and a few minor, unnoticeable fixes. Users of older versions must apply the following restoration patch when updating: org $00F5FC : LDA #$01 : STA $71
 Koopster Author Link
Originally posted by Luaxon
Suggestion: the health bars in the third image could fill in that empty space in the bottom center of the status bar. Or maybe the health bars could be in the top left (where the lives are) while the lives and the bonus stars go in the bottom center (I can see maybe 16 hearts fitting there). Doing all of this might just be too unnecessary and complicating though.

The position of each heart of the health bar is entirely customizable. However, as confirmed by Ladida, it is unfortunately not possible to draw sprites in the black area when using the minimalist status bar patch, due to it technically not being part of the screen.
chineesmw Link
Suggestion: the health bars in the third image could fill in that empty space in the bottom center of the status bar. Or maybe the health bars could be in the top left (where the lives are) while the lives and the bonus stars go in the bottom center (I can see maybe 16 hearts fitting there). Doing all of this might just be too unnecessary and complicating though.

I really like the variety of customization in this patch. Can't wait to see more RPG-like hacks. Great stuff!
 Koopster Author Link
To anyone who's grabbed this patch already, I have updated it, so please redownload! I improved the logic so items don't end up getting lost by item box math (which happens when you already have a high-tier powerup and your item box is full) - they will be converted into health. As sort of a consequence, I added an option to disable the item box functionality, which should appease users of the Remove Status Bar patch.
TheMorganah Link
Awesome! We need more sprite HUD like that.