Start with full health
Zeldix :: Zelda III Hacking :: Requests
Page 1 of 1
Start with full health
What needs to be tweaked in order to start with full health when you load a save file?
aacroke- Bee
- Since : 2016-09-14
Re: Start with full health
There's a table the game checks to determine how many hearts to give you on start-up. It checks your total hearts and uses that as an index in the table. The table is located at $04F4AC on a headerless rom. It's worth noting that there are entries for conditions where you have less than 3 hearts max but this is only to prevent the game having to do an additional calculation on the index before searching the table.
For this task you want to change:
to:
For this task you want to change:
- Code:
18 18 18 18 18 20 20 28 28 30 30 38 38 38 40 40 40 48 48 48
to:
- Code:
18 18 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
Last edited by superskuj on Thu 15 Sep 2016 - 14:36; edited 1 time in total
superskuj- Since : 2015-07-07
Re: Start with full health
- Code:
PC 0x04F562: EA EA EA EA EA EA EA EA
Or, in assembly:
Original
- Code:
09f55e lda $7ef36c [7ef36c]
09f562 lsr a
09f563 lsr a
09f564 lsr a
09f565 tax
09f566 lda $09f4ac,x [09f4bf]
09f56a sta $7ef36d [7ef36d]
Start with full health:
- Code:
09f55e lda $7ef36c [7ef36c]
09f562 nop
09f563 nop
09f564 nop
09f565 nop
09f566 nop
09f567 nop
09f568 nop
09f569 nop
09f56a sta $7ef36d [7ef36d]
This actually modifies the save routine, not the game load routine, since that's when it actually sets it to half.
Edit: superskuj ninja'd me while I was in the middle of tracing
qwertymodo- Since : 2014-10-21
Re: Start with full health
Nice find superskuj, however after testing I found out that the game actually starts at 0 for some reason. This means your table is actually 1 byte short. Namely if you have 20 heart containers, we all know from AlttP that you start with 1 row of full hearts= 10 hearts= 50 in hex, while your table ends with 48. If you look at the next row in hex, the 50 is actually there.
So if you start at 04F4AC,
the table is actually
18 18 18 18 18 20 20 28 28 30 30 38 38 38 40 40 40 48 48 48 50
and needs to be changed into
18 18 18 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
Your table will actually write a +1 heart at each health, since your A0= 20 full hearts at the position when you have 19 heart containers.
I actually found this when I implemented the start with 10 containers, and when I was defeated and started over, I had 11 containers.
Here some more studies:
ORIGINAL GAME
at 04F4AC
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (hex) 18 18 18 18 18 20 20 28 28 30 30 38 38 38 40 40 40 48 48 48 50
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (actual) 03 03 03 03 03 04 04 05 05 06 06 07 07 07 08 08 08 09 09 09 10
MAX HEALTH MOD after save and quit or save and continue
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (actual) 03 03 03 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (hex) 18 18 18 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
Note:
The values Go to RAM, and thus into SRAM, so once you edit the hex values, play the game and save it, your further changes of the table will Not be in affect on a played file, unless you start a new game.
So if you start at 04F4AC,
the table is actually
18 18 18 18 18 20 20 28 28 30 30 38 38 38 40 40 40 48 48 48 50
and needs to be changed into
18 18 18 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
Your table will actually write a +1 heart at each health, since your A0= 20 full hearts at the position when you have 19 heart containers.
I actually found this when I implemented the start with 10 containers, and when I was defeated and started over, I had 11 containers.
Here some more studies:
ORIGINAL GAME
at 04F4AC
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (hex) 18 18 18 18 18 20 20 28 28 30 30 38 38 38 40 40 40 48 48 48 50
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (actual) 03 03 03 03 03 04 04 05 05 06 06 07 07 07 08 08 08 09 09 09 10
MAX HEALTH MOD after save and quit or save and continue
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (actual) 03 03 03 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
heart containers 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
given health (hex) 18 18 18 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
Note:
The values Go to RAM, and thus into SRAM, so once you edit the hex values, play the game and save it, your further changes of the table will Not be in affect on a played file, unless you start a new game.
Last edited by Puzzledude on Thu 15 Sep 2016 - 14:37; edited 1 time in total
Puzzledude- Since : 2012-06-20
Re: Start with full health
Ah nice catch. I neglected to test it because I thought it was straightforward enough but that's always when these kinds of mistakes happen I'll make a note in my post
superskuj- Since : 2015-07-07
Re: Start with full health
Edit: Ok, I got somewhat un-lazy and tested it for 3, 4, 5, 6, 8, 10, 12, and 19 hearts, all good.
Last edited by qwertymodo on Thu 15 Sep 2016 - 14:50; edited 1 time in total
qwertymodo- Since : 2014-10-21
Re: Start with full health
Yes, sure no problem, since you were the first to find the Table, which for instance I couldn't.superskuj wrote:Ah nice catch. I neglected to test it because I thought it was straightforward enough but that's always when these kinds of mistakes happen I'll make a note in my post
Ah, a coder's solution. I tested this and it works. I would never though of such a solution.PC 0x04F562: EA EA EA EA EA EA EA EA
PS
I wonder what happens if you hack the game to start with 1 or 2 heart containers. I actually wanted the player to start in the GoT hack with 2 heart containers and never tested what happens after save and quit.
Puzzledude- Since : 2012-06-20
Re: Start with full health
As suspected, you always get 3 containers, so the actual table is:I wonder what happens if you hack the game to start with 1 or 2 heart containers. I actually wanted the player to start in the GoT hack with 2 heart containers and never tested what happens after save and quit.
08 08 10 18 18 20 20 28 28 30 30 38 38 38 40 40 40 48 48 48 50
or with full health:
08 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
Now you can also start with 1 or 2 heart containers (instead of normal 3) and get your health reloaded normally.
Note: starting with 0 heart containers will result in game crash.
Puzzledude- Since : 2012-06-20
Re: Start with full health
I tested with your method for 10 and 15 and it was ok.Edit: Ok, I got somewhat un-lazy and tested it for 3, 4, 5, 6, 8, 10, 12, and 19 hearts, all good.
Puzzledude- Since : 2012-06-20
Re: Start with full health
I just tried setting the number of hearts to 1, the load game screen shows 1 heart, but when you load the game, the HUD shows 3, and weird things happen when you get hit. Also, $7EF36D still gets saved as $18, so you still have 3 hearts worth of health.
qwertymodo- Since : 2014-10-21
Re: Start with full health
Also, once you get hit down to 1 heart, then you can't go above it, and if you go into a house, it corrects the HUD to show 1, but the low health beeping plays constantly.
I'd say it's probably doable, but lots of separate pieces you'd need to fix.
I'd say it's probably doable, but lots of separate pieces you'd need to fix.
qwertymodo- Since : 2014-10-21
Re: Start with full health
qwertymodo wrote:I just tried setting the number of hearts to 1, the load game screen shows 1 heart, but when you load the game, the HUD shows 3, and weird things happen when you get hit. Also, $7EF36D still gets saved as $18, so you still have 3 hearts worth of health.
Also, once you get hit down to 1 heart, then you can't go above it, and if you go into a house, it corrects the HUD to show 1, but the low health beeping plays constantly.
I'd say it's probably doable, but lots of separate pieces you'd need to fix.
That's odd, it works for me.
Just go to 274F2, and instead of 18 18, type in 08 08, to start the game with 1 heart. Or indeed 10 10, to start the game with 2 hearts. Works normally, calculates health normally and with my remade table above for 1 and 2 hearts, also correctly gives you health if defeated or save and quit.
Puzzledude- Since : 2012-06-20
Re: Start with full health
Yes, if you start with 1 heart, ie at 274F2 type in 08 08. You also need to do this: 6DCA1, from 2B to 00, to stop the beaping sound, since it will always beep if 1 heart. If you then get defeated, you also need that new table to correctly restart with 1 or 2 hearts (default is always 3) and if you find a heart container, the game knows to increase from 1 to 2, or from 2 to 3.but the low health beeping plays constantly.
Puzzledude- Since : 2012-06-20
Re: Start with full health
So what do I need to change in hex if I want to always start with the right amount of hearts collected?
Too lazy to read the whold thread.... but always wondered why the game behaved like that.
Thx!
Too lazy to read the whold thread.... but always wondered why the game behaved like that.
Thx!
Floki- Since : 2012-06-19
Re: Start with full health
If you want to load your game with full health, either puzzledude's table edit or my nop slide will work. You don't need both.
qwertymodo- Since : 2014-10-21
Re: Start with full health
Alright awesome qwerty, will add this to my to do list!
Also thanks to aacroke for bringing this to our attention!
Also thanks to aacroke for bringing this to our attention!
Floki- Since : 2012-06-19
Re: Start with full health
I also wanted to ask you SePH, did you plan on making the border on lost hearts (should be a very small gfx edit of 8 bit gfx), since if you for instance have 15 hearts max possible in Conker and loose health, the white lines actually disappear completely. So you then don't know how much you actually can get (or is this how Assasin's creed has it).Lord SePH wrote:Alright awesome qwerty, will add this to my to do list!
Also thanks to aacroke for bringing this to our attention!
Puzzledude- Since : 2012-06-20
Re: Start with full health
04F4AC:So what do I need to change in hex if I want to always start with the right amount of hearts collected?
08 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 A0
or
04F562:
EA EA EA EA EA EA EA EA
But it's logical, you got defeated, you thus can not start with full health, since then the game will be to easy. Imagine you have 19 containers and get defeated. Then you would start with all 19 hearts, which is a lot.Too lazy to read the whold thread.... but always wondered why the game behaved like that.
On the other hand original authors made sure you always get some additional health: 3 hearts in the house, fairy in one of the trees at the Pyramid etc. They basically wanted you to at least search for some additional health after defeat. For the same reason the fairy gives you only 7 hearts. Imagine this would be 20, ie fairy (at least flying one) would give you full health - too easy.
But if you intend to make Conker user-friendly, starting with full health after defeat and a flying (but not resurrecting) fairy giving more than 7 hearts, like 12 for instance, is the way to go. There is also the buying factor, if fairy would give 20 hearts, players might not be buying red potion.
Puzzledude- Since : 2012-06-20
Re: Start with full health
I may add this to PW. It seems like the kind of thing that doesn't really skew the difficulty curve much, but when you inevitably die, it means just that much less work to get ready to head out again. Which fits perfectly with my stated goal of "making you hate yourself and/or the game less when you play".
qwertymodo- Since : 2014-10-21
Re: Start with full health
Nope will keep the disapearing hearts as they are. Always meant this to be like this!
The heart containers you have can be seen in the inventory screen at the bottom if you know what to look for.
I won't change the health given by fairies. It is user friendly enough as it is except the final boss....but there's a trick to him and I've put a note in there about it in the best place ever. So people will find him even easier.
If it were just me I'd remove the option to catch fairies and make them hurt you instead but that would fail my goal to make this as user friendly as possible
The heart containers you have can be seen in the inventory screen at the bottom if you know what to look for.
I won't change the health given by fairies. It is user friendly enough as it is except the final boss....but there's a trick to him and I've put a note in there about it in the best place ever. So people will find him even easier.
If it were just me I'd remove the option to catch fairies and make them hurt you instead but that would fail my goal to make this as user friendly as possible
Floki- Since : 2012-06-19
Re: Start with full health
Nope will keep the disapearing hearts as they are. Always meant this to be like this!
Yes, sure, your call.I won't change the health given by fairies.
I found the last boss very difficult, I guess I missed that trick.except the final boss....but there's a trick to him and I've put a note in there about it in the best place ever. So people will find him even easier
Puzzledude- Since : 2012-06-20
Re: Start with full health
No thanks necessary, it just has bothered me for like 25 years that you don't start with either full health or the amount you saved with.
It's I who says thanks - you guys have empowered me to rid myself of this issue.
It's I who says thanks - you guys have empowered me to rid myself of this issue.
aacroke- Bee
- Since : 2016-09-14
Similar topics
» Change Starting Health
» Looking to modify the Hearts HUD (Health meter)
» Full usage map?
» How about a full PC port of ALTTP?
» Start sram modifier
» Looking to modify the Hearts HUD (Health meter)
» Full usage map?
» How about a full PC port of ALTTP?
» Start sram modifier
Zeldix :: Zelda III Hacking :: Requests
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum