Name: | "Kirby and the Amazing Mirror" Styled Enemy HP Meter v2.5.23 |
Author: | HammerBrother |
Added: | |
Version History: | View |
Tool: | Asar |
Requires Free Space: | Yes |
Bug Fix: | No |
Featured: | No |
Description: | This patch makes the game display the HP of an enemy when they take damage. Note: Only a few enemies in smw uses HP system. Make sure you read the readme, as it has a lot of information reguarding things like custom sprites, graphical bar settings, etc. Note: The bar flickering in the screenshot gif is supposed to represent the damage incurred, the recorder is pretty bad at keeping up the game's framerate, thus the actual is much more fluent. |
Tags: | code health health bar hp bar lorom sa-1 sprite |
Comments: | 27 (jump to comments) |
Download
290.48 KiB | 475 downloads
Comments (27)
You can easily defeat them with 2 fireballs followed by a stomp, because the fireball is worth a stomp without activating the invulnerability timer, and stomp so that it checks if 3 points of damage is reached instead of 5/12 points to kill.
Sorry for late reply, but by default, it uses the super status bar patch. I made a comprehensive documentation on both.
If you do not want the HP to be displayed, and you still want to use values provided, leave !Freeram_SprHPCurrSlot of whatever value it's on.
you mean 256 tile bytes (the number of 8x8 tiles the bar occupies and also the number of bytes the table the bar is stored in), not pixels. Very unlikely would anyone would need a bar that is over 32 tiles long (the width of the screen).
Edit: And note that if you use SA-1, you should use !Setting_GraphicalBar_SNESMathOnly to 0 because sprites run in SA-1 and they call codes about the HP bar which also means the code about multiplication also runs in SA-1.
Actually, vanilla smw's HP system is stored in a single byte, thus up to 255HP is allowed. If your hack uses "varying damage" and needs more than 255HP, you want to use the new sprite tables directly (!Freeram_SprTbl_CurrHPLow,x AND !Freeram_SprTbl_CurrHPHi,x).
Edit: Yep, I did made a mistake, if the user makes HP 8-bit, and selects the number of digits at least 3 and less than 5, would still include the subroutine when it shouldn't (it checks if the user picks a number is below 5, which 5 isn't always the maximum number of digits if the user picks 8-bit). That is now fixed.
-All smw bosses take very few hits to defeat; either 3 stomps/thrown sprite or, 5 or 12 fireballs. And no, since Bowser boss fight have the HUD disabled (to accommodate the cutoff if it did exist), I don't think I need to add to that boss (and not many hackers would ever rehash Bowser again).
-Again, very few smw sprites ever use the health system AT ALL, either they die in one hit, or changes into a different sprite (such as a Dino Rhino turning into a Dino Torch).
For some reason, if you WANT to, open Uberasm_Tool_Files/GM_14.asm and comment out this code:
(note the semicolons on the left of each line).
Though let me quickly fix it.
Edit: Done!
oops, I mean you only don't need RATS if banks $00-$0F and $80-$8F. My bad.
Another thing that I wasn't paying attention, is that on the shared subroutines patch, Erik stated that $80+ under the SA-1 effects is completely different (fastrom no longer accessible). Not sure if this only happens if you activate SA-1 mode, or if you patch the sa-1, it's permanently entirely inaccessible. I do understand many ppu and SNES registers become out of reach if the mode is active.
Given its size, I'm pretty sure I missed something, lol. But as far as I'm concerned, the patch seems to work fine.
And it also would have been nice if there were an easier way to get the subroutines for the patch and that you can disable the HP display for chuck when you have allowed the patch before.
Other then that, the patch works fine.
Edit: Fixed.
Edit1: Fix another glitch where if the damage is large enough to exceed 255, will overflow (without death). Fixed by checking if the value goes over 255 via BCS after the ADC.
Edit2: Really optimized the damage subroutine code (only used by custom sprites), after learning that if the SBC underflows a value, the carry clears, it makes the CMP redundant.
New bug found: When a chargin chuck dies by falling off screen, SwitchHPBar will be executed every frame until its sprite status ($7E14C8 = #$00, when it goes far enough below the screen), causing the HP bar to instantly switch back to the dying enemy when the player attacks a different enemy, also freezing the record damage indicator should $9D is frozen while the enemy is dying. NOTE: I'll update this patch once my new graphical bar gets done updating.
The patch comes with very detailed documentation, so it's easy to set up.
Also it needs full SA-1 support on the sprite and the RAM address (sprites can't access to RAM in banks $7E/$7F, so you have to use a free BW-RAM/I-RAM address). I'll remove the tag until something is done about that.
You mean maintain the number of hits? Oops, should've added defines on the amount of damage also.