+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Lives/Game Over Problem
Pages: [1] 2
Author Topic: Lives/Game Over Problem  (Read 1034 times)
Jedi QuestMaster
Guest
« on: October 27, 2006, 05:32:06 pm »

On a game, I adjusted it so the player starts with 9 lives instead of 3, but whenever a stage is beaten with more than 3 lives it renders a Game Over screen as if I lost all my lives.
How would I fix this?
Nightcrawler
Guest
« Reply #1 on: October 27, 2006, 05:36:05 pm »

I'd recommend doing some code tracing for when that lives variable location is read. It seems something is reading in that number and very unhappy that it is greater than 3.
Jedi QuestMaster
Guest
« Reply #2 on: October 27, 2006, 08:41:49 pm »

Okay, I just found out that it has nothing to do with lives - it does this regardless.

I somehow must've triggered the wrong switch when hacking something. Sad
deespence2929
Guest
« Reply #3 on: October 27, 2006, 09:14:18 pm »

Quote from: Jedi QuestMaster on October 27, 2006, 08:41:49 pm
Okay, I just found out that it has nothing to do with lives - it does this regardless.

I somehow must've triggered the wrong switch when hacking something. Sad


ouch...
Jedi QuestMaster
Guest
« Reply #4 on: October 27, 2006, 10:18:48 pm »

I backed up my files whenever I updated something, & it's between #32 & 33 - but I made lots of changes between them. Sad
Jedi QuestMaster
Guest
« Reply #5 on: October 27, 2006, 11:32:14 pm »

Good news - it only happens at the end of the first stage! Cheesy

By the way, when you select 'Continue' you still move on to the next stage. But yeah, still a problem since it uses up a Continue.
StealthBatidna
Guest
« Reply #6 on: November 02, 2006, 03:25:00 am »

If you can't fix this problem, why not give the player an extra continue to start with so that they can use it in the beginning and not have to worry about running out prematurely?
Griever
Guest
« Reply #7 on: November 03, 2006, 11:10:10 am »

 Angry What are you guys talking about? Why not to ask something like 'What game' or 'What Platform'?
(Ugh... Maybe I missed something?)
If it is NES, i'm willing to help  Cheesy Just gimme the patch...
Jedi QuestMaster
Guest
« Reply #8 on: November 03, 2006, 10:08:23 pm »

Haha, I shouldn't've kept the game name private. Cheesy (Is shouldn't've right?)

Anyway, it's Journey To Silius, & yes - I actually decided to allow the player to start with 9 continues, but that was a crude solution.

Anyway, I just found out that during the first boss, for some reason, the game sets the number of lives to 0 multiple times - which means Game Over whenever a screen changes.  I changed the number to '9' to assign the player 9 lives (even if the lives are set at something else at the time).  But it seems whenever the lives is set above '3' or something like that, a strange glitch occurs with having the player take damage for no reason. Undecided\

Let's see... this is what I'm getting.  I set the number to '4' for right now.  0053 is the number of lives.

$A91D:A9 04     LDA #$04
$A91F:9D 05 03  STA $0305,X @ $0355 = #$04
$A922:9D 06 03  STA $0306,X @ $0356 = #$04
$A925:9D 03 00  STA $0003,X @ $0053 = #$09
Griever
Guest
« Reply #9 on: November 04, 2006, 04:13:45 pm »

Hmm... I think that will work. Maybe you ocasionally changed byte at $1a936 from $07 to $00
So... Change it back then ^_^
Jedi QuestMaster
Guest
« Reply #10 on: November 04, 2006, 04:55:51 pm »

Thanks, I will try that ASAP. Roll Eyes
Disch
Guest
« Reply #11 on: November 04, 2006, 08:46:03 pm »

I'm very skeptical that the number of lives is set in such a manner.  Are you 100% sure that $0053 is the number of remaining lives?  The code segment you pasted and the fact that the game resets it to zero multiple times during the boss fight tell me it's not the number of lives, but rather might be some temporary RAM used for various stuff.

I might look into it later when I'm bored....


EDIT-

$0053 does indeed seem to be the remaining number of lives.  However during that first boss fight, the game never touched $0053 for me.  Perhaps something else you did in the hack is messing this up instead?

*looks at more*


EDIT AGAIN -

offsets include header:

0x1DE29  -  lives to start
0x1DBDB and 0x1DBF3  -  lives after a continue


I changed all 3 offsets to $09 (giving successful results), ran through the game past the first stage, and didn't run into any problems at all.

The problem you're experiencing might be due to a sideeffect of some other hack you've done to the game?
« Last Edit: November 04, 2006, 09:16:01 pm by Disch »
Jedi QuestMaster
Guest
« Reply #12 on: November 05, 2006, 02:21:46 am »

Quote
The problem you're experiencing might be due to a sideeffect of some other hack you've done to the game?
Yes; & it's fixed now.  Smiley

How'd you find that out Griever?
Griever
Guest
« Reply #13 on: November 05, 2006, 09:51:49 am »

Face my PsychoPower, Mere Mortal =)
Well, I just ran this code on normal (unaltered) rom and figured all out. But it would be easier, if I have had your patch.
Lenophis
Guest
« Reply #14 on: November 05, 2006, 01:24:13 pm »

Quote from: Jedi QuestMaster on November 05, 2006, 02:21:46 am
Quote
The problem you're experiencing might be due to a sideeffect of some other hack you've done to the game?
Yes; & it's fixed now.  Smiley

How'd you find that out Griever?
Except it was Disch who said that line, not Griever. Tongue
Pages: [1] 2  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC